Presentation is loading. Please wait.

Presentation is loading. Please wait.

Plotting in Excel KY San Jose State University Engineering 10.

Similar presentations


Presentation on theme: "Plotting in Excel KY San Jose State University Engineering 10."— Presentation transcript:

1 Plotting in Excel KY San Jose State University Engineering 10

2 Plotting in Excel Select Insert from the main menu
Select All Chart Types San Jose State University Engineering 10

3 Column Chart Definition: A chart that consists of multiple columns (vertical bars), and the height of each column represents the quantity associated with the corresponding category. Use this type of chart for visual comparison of the quantities associated with different categories San Jose State University Engineering 10

4 Column Chart - Example Select Insert → Column Chart → 2D Column
Select data range Category No. of Student Frosh 4000 Sophomore 3500 Junior 6800 Senior 7000 Graduate 8000 San Jose State University Engineering 10

5 Column Chart - Example Chart Layout options
Select the option with Chart Title and Axes Title San Jose State University Engineering 10

6 Column Chart - Example Edit the chart and axes titles, place the curser on the text and right click A plot must have a title and a description of the axes, including units if applicable San Jose State University Engineering 10

7 Multi-Column Chart - Example
Grade 2001 2007 Frosh 3500 4000 Sophomore 3000 Junior 6250 6800 Senior 6750 7000 Grad. 7250 8000 Multiple Column Charts are used for Comparison, select all three columns. Include title, description for axes and modify the legends. San Jose State University Engineering 10

8 Pie Chart Definition: A graph in the shape of a circle divided into sectors, whose areas correspond to the proportions of the quantities. Application: Visual representation of relative magnitudes of a given set of quantities San Jose State University Engineering 10

9 Pie Chart Label the Chart Use Chart Layout Engineering 10
San Jose State University Engineering 10

10 XY (Scatter) Plots XY plots are two dimensional graphs. Scientifically, it is a plot of independent variable (x) against a dependent variable (y). The plot is used to obtain a functional relationship between two variables There are five options in Chart sub-type menu. The first option, where only points are plotted, is the most common type used in engineering and science fields. A curve is fitted to the plotted points to obtain the function describing the relationship between the two variable. San Jose State University Engineering 10

11 XY (Scatter) Plots - Example
Select Chart Layout (Layout 1) San Jose State University Engineering 10

12 Fitting a Curve to Data Points (XY)
Given the plot of test results, the question is what would be your test score if you studied for 2.5 hours, no data is available for 2.5 hours. In order to answer the question, you have to find the equation relating the test score to the number of hours spent studying. San Jose State University Engineering 10

13 Fitting a Curve to Data Points (XY)
Engineers frequently collect paired data in order to understand the characteristics or behavior of an object or a system. The goal is to capture the overall trend reflected by the entire data set. This can be achieved by obtaining the equation of a curve (or a straight line) that best describes (fits) the data points. The Method of Least Squares is used for this purpose. The Method of Least Squares minimizes the sum of the squares of the errors. San Jose State University Engineering 10

14 Fitting a Curve to Data Points (XY)
The Method of Least Squares can be used to fit many different types of functions through a set of data points. The data obtained in many engineering applications may be represented by a straight line, exponential function, a power function, or a polynomial. Equation Type Mathematical expression y = ax + b Linear (straight line) Exponential y = aebx Power y = axb Logarithmic y = a ln(x) + b Polynomial (up to 6th order) y = c1 + c2x + c3x2 + …… + ck+1xk In Excel k = 6 The Method of Least Squares obtains the appropriate set of values for the coefficients, a, b, c1, …. San Jose State University Engineering 10

15 Fitting a Curve to Data Points (XY)
Select a data point and right click, then choose Add Trendline option. Select the curve to fit the data. Data point Check the Set Intercept box to force the curve to pass through origin (0,0). Check the Display Equation on chart and the Display R-squared value on chart boxes. San Jose State University Engineering 10

16 Fitting the best Curve to Data Points
There are six option to select from, start with your best guess and check the fit. The best fit is indicated by how close the correlation factor, R2, is to unity, the closer to 1 the better the fit. Exponential Linear Polynomial (3rd order) Polynomial (5th order) San Jose State University Engineering 10

17 Fitting the best Curve to Data Points
Given the plot of test results, the question is what would be your test score if you studied for 2.5 hours, no data is available for 2.5 hours. y = .2361(2.5)5 – (2.5) (2.5)3 – (2.5) (2.5) – 60 y = (exam score for 2.5 hours of studying) Substitute x = 2.5 in the 5th order polynomial equation to find y (hours spent studying). Linear Exponential Polynomial (3rd order) Polynomial (5th order) Equation Type Exam Score R-squared value .73 .675 .913 .931 75.1 77.3 62.9 65.5 Best fit (does not make sense) Best answer San Jose State University Engineering 10

18 An engineer is responsible for monitoring the quality of 1000-ohm resistors. To do this, the engineer must measure the resistance of a number of resistors within a batch selected at random. The results are shown below. The acceptable variation is ± 2% ( ). The question is how many resistors fall within the acceptable range. Sample No Resistance, ohm Sample No Resistance, ohm Histogram There are times that it is desirable to plot the data in a manner that shows how the values are distributed within a certain range. This type of plot is called a histogram (a relative frequency plot). Largest value = 1045 Smallest value = 935 Use the Max and MIN functions to find: San Jose State University Engineering 10

19 Histogram Data menu If Data Analysis (or Solver) does not appear, select File and choose Options, select Add-Ins, click on Go and check the boxes for Analysis ToolPak and Solver San Jose State University Engineering 10

20 Histogram Create the Bin range
To create a histogram, you must first subdivide the range of the data into equally spaced intervals. The first interval must start at or below the smallest data value, and the last interval must extend to or beyond the largest data value. The interval bounds is called the Bin Range in Excel. Largest value = 1045 Smallest value = 935 The acceptable variation is ± 2% (980 to1020). Create the Bin range Find the desired interval: 40 ( =40) The Bin Range 980 1020 900 < 935 Create a column in the Excel for the Bin Range 940 1060 > 1045 San Jose State University Engineering 10

21 Histogram Data range (has to be in one column)
Select Data Analysis and choose Histogram Bin range Select to obtain a histogram plot San Jose State University Engineering 10

22 Histogram 16 data values fall in the 980+ – 1020 range
The rule used in Excel is that if a data value falls on the interval boundary, the data value is assigned to the lower interval So, if you buy a resistor from this manufacturer there is only a (16/30)100 = 53.3% chance that resistor has a value of 1000±2% San Jose State University Engineering 10


Download ppt "Plotting in Excel KY San Jose State University Engineering 10."

Similar presentations


Ads by Google