Chapter 9. Correlation and Regression. Chapter Outline. 9.1 Correlation 9.2 Linear Regression 9.3 Measures of Regression and Prediction Intervals 9.4 Multiple Regression. Section 9.1. Correlation. Section 9.1 Objectives.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Larson/Farber 4th ed.
Larson/Farber 4th ed.
Correlation
Larson/Farber 4th ed.
2
x
2
4
6
–2
– 4
CorrelationA scatter plot can be used to determine whether a linear (straight line) correlation exists between two variables.
Example:
Larson/Farber 4th ed.
y
y
y
x
x
x
x
Types of CorrelationAs x increases, y tends to decrease.
As x increases, y tends to increase.
Negative Linear Correlation
Positive Linear Correlation
No Correlation
Nonlinear Correlation
Larson/Farber 4th ed.
A marketing manager conducted a study to determine whether there is a linear relationship between money spent on advertising and company sales. The data are shown in the table. Display the data in a scatter plot and determine whether there appears to be a positive or negative linear correlation or no linear correlation.
Larson/Farber 4th ed.
y
Company sales
(in thousands of dollars)
x
Advertising expenses
(in thousands of dollars)
Appears to be a positive linear correlation. As the advertising expenses increase, the sales tend to increase.
Larson/Farber 4th ed.
Old Faithful, located in Yellowstone National Park, is the world’s most famous geyser. The duration (in minutes) of several of Old Faithful’s eruptions and the times (in minutes) until the next eruption are shown in the table. Using a TI-83/84, display the data in a scatter plot. Determine the type of correlation.
Larson/Farber 4th ed.
STAT > Edit…
STATPLOT
100
50
1
5
From the scatter plot, it appears that the variables have a positive linear correlation.
Larson/Farber 4th ed.
Correlation coefficient
n is the number of data pairs
Larson/Farber 4th ed.
-1
0
Correlation CoefficientIf r = -1 there is a perfect negative correlation
If r is close to 0 there is no linear correlation
If r = 1 there is a perfect positive correlation
Larson/Farber 4th ed.
y
y
y
x
x
x
x
Linear Correlationr = 0.91
r = 0.88
Strong negative correlation
Strong positive correlation
r = 0.42
r = 0.07
Weak positive correlation
Nonlinear Correlation
Larson/Farber 4th ed.
In Words In Symbols
Larson/Farber 4th ed.
In Words In Symbols
Square each x-value and find the sum.
Square each y-value and find the sum.
Use these five sums to calculate the correlation coefficient.
Larson/Farber 4th ed.
Calculate the correlation coefficient for the advertising expenditures and company sales data. What can you conclude?
Larson/Farber 4th ed.
540
5.76
50,625
294.4
2.56
33,856
440
4
48,400
624
6.76
57,600
252
1.96
32,400
294.4
2.56
33,856
372
4
34,596
473
4.84
46,225
Σx = 15.8
Σy = 1634
Σxy = 3289.8
Σx2 = 32.44
Σy2 = 337,558
Larson/Farber 4th ed.
Σx = 15.8
Σy = 1634
Σxy = 3289.8
Σx2 = 32.44
Σy2 = 337,558
r ≈ 0.913 suggests a strong positive linear correlation. As the amount spent on advertising increases, the company sales also increase.
Larson/Farber 4th ed.
Use a technology tool to calculate the correlation coefficient for the Old Faithful data. What can you conclude?
Larson/Farber 4th ed.
To calculate r, you must first enter the DiagnosticOn command found in the Catalog menu
STAT > Calc
r ≈ 0.979 suggests a strong positive correlation.
Larson/Farber 4th ed.
Larson/Farber 4th ed.
level of significance
Number of pairs of data in sample
Larson/Farber 4th ed.
In Words In Symbols
Determine n.
Identify .
Use Table 11 in Appendix B.
Larson/Farber 4th ed.
In Words In Symbols
If |r| > critical value, the correlation is significant. Otherwise, there is not enough evidence to support that the correlation is significant.
Decide if the correlation is significant.
Interpret the decision in the context of the original claim.
Larson/Farber 4th ed.
Using the Old Faithful data, you used 25 pairs of data to find r ≈ 0.979. Is the correlation coefficient significant? Use α = 0.05.
Larson/Farber 4th ed.
Larson/Farber 4th ed.
Larson/Farber 4th ed.
H0:ρ 0 (no significant negative correlation)Ha: ρ<0 (significant negative correlation)
H0:ρ 0 (no significant positive correlation)Ha: ρ>0 (significant positive correlation)
H0:ρ= 0 (no significant correlation)Ha: ρ0 (significant correlation)
Larson/Farber 4th ed.
follows a t-distribution with d.f. = n – 2.
Larson/Farber 4th ed.
In Words In Symbols
State H0 and Ha.
Identify .
d.f. = n – 2.
Use Table 5 in Appendix B.
Larson/Farber 4th ed.
In Words In Symbols
If t is in the rejection region, reject H0. Otherwise fail to reject H0.
Larson/Farber 4th ed.
Previously you calculated r ≈ 0.9129. Test the significance of this correlation coefficient. Use α = 0.05.
Larson/Farber 4th ed.
ρ Coefficient = 0
ρ ≠ 0
0.05
8 – 2 = 6
Solution: t-Test for a Correlation CoefficientReject H0
At the 5% level of significance, there is enough evidence to conclude that there is a significant linear correlation between advertising expenses and company sales.
0.025
0.025
t
-2.447
0
2.447
-2.447
2.447
5.478
Larson/Farber 4th ed.
Larson/Farber 4th ed.
Larson/Farber 4th ed.
Larson/Farber 4th ed.
Larson/Farber 4th ed.
y
x
Larson/Farber 4th ed.
Residual
For a given x-value,
di = (observed y-value) – (predicted y-value)
Observed y-value
y
d6{
d4{
}d5
d3{
}d2
Predicted y-value
}d1
x
Larson/Farber 4th ed.
Regression line(line of best fit)
ŷ = mx + b
y-intercept
Predicted y-value for a given x-value
Slope
Larson/Farber 4th ed.
Larson/Farber 4th ed.
Find the equation of the regression line for the advertising expenditures and company sales data.
Larson/Farber 4th ed.
Recall from section 9.1:
540
5.76
50,625
294.4
2.56
33,856
440
4
48,400
624
6.76
57,600
252
1.96
32,400
294.4
2.56
33,856
372
4
34,596
473
4.84
46,225
Σx = 15.8
Σy = 1634
Σxy = 3289.8
Σx2 = 32.44
Σy2 = 337,558
Larson/Farber 4th ed.
Σx = 15.8
Σy = 1634
Σxy = 3289.8
Σx2 = 32.44
Σy2 = 337,558
Equation of the regression line
Larson/Farber 4th ed.
y
Company sales
(in thousands of dollars)
x
Advertising expenses
(in thousands of dollars)
Larson/Farber 4th ed.
Use a technology tool to find the equation of the regression line for the Old Faithful data.
Larson/Farber 4th ed.
100
50
1
5
Larson/Farber 4th ed.
The regression equation for the advertising expenses (in thousands of dollars) and company sales (in thousands of dollars) data is ŷ = 50.729x + 104.061. Use this equation to predict the expected company sales for the following advertising expenses. (Recall from section 9.1 that x and y have a significant linear correlation.)
Larson/Farber 4th ed.
ŷ = 50.729x + 104.061
ŷ =50.729(1.5) + 104.061 ≈ 180.155
When the advertising expenses are $1500, the company sales are about $180,155.
1.8 thousand dollars
ŷ =50.729(1.8) + 104.061 ≈ 195.373
When the advertising expenses are $1800, the company sales are about $195,373.
Larson/Farber 4th ed.
ŷ =50.729(2.5) + 104.061 ≈ 230.884
When the advertising expenses are $2500, the company sales are about $230,884.
Prediction values are meaningful only for x-values in (or close to) the range of the data. The x-values in the original data set range from 1.4 to 2.6. So, it would
not be appropriate to use the regression line to predict
company sales for advertising expenditures such as 0.5 ($500) or 5.0 ($5000).
Larson/Farber 4th ed.
Larson/Farber 4th ed.
Larson/Farber 4th ed.
Larson/Farber 4th ed.
Unexplained deviation Coefficient
Total deviation
Explained deviation
(xi, yi)
Variation About a Regression LineTotal Deviation =
Explained Deviation =
Unexplained Deviation =
y
(xi, yi)
(xi, ŷi)
x
Larson/Farber 4th ed.
Total variation
Explained variation
Total variation =
Explained variation =
Larson/Farber 4th ed.
Unexplained variation
Unexplained variation =
The sum of the explained and unexplained variation is equal to the total variation.
Total variation = Explained variation + Unexplained variation
Larson/Farber 4th ed.
Coefficient of determination
Larson/Farber 4th ed.
The correlation coefficient for the advertising expenses and company sales data as calculated in Section 9.1 isr ≈ 0.913. Find the coefficient of determination. What does this tell you about the explained variation of the data about the regression line? About the unexplained variation?
Solution:
About 83.4% of the variation in the company sales can be explained by the variation in the advertising expenditures. About 16.9% of the variation is unexplained.
Larson/Farber 4th ed.
Standard error of estimate
n is the number of ordered pairs in the data set
Larson/Farber 4th ed.
In Words In Symbols
Larson/Farber 4th ed.
The regression equation for the advertising expenses and company sales data as calculated in section 9.2 isŷ = 50.729x + 104.061
Find the standard error of estimate.
Solution:
Use a table to calculate the sum of the squared differences of each observed y-value and the corresponding predicted y-value.
Larson/Farber 4th ed.
Σ = 635.3463
unexplained variation
Larson/Farber 4th ed.
The standard error of estimate of the company sales for a specific advertising expense is about $10.29.
Larson/Farber 4th ed.
Larson/Farber 4th ed.
ŷ – E < y < ŷ + E where
Larson/Farber 4th ed.
In Words In Symbols
d.f. = n – 2
Use Table 5 in Appendix B.
Larson/Farber 4th ed.
In Words In Symbols
Left endpoint: ŷ – E Right endpoint: ŷ + E
Interval: ŷ – E < y < ŷ + E
Larson/Farber 4th ed.
Construct a 95% prediction interval for the company sales when the advertising expenses are $2100. What can you conclude?
Recall, n = 8, ŷ = 50.729x + 104.061, se = 10.290
Solution:
Point estimate:
ŷ = 50.729(2.1)+ 104.061 ≈ 210.592
Critical value:
d.f. = n –2 = 8 – 2 = 6 tc = 2.447
Larson/Farber 4th ed.
Left Endpoint: ŷ – E
Right Endpoint: ŷ + E
210.592 – 26.857
≈ 183.735
210.592 + 26.857
≈ 237.449
183.735 < y < 237.449
You can be 95% confident that when advertising expenses are $2100, the company sales will be between $183,735 and $237,449.
Larson/Farber 4th ed.
Larson/Farber 4th ed.
Larson/Farber 4th ed.
Larson/Farber 4th ed.
Multiple regression equation
* Because the mathematics associated with this concept is complicated, technology is generally used to calculate the multiple regression equation.
Larson/Farber 4th ed.
A researcher wants to determine how employee salaries at a certain company are related to the length of employment, previous experience, and education. The researcher selects eight employees from the company and obtains the data shown on the next slide. Use Minitab to find a multiple regression equation that models the data.
Larson/Farber 4th ed.
Larson/Farber 4th ed.
Larson/Farber 4th ed.
The regression equation isŷ = 49,764 + 364x1 + 228x2 + 267x3
Larson/Farber 4th ed.
Larson/Farber 4th ed.
Use the regression equationŷ = 49,764 + 364x1 + 228x2 + 267x3to predict an employee’s salary given 12 years of current employment, 5 years of experience, and 16 years of education.
Solution:
ŷ = 49,764 + 364(12) + 228(5) + 267(16)
= 59,544
The employee’s predicted salary is $59,544.
Larson/Farber 4th ed.
Larson/Farber 4th ed.