Beruflich Dokumente
Kultur Dokumente
doc
Case Study 22 QA
Use Excels graphing tool to generate a converting Fahrenheit Degree to Celsius Degree.
Scenario:
Objective: Learn how to compute and use regression equations to a set of data. Keywords and Concepts 1. Best fit straight line to a set of data 2. Bivariate scatter plot 3. Regression equation 4. Y = mX + C [C here is y-intercept of the equation, and not degree C] 5. Independent variable 6. Dependent variable 7. Slope (rate of change) of the best-fit line 8. Y-intercept 9. Correlation coefficient (r) The following graph shows a linear relationship of a scatter plot of Fahrenheit versus Celsius temperature programmed which is prepared in Excel spread-sheet. Given a collection of paired sample data, the following formula (regression equation) describes the relationship between X (independent or predictor variable) and Y (dependent or response variable): Y = mX + C (eq. 1)
where, m expresses the slope (rate of change) of the best-fit line, X is any particular X value within the range of the data set, and C represents the Y-intercept or the value of Y when X equals zero.
Step 1:
a. Find the parameters of equation 1 mathematically through interpreting the required data from the graph [also assume that 70 degree F ~ 21 degree C]. b. After you find the regression equation, show your steps in finding your corresponding Fahrenheit temperatures for 23, 100, 0.0, & -40 degree Celsius. What can you tell from these results? c. Utilize Excel spread-sheet to program for y = m x + b for a range of Celsius temperature of 0 ~ 40. You need to generate a series of X, Y data within this range, using the equation of line that was found in part (a), and graph your data. Make sure to include in your graph the Excel equation to fitted line and the RMS, Root Mean Square value for further discussion and drawing conclusions [R^2]. d. Do you think the straight line is a good model for this conversion [F to C]? Why? Please discuss your answer.
Step 2:
Please utilize Excel to perform statistical method [different from graphing mathematical method] to find r, m, and b [correlation coefficient, slope, & Y-intercept] utilizing the following given data:
32 0
40 4.44
60 15.5
80 26.6
100 37.7
Solutions:
Regression Equation We can use the 2 points to find the mathematical equation in Figure 1: P1 (0, 32) and P2 (21, 70 is given to us): Therefore m= 1.8, while Y-intercept is = 32 degree F at X = 0.0 degree C.
Please notice another way of finding these parameters (m & b in Eq. 1) would be statistical method shown in the following (not required for this problem). Use equation 2 to compute m as follows:
mr SDY SD X
(eq. 2)
The symbol r equals the correlation coefficient between X and Y; SDY and SDX are their respective X and Y variable standard deviations. The Y-intercept C computes in equation 3 as
C Y mX
(eq. 3)
Where, Y equals the mean of the Y scores, m equals the slope, and X equals the mean of the X scores. Equation 3 can be rewritten as follows:
C Y r( SDY )X SDX
(eq. 4)
Combining equations 2 and 3 expresses the equation for the best-fit regression line to predict Y (Y) from any X value in equation 5:
Y r( SDY ) X Y mX SDX
(eq. 5)
Alternatively, combining equations 2 and 4 expresses the equation for a straight line as:
Y r( SDY SD ) X Y (r Y ) X SDX SDX
(eq. 6)
The slope and Y-intercept of the best-fit regression line also can be computed from raw scores with the following formula (equation 7):
XY X Y ( ) ( )( ) N N N Slope, m 2 X X ( ) ( )2 N N
(eq. 7)
where, the equations numerator equals the numerator for the correlation coefficient ( r) and the denominator equals SDX. The raw score equation (eq. 8) computes the Y-intercept (C) as:
(eq. 8)
The denominator in equation 8 equals the square of SDX. Example Given the following 5 data points for temperature in degrees Fahrenheit ( Yvariable) and temperature in degrees Celsius (X-variable), compute the equation for the best-fitting straight line.
32 0
40 4.44
60 15.5
80 26.6
100 37.7
Step 1. Compute r, SDx, and SDy. Y=312; Y2=22624; X=84.36; X2=2395.65; XY=7015.6; N=5 r = 0.999
Y = 62.4; SDY = 25.12
X = 16.87; SDX = 13.95
Step 2. Compute the slope (m) and Y-intercept (C) using equations 2 and 4, respectively.
mr SDY SD X
(eq. 2)
(eq. 4)