12
Graphical Analysis in Excel EGN 1006 – Introduction to Engineering

Graphical Analysis in Excel EGN 1006 – Introduction to Engineering

Embed Size (px)

Citation preview

Page 1: Graphical Analysis in Excel EGN 1006 – Introduction to Engineering

Graphical Analysis in Excel

EGN 1006 – Introduction to Engineering

Page 2: Graphical Analysis in Excel EGN 1006 – Introduction to Engineering

Creating Graphs

Creating graphs in Excel is a simple processFollow these steps: Select the block of cells containing the data to be

plotted. You may include headings! The “X” axis data column should always be to the left of

the “Y” axis. For example, place x-axis data in column A and y-axis data in column B.

Click on the INSERT tab Choose the graph type from the CHARTS area (In

engineering and science, SCATTER is most often used.

Page 3: Graphical Analysis in Excel EGN 1006 – Introduction to Engineering

More on Graphs

Graphs done on a SEPARATE sheet can easily be copied or pasted into a WORD document.

Graphs embedded into worksheet can be edited even after they have been inserted.

Page 4: Graphical Analysis in Excel EGN 1006 – Introduction to Engineering

Creating and Editing a Line Graph

Suppose we had the following time and distance data for an object that is moving.

Time (sec) Distance (m)

0 0.44

1 1.12

2 2.25

3 3.65

4 4.87

5 5.62

6 6.69

7 7.87

8 8.12

9 9.33

10 10.87

Prepare an Excel worksheet and a SCATTER plot with the data to the right. Be sure to place TIME in column A and DISTANCE in column B.

Page 5: Graphical Analysis in Excel EGN 1006 – Introduction to Engineering

Fitting Equations to Data

The data an engineer collects could reveal: Spatial profile Time history Cause and effect relationship System output as a function of input

Mathematical expressions are then used to CAPTURE the relationship shown in the data

Page 6: Graphical Analysis in Excel EGN 1006 – Introduction to Engineering

Fitting a straight line to a set of data

Data is usually represented by values that show some SCATTER, which is due to fluctuations or errors in measurement.

Therefore, we NEVER connect the dots on a graph! We pass the points through an AGGREGATE or TRENDLINE. In science, this is probably referred to as a “line of best fit”.

Page 7: Graphical Analysis in Excel EGN 1006 – Introduction to Engineering

Adjusting the graph layout

Click on each axis title to add the appropriate variable and units. Also add an appropriate title. Use y vs. x as a guideline.

Page 8: Graphical Analysis in Excel EGN 1006 – Introduction to Engineering

The line of best fit, a.k.a “The Trendline”

Right click on a data point, then select ADD TRENDLINE.

Page 9: Graphical Analysis in Excel EGN 1006 – Introduction to Engineering

Which fit do I choose?

Inspect your data. It appears linear, so select linear for regression type. The check the last 2 boxes down at the bottom to display the equation of the line and the correlation value.

Page 10: Graphical Analysis in Excel EGN 1006 – Introduction to Engineering

Assessing Quality using r2

The r2 value helps and engineer assess the QUALITY of the curve fit.

Any number close to 1.0 is a good fit. You can think of this value as a %fit. A 1.0 would represent 100%.

If the r2 value is too low, right click on the trendline and change the type to LOGARITHMIC or other type of curve fit. The largest r2 value is the one that fits the data the best.

Page 11: Graphical Analysis in Excel EGN 1006 – Introduction to Engineering

Assessing Quality using r2

As you can see, the equation is in the form of y = mx +b, where m(slope) = 1.026 and the y intercept is 0.4. Since the R2 is close to 1, this is a good fit for this data set. What does the slope and y-intercept tells us about this object?

Page 12: Graphical Analysis in Excel EGN 1006 – Introduction to Engineering

The “OTHER” fitting functions

Exponential Logarithmic Power Function Polynomial ( NOTE: By INCREASING the

order, you can increase your r2 value)