agresti/franklin statistics, 1 of 88 chapter 11 analyzing association between quantitative...

93
Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis to explore the association between two quantitative variables

Upload: phoebe-benson

Post on 22-Dec-2015

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 1 of 88

Chapter 11Analyzing Association Between Quantitative

Variables: Regression Analysis

Learn….

To use regression analysis to explore the association between two quantitative variables

Page 2: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 2 of 88

Section 11.1

How Can We “Model” How Two Variables Are Related?

Page 3: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 3 of 88

Regression Analysis

The first step of a regression analysis is to identify the response and explanatory variables

• We use y to denote the response variable

• We use x to denote the explanatory variable

Page 4: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 4 of 88

The Scatterplot

The first step in answering the question of association is to look at the data

A scatterplot is a graphical display of the relationship between two variables

Page 5: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 5 of 88

Example: What Do We Learn from a Scatterplot in the Strength Study?

An experiment was designed to measure the strength of female athletes

The goal of the experiment was to find the maximum number of pounds that each individual athlete could bench press

Page 6: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 6 of 88

Example: What Do We Learn from a Scatterplot in the Strength Study?

57 high school female athletes participated in the study

The data consisted of the following variables:• x: the number of 60-pound bench presses

an athlete could do

• y: maximum bench press

Page 7: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 7 of 88

Example: What Do We Learn from a Scatterplot in the Strength Study?

For the 57 girls in this study, these variables are summarized by:

• x: mean = 11.0, st.deviation = 7.1

• y: mean = 79.9 lbs, st.dev. = 13.3 lbs

Page 8: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 8 of 88

Example: What Do We Learn from a Scatterplot in the Strength Study?

Page 9: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 9 of 88

The Regression Line Equation

When the scatterplot shows a linear trend, a straight line fitted through the data points describes that trend

The regression line is:

is the predicted value of the response variable y

is the y-intercept and is the slope

bxay ˆy

a b

Page 10: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 10 of 88

Example: Which Regression Line Predicts Maximum Bench Press?

Page 11: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 11 of 88

Example: What Do We Learn from a Scatterplot in the Strength Study?

The MINITAB output shows the following regression equation:

BP = 63.5 + 1.49 (BP_60)

The y-intercept is 63.5 and the slope is 1.49 The slope of 1.49 tells us that predicted

maximum bench press increases by about 1.5 pounds for every additional 60-pound bench press an athlete can do

Page 12: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 12 of 88

Outliers

Check for outliers by plotting the data

The regression line can be pulled toward an outlier and away from the general trend of points

Page 13: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 13 of 88

Influential Points

An observation can be influential in affecting the regression line when two thing happen:• Its x value is low or high compared to the

rest of the data

• It does not fall in the straight-line pattern that the rest of the data have

Page 14: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 14 of 88

Residuals are Prediction Errors

The regression equation is often called a prediction equation

The difference between an observed outcome and its predicted value is the prediction error, called a residual

Page 15: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 15 of 88

Residuals

Each observation has a residual

A residual is the vertical distance between the data point and the regression line

Page 16: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 16 of 88

Residuals We can summarize how near the

regression line the data points fall by

The regression line has the smallest sum of squared residuals and is called the least squares line

22 )ˆ()(

yyresiduals

residualssquaredofsum

Page 17: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 17 of 88

Regression Model: A Line Describes How the Mean of y Depends on x

At a given value of x, the equation:

Predicts a single value of the response variable

But… we should not expect all subjects at that value of x to have the same value of y

• Variability occurs in the y values

bxay ˆ

Page 18: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 18 of 88

The Regression Line

The regression line connects the estimated means of y at the various x values

In summary,

Describes the relationship between x and the estimated means of y at the various values of x

bxay ˆ

Page 19: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 19 of 88

The Population Regression Equation

The population regression equation describes the relationship in the population between x and the means of y

The equation is:

xy

Page 20: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 20 of 88

The Population Regression Equation

In the population regression equation, α is a population y-intercept and β is a population slope• These are parameters

In practice we estimate the population regression equation using the prediction equation for the sample data

Page 21: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 21 of 88

The Population Regression Equation

The population regression equation merely approximates the actual relationship between x and the population means of y

It is a model

A model is a simple approximation for how variable relate in the population

Page 22: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 22 of 88

The Regression Model

Page 23: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 23 of 88

The Regression Model

If the true relationship is far from a straight line, this regression model may be a poor one

Page 24: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 24 of 88

Variability about the Line

At each fixed value of x, variability occurs in the y values around their mean, µy

The probability distribution of y values at a fixed value of x is a conditional distribution

At each value of x, there is a conditional distribution of y values

An additional parameter σ describes the standard deviation of each conditional distribution

Page 25: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 25 of 88

A Statistical Model

A statistical model never holds exactly in practice.

It is merely a simple approximation for reality

Even though it does not describe reality exactly, a model is useful if the true relationship is close to what the model predicts

Page 26: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 26 of 88

Find the predicted fertility for Vietnam, which had the highest value of x = 91.

a. 5.25b. 469.2c. 1.196d. 10.73

For recent data on several nations, the prediction equation relating y = fertility rate to x = female economic activity (the female labor force as a percentage of the male labor force) is:

ˆ 5.2 0.044y x

Page 27: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 27 of 88

Find the residual for Vietnam, which had y = 2.3.

a. -2.136b. 1.104c. -1.104d. 2.136

For recent data on several nations, the prediction equation relating y = fertility rate to x = female economic activity (the female labor force as a percentage of the male labor force) is:

ˆ 5.2 0.044y x

Page 28: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 28 of 88

Section 11.2

How Can We Describe Strength of Association?

Page 29: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 29 of 88

Correlation

The correlation, denoted by r, describes linear association

The correlation ‘r’ has the same sign as the slope ‘b’

The correlation ‘r’ always falls between -1 and +1

The larger the absolute value of r, the stronger the linear association

Page 30: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 30 of 88

Correlation and Slope

We can’t use the slope to describe the strength of the association between two variables because the slope’s numerical value depends on the units of measurement

Page 31: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 31 of 88

Correlation and Slope

The correlation is a standardized version of the slope

The correlation does not depend on units of measurement

Page 32: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 32 of 88

Correlation and Slope

The correlation and the slope are related in the following way:

y

x

s

sbr

Page 33: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 33 of 88

Example: What’s the Correlation for Predicting Strength?

For the female athlete strength study:• x: number of 60-pound bench presses

• y: maximum bench press

• x: mean = 11.0, st.dev.=7.1

• y: mean= 79.9 lbs., st.dev. = 13.3 lbs.

Regression equation:

xy 49.15.63ˆ

Page 34: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 34 of 88

Example: What’s the Correlation for Predicting Strength?

The variables have a strong, positive association

80.0)3.13

1.7(49.1)(

y

x

s

sbr

Page 35: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 35 of 88

The Squared Correlation

Another way to describe the strength of association refers to how close predictions for y tend to be to observed y values

The variables are strongly associated if you can predict y much better by substituting x values into the prediction equation than by merely using the sample mean y and ignoring x

Page 36: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 36 of 88

The Squared Correlation

Consider the prediction error: the difference between the observed and predicted values of y

• Using the regression line to make a prediction, each error is:

• Using only the sample mean, y, to make a prediction, each error is:

yy ˆ

yy

Page 37: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 37 of 88

The Squared Correlation

When we predict y using y (that is, ignoring x), the error summary equals:

This is called the total sum of squares

2)( yy

Page 38: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 38 of 88

The Squared Correlation

When we predict y using x with the regression equation, the error summary is:

This is called the residual sum of squares

2)ˆ( yy

Page 39: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 39 of 88

The Squared Correlation

When a strong linear association exists, the regression equation predictions tend to be much better than the predictions using y

We measure the proportional reduction in error and call it, r2

Page 40: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 40 of 88

The Squared Correlation

We use the notation r2 for this measure because it equals the square of the correlation r

2

22

2

)(

)ˆ()(

yy

yyyyr

Page 41: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 41 of 88

Example: What Does r2 Tell Us in the Strength Study?

For the female athlete strength study:• x: number of 60-pund bench presses

• y: maximum bench press

• The correlation value was found to be r = 0.80

We can calculate r2 from r: (0.80)2=0.64

For predicting maximum bench press, the regression equation has 64% less error than y has

Page 42: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 42 of 88

Correlation r and Its Square r2

Both r and r2 describe the strength of association

‘r’ falls between -1 and +1• It represents the slope of the regression line when

x and y have been standardized

‘r2’ falls between 0 and 1• It summarizes the reduction in sum of squared

errors in predicting y using the regression line instead of using y

Page 43: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 43 of 88

Find the predicted math SAT score for a student who has the verbal SAT score of 800.

a. 250b. 500c. 650d. 750

All Students who attend Lake Woebegone College must take the math and verbal SAT exams. Both exams have a mean of 500 and a standard deviation of 100. The regression equation relating y = math SAT score and x = verbal SAT score is:

ˆ 250 0.5y x

Page 44: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 44 of 88

Find the r-value.

a. .5b. .25c. 1.00d. .75

All Students who attend Lake Woebegone College must take the math and verbal SAT exams. Both exams have a mean of 500 and a standard deviation of 100. The regression equation relating y = math SAT score and x = verbal SAT score is:

ˆ 250 0.5y x

Page 45: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 45 of 88

Find the r2 value.

a. .5b. .25c. 1.00d. .75

All Students who attend Lake Woebegone College must take the math and verbal SAT exams. Both exams have a mean of 500 and a standard deviation of 100. The regression equation relating y = math SAT score and x = verbal SAT score is:

ˆ 250 0.5y x

Page 46: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 46 of 88

Section 11.3

How Can We make Inferences About the Association?

Page 47: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 47 of 88

Descriptive and Inferential Parts of Regression

The sample regression equation, r, and r2 are descriptive parts of a regression analysis

The inferential parts of regression use the tools of confidence intervals and significance tests to provide inference about the regression equation, the correlation and r-squared in the population of interest

Page 48: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 48 of 88

Assumptions for Regression Analysis

Basic assumption for using regression line for description:

• The population means of y at different values of x have a straight-line relationship with x, that is:

• This assumption states that a straight-line regression model is valid

• This can be verified with a scatterplot.

xy

Page 49: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 49 of 88

Assumptions for Regression Analysis

Extra assumptions for using regression to make statistical inference:• The data were gathered using

randomization

• The population values of y at each value of x follow a normal distribution, with the same standard deviation at each x value

Page 50: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 50 of 88

Assumptions for Regression Analysis

Models, such as the regression model, merely approximate the true relationship between the variables

A relationship will not be exactly linear, with exactly normal distributions for y at each x and with exactly the same standard deviation of y values at each x value

Page 51: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 51 of 88

Testing Independence between Quantitative Variables

Suppose that the slope β of the regression line equals 0

Then…

• The mean of y is identical at each x value

• The two variables, x and y, are statistically independent:• The outcome for y does not depend on the value of

x

• It does not help us to know the value of x if we want to predict the value of y

Page 52: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 52 of 88

Testing Independence between Quantitative Variables

Page 53: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 53 of 88

Testing Independence between Quantitative Variables

Steps of Two-Sided Significance Test about a Population Slope β:

1. Assumptions:• The population satisfies regression line:

• Randomization

• The population values of y at each value of x follow a normal distribution, with the same standard deviation at each x value

xy

Page 54: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 54 of 88

Testing Independence between Quantitative Variables

Steps of Two-Sided Significance Test about a Population Slope β:

2. Hypotheses:

H0: β = 0, Ha: β ≠ 0

3. Test statistic:

Software supplies sample slope b and its se

se

bt

0

Page 55: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 55 of 88

Testing Independence between Quantitative Variables

Steps of Two-Sided Significance Test about a Population Slope β:

4. P-value: Two-tail probability of t test statistic value more extreme than observed:

Use t distribution with df = n-2

5. Conclusions: Interpret P-value in context

• If decision needed, reject H0 if P-value ≤ significance level

Page 56: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 56 of 88

Example: Is Strength Associated with 60-Pound Bench Press?

Page 57: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 57 of 88

Example: Is Strength Associated with 60-Pound Bench Press?

Conduct a two-sided significance test of the null hypothesis of independence

Assumptions:• A scatterplot of the data revealed a linear trend so

the straight-line regression model seems appropriate

• The scatter of points have a similar spread at different x values

• The sample was a convenience sample, not a random sample, so this is a concern

Page 58: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 58 of 88

Example: Is Strength Associated with 60-Pound Bench Press?

Hypotheses: H0: β = 0, Ha: β ≠ 0

Test statistic:

P-value: 0.000 Conclusion: An association exists between the

number of 60-pound bench presses and maximum bench press

96.9150.0

)049.1(0 se

bt

Page 59: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 59 of 88

A Confidence Interval for β

A small P-value in the significance test of H0: β = 0 suggests that the population regression line has a nonzero slope

To learn how far the slope β falls from 0, we construct a confidence interval:

2 with )(025.

ndfsetb

Page 60: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 60 of 88

Example: Estimating the Slope for Predicting Maximum Bench Press

Construct a 95% confidence interval for β

Based on a 95% CI, we can conclude, on average, the maximum bench press increases by between 1.2 and 1.8 pounds for each additional 60-pound bench press that an athlete can do

1.8) (1.2,or 0.301.49

:is which )150.0(00.249.1

Page 61: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 61 of 88

Example: Estimating the Slope for Predicting Maximum Bench Press

Let’s estimate the effect of a 10-unit increase in x:• Since the 95% CI for β is (1.2, 1.8), the

95% CI for 10β is (12, 18)

• On the average, we infer that the maximum bench press increases by at least 12 pounds and at most 18 pounds, for an increase of 10 in the number of 60-pound bench presses

Page 62: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 62 of 88

Section 11.4

What Do We Learn from How the Data Vary Around the

Regression Line?

Page 63: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 63 of 88

Residuals and Standardized Residuals

A residual is a prediction error – the difference between an observed outcome and its predicted value• The magnitude of these residuals depends

on the units of measurement for y

A standardized version of the residual does not depend on the units

Page 64: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 64 of 88

Standardized Residuals

Standardized residual:

The se formula is complex, so we rely on software to find it

A standardized residual indicates how many standard errors a residual falls from 0

Often, observations with standardized residuals larger than 3 in absolute value represent outliers

)ˆ(

)ˆ(

yyse

yy

Page 65: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 65 of 88

Example: Detecting an Underachieving College Student

Data was collected on a sample of 59 students at the University of Georgia

Two of the variables were:• CGPA: College Grade Point Average

• HSGPA: High School Grade Point Average

Page 66: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 66 of 88

Example: Detecting an Underachieving College Student

A regression equation was created from the data:

• x: HSGPA

• y: CGPA

Equation: xy 64.019.1ˆ

Page 67: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 67 of 88

Example: Detecting an Underachieving College Student

MINITAB highlights observations that have standardized residuals with absolute value larger than 2:

Page 68: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 68 of 88

Example: Detecting an Underachieving College Student

Consider the reported standardized residual of -3.14

• This indicates that the residual is 3.14 standard errors below 0

• This student’s actual college GPA is quite far below what the regression line predicts

Page 69: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 69 of 88

Analyzing Large Standardized Residuals

Does it fall well away from the linear trend that the other points follow?

Does it have too much influence on the results?

Note: Some large standardized residuals may occur just because of ordinary random variability

Page 70: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 70 of 88

Histogram of Residuals

A histogram of residuals or standardized residuals is a good way of detecting unusual observations

A histogram is also a good way of checking the assumption that the conditional distribution of y at each x value is normal• Look for a bell-shaped histogram

Page 71: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 71 of 88

Histogram of Residuals

Suppose the histogram is not bell-shaped: • The distribution of the residuals is not

normal

However….

• Two-sided inferences about the slope parameter still work quite well

• The t- inferences are robust

Page 72: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 72 of 88

The Residual Standard Deviation

For statistical inference, the regression model assumes that the conditional distribution of y at a fixed value of x is normal, with the same standard deviation at each x

This standard deviation, denoted by σ, refers to the variability of y values for all subjects with the same x value

Page 73: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 73 of 88

The Residual Standard Deviation

The estimate of σ, obtained from the data, is:

2

)ˆ( 2

n

yys

Page 74: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 74 of 88

Example: How Variable are the Athletes’ Strengths?

From MINITAB output, we obtain s, the residual standard deviation of y:

For any given x value, we estimate the mean y value using the regression equation and we estimate the standard deviation using s: s = 8.0

0.855

8.3522 s

Page 75: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 75 of 88

Confidence Interval for µy

We estimate µy, the population mean of y

at a given value of x by:

We can construct a 95 %confidence interval for µy using:

bxay ˆ

)ˆ (ˆ025.

yofsety

Page 76: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 76 of 88

Prediction Interval for y

The estimate for the mean of y at a fixed value of x is also a prediction for an individual outcome y at the fixed value of x

Most regression software will form this interval within which an outcome y is likely to fall• This is called a prediction interval for y

bxay ˆ

Page 77: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 77 of 88

Prediction Interval for y vs Confidence Interval for µy

The prediction interval for y is an inference about where individual observations fall

• Use a prediction interval for y if you want to predict where a single observation on y will fall for a particular x value

Page 78: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 78 of 88

Prediction Interval for y vs Confidence Interval for µy

The confidence interval for µy is an

inference about where a population mean falls

• Use a confidence interval for µy if you want

to estimate the mean of y for all individuals having a particular x value

Page 79: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 79 of 88

Example: Predicting Maximum Bench Press and Estimating its Mean

Page 80: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 80 of 88

Example: Predicting Maximum Bench Press and Estimating its Mean

Use the MINITAB output to find and interpret a 95% CI for the population mean of the maximum bench press values for all female high school athletes who can do x = 11 sixty-pound bench presses

For all female high school athletes who can do 11 sixty-pound bench presses, we estimate the mean of their maximum bench press values falls between 78 and 82 pounds

Page 81: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 81 of 88

Example: Predicting Maximum Bench Press and Estimating its Mean

Use the MINITAB output to find and interpret a 95% Prediction Interval for a single new observation on the maximum bench press for a randomly chosen female high school athlete who can do x = 11 sixty-pound bench presses

For all female high school athletes who can do 11 sixty-pound bench presses, we predict that 95% of them have maximum bench press values between 64 and 96 pounds

Page 82: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 82 of 88

Section 11.5

Exponential Regression: A Model for Nonlinearity

Page 83: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 83 of 88

Nonlinear Regression Models

If a scatterplot indicates substantial curvature in a relationship, then equations that provide curvature are needed

• Occasionally a scatterplot has a parabolic appearance: as x increases, y increases then it goes back down

• More often, y tends to continually increase or continually decrease but the trend shows curvature

Page 84: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 84 of 88

Example: Exponential Growth in Population Size

Since 2000, the population of the U.S. has been growing at a rate of 2% a year

• The population size in 2000 was 280 million

• The population size in 2001 was 280 x 1.02

• The population size in 2002 was 280 x (1.02)2

• …

• The population size in 2010 is estimated to be

• 280 x (1.02)10

• This is called exponential growth

Page 85: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 85 of 88

Exponential Regression Model

An exponential regression model has the formula:

For the mean µy of y at a given value of x, where α and β are parameters

x

y

Page 86: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 86 of 88

Exponential Regression Model

In the exponential regression equation, the explanatory variable x appears as the exponent of a parameter

The mean µy and the parameter β can take only positive values

As x increases, the mean µy increases when β>1

It continually decreases when 0 < β<1

Page 87: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 87 of 88

Exponential Regression Model

For exponential regression, the logarithm of the mean is a linear function of x

When the exponential regression model holds, a plot of the log of the y values versus x should show an approximate straight-line relation with x

Page 88: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 88 of 88

Example: Explosion in Number of People Using the Internet

Page 89: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 89 of 88

Example: Explosion in Number of People Using the Internet

Page 90: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 90 of 88

Example: Explosion in Number of People Using the Internet

Page 91: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 91 of 88

Example: Explosion in Number of People Using the Internet

Using regression software, we can create the exponential regression equation:

x: the number of years since 1995. Start with x = 0 for 1995, then x=1 for 1996, etc

y: number of internet users

Equation: xy )7708.1(38.20ˆ

Page 92: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 92 of 88

Interpreting Exponential Regression Models

In the exponential regression model,

the parameter α represents the mean value of y when x = 0;

The parameter β represents the multiplicative effect on the mean of y for a one-unit increase in x

x

y

Page 93: Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis

Agresti/Franklin Statistics, 93 of 88

Example: Explosion in Number of People Using the Internet

In this model:

The predicted number of Internet users in 1995 (for which x = 0) is 20.38 million

The predicted number of Internet users in 1996 is 20.38 times 1.7708

xy )7708.1(38.20ˆ