0% found this document useful (0 votes)
57 views

Lecture - Slides - 3 - Correlation and Regression

This document outlines the key concepts and objectives covered in Section 9.1 of the textbook, which introduces linear correlation. It defines correlation and the variables involved, discusses different types of correlation through scatter plots, and introduces the correlation coefficient - a measure of the strength and direction of linear relationships between two variables. It provides examples of constructing scatter plots and calculating a correlation coefficient. The objectives are to introduce correlation, find and interpret correlation coefficients, and distinguish between correlation and causation.

Uploaded by

sai rao
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

Lecture - Slides - 3 - Correlation and Regression

This document outlines the key concepts and objectives covered in Section 9.1 of the textbook, which introduces linear correlation. It defines correlation and the variables involved, discusses different types of correlation through scatter plots, and introduces the correlation coefficient - a measure of the strength and direction of linear relationships between two variables. It provides examples of constructing scatter plots and calculating a correlation coefficient. The objectives are to introduce correlation, find and interpret correlation coefficients, and distinguish between correlation and causation.

Uploaded by

sai rao
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 84

Week 3 Lecture Slides

Correlation and Regression

Larson/Farber 4th ed. 1


Chapter Outline

• 9.1 Correlation
• 9.2 Linear Regression
• 9.3 Measures of Regression and Prediction Intervals
• 9.4 Multiple Regression

Larson/Farber 4th ed. 2


Section 9.1

Correlation

Larson/Farber 4th ed. 3


Section 9.1 Objectives

• Introduce linear correlation, independent and


dependent variables, and the types of correlation
• Find a correlation coefficient
• Test a population correlation coefficient ρ using a
table
• Perform a hypothesis test for a population correlation
coefficient ρ
• Distinguish between correlation and causation

Larson/Farber 4th ed. 4


Correlation

Correlation
• A relationship between two variables.
• The data can be represented by ordered pairs (x, y)
 x is the independent (or explanatory) variable
 y is the dependent (or response) variable

Larson/Farber 4th ed. 5


Correlation

A scatter plot can be used to determine whether a linear


(straight line) correlation exists between two variables.
y

Example: 2

x 1 2 3 4 5 x
y –4 –2 –1 0 2 2 4 6

–2

–4

Larson/Farber 4th ed. 6


Types of Correlation
y y
As x increases, y
tends to decrease.
As x increases, y
tends to increase.
x x
Negative Linear Correlation Positive Linear Correlation
y y

x x
No Correlation Nonlinear Correlation
Larson/Farber 4th ed. 7
Example: Constructing a Scatter Plot

A marketing manager conducted a Advertising Company


study to determine whether there is expenses, sales
($1000), x ($1000), y
a linear relationship between
2.4 225
money spent on advertising and
1.6 184
company sales. The data are shown
2.0 220
in the table. Display the data in a 2.6 240
scatter plot and determine whether 1.4 180
there appears to be a positive or 1.6 184
negative linear correlation or no 2.0 186
linear correlation. 2.2 215

Larson/Farber 4th ed. 8


Solution: Constructing a Scatter Plot
(in thousands of y
Company sales

dollars)

Advertising expenses
(in thousands of
Appears to be a dollars)correlation.
positive linear As the
advertising expenses increase, the sales tend to increase.
Larson/Farber 4th ed. 9
Example: Constructing a Scatter Plot
Using Technology
Old Faithful, located in Duration
x
Time,
y
Duration
x
Time,
y
Yellowstone National Park, is the 1.8 56 3.78 79

world’s most famous geyser. The 1.82


1.9
58
62
3.83
3.88
85
80
duration (in minutes) of several of 1.93 56 4.1 89

Old Faithful’s eruptions and the 1.98 57 4.27 90


2.05 57 4.3 89
times (in minutes) until the next 2.13 60 4.43 89
eruption are shown in the table. 2.3 57 4.47 86
2.37 61 4.53 89
Using a TI-83/84, display the data 2.82 73 4.55 86
in a scatter plot. Determine the 3.13 76 4.6 92

type of correlation. 3.27


3.65
77
77
4.63
 
91
 

Larson/Farber 4th ed. 10


Solution: Constructing a Scatter Plot
Using Technology
• Enter the x-values into list L1 and the y-values into
list L2.
• Use Stat Plot to construct the scatter plot.
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. 11
Correlation Coefficient
Correlation coefficient
• A measure of the strength and the direction of a linear relationship
between two variables.
• The symbol r represents the sample correlation coefficient.
• A formula for r is

• The population correlation coefficient is represented by ρ (rho).


n  xy   x y n is the number
r
2
n  x 2   x
2
n  y 2   y of data pairs

Larson/Farber 4th ed. 12


Correlation Coefficient

• The range of the correlation coefficient is -1 to 1.

-1 0 1
If r = -1 there is If r is close to 0 If r = 1 there is a
a perfect there is no linear perfect positive
negative correlation correlation
correlation

Larson/Farber 4th ed. 13


Linear Correlation
y y

r = 0.91 r = 0.88

x x
Strong negative correlation Strong positive correlation
y y

r = 0.42 r = 0.07

x x
Weak positive correlation Nonlinear Correlation
Larson/Farber 4th ed. 14
Calculating a Correlation Coefficient
In Words In Symbols
1. Find the sum of the x- x
values.
2. Find the sum of the y- y
values.
3. Multiply each x-value by  xy
its corresponding y-value
and find the sum.

Larson/Farber 4th ed. 15


Calculating a Correlation Coefficient
In Words In Symbols
2
4. Square each x-value x
and find the sum.
5. Square each y-value  y2
and find the sum.
6. Use these five sums to n  xy   x y
r
n  x 2   x n  y 2   y
2 2
calculate the
correlation coefficient.

Larson/Farber 4th ed. 16


Example: Finding the Correlation
Coefficient
Calculate the correlation coefficient for
Advertising Company
the advertising expenditures and company
expenses, sales
sales data. What can you conclude?
($1000), x ($1000), y
2.4 225
1.6 184
2.0 220
2.6 240
1.4 180
1.6 184
2.0 186
2.2 215

Larson/Farber 4th ed. 17


Solution: Finding the Correlation
Coefficient

x y xy x2 y2
2.4 225 540 5.76 50,625
1.6 184 294.4 2.56 33,856
2.0 220 440 4 48,400
2.6 240 624 6.76 57,600
1.4 180 252 1.96 32,400
1.6 184 294.4 2.56 33,856
2.0 186 372 4 34,596
2.2 215 473 4.84 46,225
Σx = 15.8 Σy = 1634 Σxy = 3289.8 Σx2 = 32.44 Σy2 = 337,558

Larson/Farber 4th ed. 18


Solution: Finding the Correlation
Coefficient
Σx = 15.8 Σy = 1634 Σxy = 3289.8 Σx2 = 32.44 Σy2 = 337,558
n  xy   x y
r
2 2
n  x   x
2
n  y   y
2

8(3289.8)  15.81634

8(32.44)  15.82 8(337, 558)  1634 2
501.2
  0.9129
9.88 30, 508
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. 19
Example: Using Technology to Find a
Correlation Coefficient
Use a technology tool to calculate Duration
x
Time,
y
Duration
x
Time,
y
the correlation coefficient for the 1.8 56 3.78 79

Old Faithful data. What can you 1.82


1.9
58
62
3.83
3.88
85
80
conclude? 1.93 56 4.1 89
1.98 57 4.27 90
2.05 57 4.3 89
2.13 60 4.43 89
2.3 57 4.47 86
2.37 61 4.53 89
2.82 73 4.55 86
3.13 76 4.6 92
3.27 77 4.63 91
3.65 77    

Larson/Farber 4th ed. 20


Solution: Using Technology to Find a
Correlation Coefficient

To calculate r, you must first enter the


STAT > Calc DiagnosticOn command found in the Catalog menu

r ≈ 0.979 suggests a strong positive correlation.


Larson/Farber 4th ed. 21
Using a Table to Test a Population
Correlation Coefficient ρ
• Once the sample correlation coefficient r has been
calculated, we need to determine whether there is
enough evidence to decide that the population
correlation coefficient ρ is significant at a specified
level of significance.
• Use Table 11 in Appendix B.
• If |r| is greater than the critical value, there is enough
evidence to decide that the correlation coefficient ρ is
significant.

Larson/Farber 4th ed. 22


Using a Table to Test a Population
Correlation Coefficient ρ
• Determine whether ρ is significant for five pairs of
data (n = 5) at a level of significance of α = 0.01.

level of significance
Number of
pairs of data
in sample

• If |r| > 0.959, the correlation is significant. Otherwise,


there is not enough evidence to conclude that the
correlation is significant.

Larson/Farber 4th ed. 23


Using a Table to Test a Population
Correlation Coefficient ρ
In Words In Symbols
1. Determine the number Determine n.
of pairs of data in the
sample.
2. Specify the level of Identify .
significance.
3. Find the critical value. Use Table 11 in
Appendix B.

Larson/Farber 4th ed. 24


Using a Table to Test a Population
Correlation Coefficient ρ
In Words In Symbols
4. Decide if the If |r| > critical value, the
correlation is correlation is significant.
significant. Otherwise, there is not
enough evidence to
support that the
correlation is significant.
5. Interpret the decision
in the context of the
original claim.
Larson/Farber 4th ed. 25
Example: Using a Table to Test a
Population Correlation Coefficient ρ
Using the Old Faithful data, you Duration
x
Time,
y
Duration
x
Time,
y
used 25 pairs of data to find 1.8 56 3.78 79

r ≈ 0.979. Is the correlation 1.82


1.9
58
62
3.83
3.88
85
80
coefficient significant? Use 1.93 56 4.1 89

α = 0.05. 1.98 57 4.27 90


2.05 57 4.3 89
2.13 60 4.43 89
2.3 57 4.47 86
2.37 61 4.53 89
2.82 73 4.55 86
3.13 76 4.6 92
3.27 77 4.63 91
3.65 77    

Larson/Farber 4th ed. 26


Solution: Using a Table to Test a
Population Correlation Coefficient ρ
• n = 25, α = 0.05
• |r| ≈ 0.979 > 0.396
• There is enough evidence at
the 5% level of significance
to conclude that there is a
significant linear
correlation between the
duration of Old Faithful’s
eruptions and the time
between eruptions.
Larson/Farber 4th ed. 27
Hypothesis Testing for a Population
Correlation Coefficient ρ
• A hypothesis test can also be used to determine
whether the sample correlation coefficient r provides
enough evidence to conclude that the population
correlation coefficient ρ is significant at a specified
level of significance.
• A hypothesis test can be one-tailed or two-tailed.

Larson/Farber 4th ed. 28


Hypothesis Testing for a Population
Correlation Coefficient ρ
• Left-tailed test

• Right-tailed test

• Two-tailed test

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. 29


The t-Test for the Correlation Coefficient

• Can be used to test whether the correlation between


two variables is significant.
• The test statistic is r
• The standardized test statistic
r r
t 
r 1 r2
n2
follows a t-distribution with d.f. = n – 2.
• In this text, only two-tailed hypothesis tests for ρ are
considered.

Larson/Farber 4th ed. 30


Using the t-Test for ρ
In Words In Symbols
1. State the null and alternative State H0 and Ha.
hypothesis.
2. Specify the level of Identify .
significance.
3. Identify the degrees of d.f. = n – 2.
freedom.
4. Determine the critical
Use Table 5 in
value(s) and rejection
Appendix B.
region(s).
Larson/Farber 4th ed. 31
Using the t-Test for ρ
In Words In Symbols
r
5. Find the standardized test t
1 r2
statistic. n2

6. Make a decision to reject or If t is in the rejection


fail to reject the null region, reject H0.
hypothesis. Otherwise fail to reject
H 0.
7. Interpret the decision in the
context of the original claim.
Larson/Farber 4th ed. 32
Example: t-Test for a Correlation
Coefficient
Previously you calculated
Advertising Company
r ≈ 0.9129. Test the significance of this
correlation coefficient. Use α = 0.05.
expenses, sales
($1000), x ($1000), y
2.4 225
1.6 184
2.0 220
2.6 240
1.4 180
1.6 184
2.0 186
2.2 215

Larson/Farber 4th ed. 33


Solution: t-Test for a Correlation
Coefficient
• H 0: ρ = 0 • Test Statistic:
• H a: ρ ≠ 0 0.9129
t  5.478
•   0.05 1  (0.9129) 2
• d.f. = 8 – 2 = 6 82
• Rejection Region: • Decision: Reject H0
At the 5% level of significance,
there is enough evidence to
0.025 0.025 conclude that there is a
t significant linear correlation
-2.447 0 2.447
between advertising expenses
5.478 and company sales.
Larson/Farber 4th ed. 34
Correlation and Causation

• The fact that two variables are strongly correlated


does not in itself imply a cause-and-effect
relationship between the variables.
• If there is a significant correlation between two
variables, you should consider the following
possibilities.
1. Is there a direct cause-and-effect relationship
between the variables?
• Does x cause y?

Larson/Farber 4th ed. 35


Correlation and Causation

2. Is there a reverse cause-and-effect relationship


between the variables?
• Does y cause x?
3. Is it possible that the relationship between the
variables can be caused by a third variable or by
a combination of several other variables?
4. Is it possible that the relationship between two
variables may be a coincidence?

Larson/Farber 4th ed. 36


Section 9.1 Summary

• Introduced linear correlation, independent and


dependent variables and the types of correlation
• Found a correlation coefficient
• Tested a population correlation coefficient ρ using a
table
• Performed a hypothesis test for a population
correlation coefficient ρ
• Distinguished between correlation and causation

Larson/Farber 4th ed. 37


Section 9.2

Linear Regression

Larson/Farber 4th ed. 38


Section 9.2 Objectives

• Find the equation of a regression line


• Predict y-values using a regression equation

Larson/Farber 4th ed. 39


Regression lines
• After verifying that the linear correlation between two
variables is significant, next we determine the equation
of the line that best models the data (regression line).
• Can be used to predict the value of y for a given value
of x.

x
Larson/Farber 4th ed. 40
Residuals
Residual
• The difference between the observed y-value and the
predicted y-value for a given x-value on the line.
For a given x-value,
di = (observed y-value) – (predicted y-value)
y
Observed
d 6{
y-value
d4 { }d
d3{ 5

}d2 Predicted
}d1 y-value
x
Larson/Farber 4th ed. 41
Regression Line

Regression line (line of best fit)


• The line for which the sum of the squares of the
residuals is a minimum.
• The equation of a regression line for an independent
variable x and a dependent variable y is
ŷ = mx + b
y-intercept
Predicted Slope
y-value for
a given x-
value
Larson/Farber 4th ed. 42
The Equation of a Regression Line

• ŷ = mx + b where

n  xy   x y y x
m 2 b  y  mx  m
n  x 2   x n n
• y is the mean of the y-values in the data
• x is the mean of the x-values in the data
• The regression line always passes through the point
x, y 

Larson/Farber 4th ed. 43


Example: Finding the Equation of a
Regression Line
Find the equation of the regression Advertising Company
line for the advertising expenditures expenses, sales
and company sales data. ($1000), x ($1000), y
2.4 225
1.6 184
2.0 220
2.6 240
1.4 180
1.6 184
2.0 186
2.2 215

Larson/Farber 4th ed. 44


Solution: Finding the Equation of a
Regression Line
Recall from section 9.1:
x y xy x2 y2
2.4 225 540 5.76 50,625
1.6 184 294.4 2.56 33,856
2.0 220 440 4 48,400
2.6 240 624 6.76 57,600
1.4 180 252 1.96 32,400
1.6 184 294.4 2.56 33,856
2.0 186 372 4 34,596
2.2 215 473 4.84 46,225
Σx = 15.8 Σy = 1634 Σxy = 3289.8 Σx2 = 32.44 Σy2 = 337,558

Larson/Farber 4th ed. 45


Solution: Finding the Equation of a
Regression Line
Σx = 15.8 Σy = 1634 Σxy = 3289.8 Σx2 = 32.44 Σy2 = 337,558

n  xy   x y 8(3289.8)  (15.8)(1634)


m 2  2
n  x   x
2 8(32.44) 15.8
501.2
  50.72874
9.88
1634 15.8
b  y  mx  8  (50.72874) 8
 204.25  (50.72874)(1.975) 104.0607

Equation of the regression line yˆ  50.729 x  104.061


Larson/Farber 4th ed. 46
Solution: Finding the Equation of a
Regression Line
• To sketch the regression line, use any two x-values within
the range of the data and calculate the corresponding y-
values from the regression line.
y
(in thousands of dollars)
Company sales

yˆ  50.729 x  104.061

x
Advertising expenses
(in thousands of dollars)
Larson/Farber 4th ed. 47
Example: Using Technology to Find a
Regression Equation
Use a technology tool to find the Duration
x
Time,
y
Duration
x
Time,
y
equation of the regression line for 1.8 56 3.78 79

the Old Faithful data. 1.82


1.9
58
62
3.83
3.88
85
80
1.93 56 4.1 89
1.98 57 4.27 90
2.05 57 4.3 89
2.13 60 4.43 89
2.3 57 4.47 86
2.37 61 4.53 89
2.82 73 4.55 86
3.13 76 4.6 92
3.27 77 4.63 91
3.65 77    

Larson/Farber 4th ed. 48


Solution: Using Technology to Find a
Regression Equation

100

50
1 5
Larson/Farber 4th ed. 49
Example: Predicting y-Values Using
Regression Equations
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.)
1.1.5 thousand dollars
2.1.8 thousand dollars
3.2.5 thousand dollars

Larson/Farber 4th ed. 50


Solution: Predicting y-Values Using
Regression Equations
ŷ = 50.729x + 104.061
1. 1.5 thousand dollars

ŷ =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. 51


Solution: Predicting y-Values Using
Regression Equations
3. 2.5 thousand dollars
ŷ =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. 52
Section 9.2 Summary

• Found the equation of a regression line


• Predicted y-values using a regression equation

Larson/Farber 4th ed. 53


Section 9.3

Measures of Regression and


Prediction Intervals

Larson/Farber 4th ed. 54


Section 9.3 Objectives

• Interpret the three types of variation about a


regression line
• Find and interpret the coefficient of determination
• Find and interpret the standard error of the estimate
for a regression line
• Construct and interpret a prediction interval for y

Larson/Farber 4th ed. 55


Variation About a Regression Line

• Three types of variation about a regression line


 Total variation
 Explained variation
 Unexplained variation

• To find the total variation, you must first calculate


 The total deviation
 The explained deviation
 The unexplained deviation

Larson/Farber 4th ed. 56


Variation About a Regression Line

Total Deviation = yi  y
Explained Deviation = yˆi  y
Unexplained Deviation = yi  yˆi

y (xi, yi) Unexplained


Total deviation
deviation yi  yˆi
yi  y Explained
(xi, ŷi)
y deviation
(xi, yi)
yˆi  y
x
x
Larson/Farber 4th ed. 57
Variation About a Regression Line

Total variation
• The sum of the squares of the differences between the
y-value of each ordered pair and the mean of y.
2
Total variation =   yi  y 

Explained variation
• The sum of the squares of the differences between
each predicted y-value and the mean of y.
2
Explained variation =   yˆi  y 

Larson/Farber 4th ed. 58


Variation About a Regression Line

Unexplained variation
• The sum of the squares of the differences between the
y-value of each ordered pair and each corresponding
predicted y-value.
2
Unexplained variation =   yi  yˆi

The sum of the explained and unexplained variation is


equal to the total variation.
Total variation = Explained variation + Unexplained variation
Larson/Farber 4th ed. 59
Coefficient of Determination

Coefficient of determination
• The ratio of the explained variation to the total
variation.
• Denoted by r2
2 Explained variation
r 
Total variation

Larson/Farber 4th ed. 60


Example: Coefficient of Determination
The correlation coefficient for the advertising expenses
and company sales data as calculated in Section 9.1 is
r ≈ 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: r 2  (0.913) 2
 0.834
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. 61
The Standard Error of Estimate

Standard error of estimate


• The standard deviation of the observed yi -values
about the predicted ŷ-value for a given xi -value.
• Denoted by se.
( yi  yˆi) 2 n is the number of ordered pairs
se  in the data set
n2
• The closer the observed y-values are to the predicted
y-values, the smaller the standard error of estimate
will be.
Larson/Farber 4th ed. 62
The Standard Error of Estimate
In Words In Symbols
1. Make a table that includes the xi, yi, yˆi, ( yi  yˆi ),
column heading shown. ( yi  yˆi ) 2
2. Use the regression equation to
yˆ  mxi  b
calculate the predicted y-values.
3. Calculate the sum of the squares
of the differences between each ( yi  yˆi ) 2
observed y-value and the
corresponding predicted y-value.
4. Find the standard error of ( yi  yˆi)2
se 
n2
estimate.
Larson/Farber 4th ed. 63
Example: Standard Error of Estimate

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. 64


Solution: Standard Error of Estimate

x y ŷi (yi – ŷ i)2
2.4 225 225.81 (225 – 225.81)2 = 0.6561
1.6 184 185.23 (184 – 185.23)2 = 1.5129
2.0 220 205.52 (220 – 205.52)2 = 209.6704
2.6 240 235.96 (240 – 235.96)2 = 16.3216
1.4 180 175.08 (180 – 175.08)2 = 24.2064
1.6 184 185.23 (184 – 185.23)2 = 1.5129
2.0 186 205.52 (186 – 205.52)2 = 381.0304
2.2 215 215.66 (215 – 215.66)2 = 0.4356
Σ = 635.3463
unexplained variation
Larson/Farber 4th ed. 65
Solution: Standard Error of Estimate

• n = 8, Σ(yi – ŷ i)2 = 635.3463

( yi  yˆi) 2 635.3463
 10.290
se   82
n2

The standard error of estimate of the company sales


for a specific advertising expense is about $10.29.

Larson/Farber 4th ed. 66


Prediction Intervals

• Two variables have a bivariate normal distribution


if for any fixed value of x, the corresponding values
of y are normally distributed and for any fixed values
of y, the corresponding x-values are normally
distributed.

Larson/Farber 4th ed. 67


Prediction Intervals
• A prediction interval can be constructed for the true
value of y.
• Given a linear regression equation ŷ = mx + b and x0, a
specific value of x, a c-prediction interval for y is
ŷ–E<y<ŷ +E where
1 n(x0  x )2
E  tcse 1  
n n  x 2  ( x) 2
• The point estimate is ŷ and the margin of error is E. The
probability that the prediction interval contains y is c.

Larson/Farber 4th ed. 68


Constructing a Prediction Interval for y
for a Specific Value of x
In Words In Symbols
1. Identify the number of ordered d.f. = n – 2
pairs in the data set n and the
degrees of freedom.
2. Use the regression equation and yˆi  mxi  b
the given x-value to find the
point estimate ŷ.
3. Find the critical value tc that Use Table 5 in
corresponds to the given level of Appendix B.
confidence c.
Larson/Farber 4th ed. 69
Constructing a Prediction Interval for y
for a Specific Value of x
In Words In Symbols
4. Find the standard error of ( yi  yˆi) 2
se 
estimate se. n2
1 n(x0  x ) 2
5. Find the margin of error E. E  tcse 1  
n n  x 2  ( x)2

6. Find the left and right Left endpoint: ŷ – E


endpoints and form the Right endpoint: ŷ + E
prediction interval. Interval: ŷ – E < y < ŷ + E

Larson/Farber 4th ed. 70


Example: Constructing a Prediction
Interval
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
x  15.8, x 2  32.44, x  1.975
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. 71
Solution: Constructing a Prediction
Interval
1 n(x0  x ) 2
E  tcse 1  
n n  x 2  ( x) 2

1 8(2.1  1.975) 2
 (2.447)(10.290) 1    26.857
8 8(32.44)  (15.8) 2

Left Endpoint: ŷ – E Right Endpoint: ŷ + E


210.592 – 26.857 210.592 + 26.857
≈ 183.735 ≈ 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. 72
Section 9.3 Summary

• Interpreted the three types of variation about a


regression line
• Found and interpreted the coefficient of
determination
• Found and interpreted the standard error of the
estimate for a regression line
• Constructed and interpreted a prediction interval for y

Larson/Farber 4th ed. 73


Section 9.4

Multiple Regression

Larson/Farber 4th ed. 74


Section 9.4 Objectives

• Use technology to find a multiple regression


equation, the standard error of estimate and the
coefficient of determination
• Use a multiple regression equation to predict y-values

Larson/Farber 4th ed. 75


Multiple Regression Equation

• In many instances, a better prediction can be found


for a dependent (response) variable by using more
than one independent (explanatory) variable.
• For example, a more accurate prediction for the
company sales discussed in previous sections might
be made by considering the number of employees on
the sales staff as well as the advertising expenses.

Larson/Farber 4th ed. 76


Multiple Regression Equation

Multiple regression equation


• ŷ = b + m1x1 + m2x2 + m3x3 + … + mkxk
• x1, x2, x3,…, xk are independent variables
• b is the y-intercept
• y is the dependent variable

* Because the mathematics associated with this concept is


complicated, technology is generally used to calculate the
multiple regression equation.

Larson/Farber 4th ed. 77


Example: Finding a Multiple Regression
Equation
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. 78


Example: Finding a Multiple Regression
Equation

Employment Experience Education


Employee Salary, y (yrs), x1 (yrs), x2 (yrs), x3
A 57,310 10 2 16
B 57,380 5 6 16
C 54,135 3 1 12
D 56,985 6 5 14
E 58,715 8 8 16
F 60,620 20 0 12
G 59,200 8 4 18
H 60,320 14 6 17

Larson/Farber 4th ed. 79


Solution: Finding a Multiple Regression
Equation
• Enter the y-values in C1 and the x1-, x2-, and x3-values
in C2, C3 and C4 respectively.
• Select “Regression > Regression…” from the Stat
menu.
• Use the salaries as the response variable and the
remaining data as the predictors.

Larson/Farber 4th ed. 80


Solution: Finding a Multiple Regression
Equation

The regression equation is


ŷ = 49,764 + 364x1 + 228x2 + 267x3
Larson/Farber 4th ed. 81
Predicting y-Values

• After finding the equation of the multiple regression


line, you can use the equation to predict y-values over
the range of the data.
• To predict y-values, substitute the given value for
each independent variable into the equation, then
calculate ŷ.

Larson/Farber 4th ed. 82


Example: Predicting y-Values

Use the regression equation


ŷ = 49,764 + 364x1 + 228x2 + 267x3
to 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. 83


Section 9.4 Summary

• Used technology to find a multiple regression


equation, the standard error of estimate and the
coefficient of determination
• Used a multiple regression equation to predict y-
values

Larson/Farber 4th ed. 84

You might also like