Chapter 12 Inference for Linear Regression
Reminder of Linear Regression First thing you should do is examine your data… First thing you should do is examine your data… Look at your scatterplot. Does it appear linear? Are there outliers? What direction is it going in? Is there a strong relationship? Look at your scatterplot. Does it appear linear? Are there outliers? What direction is it going in? Is there a strong relationship? LSR: y-hat = a + bx LSR: y-hat = a + bx a = y-intercept; b= slope a = y-intercept; b= slope Slope is the rate of change in y for every one x. Slope is the rate of change in y for every one x.
Statistics versus parameters a and b are statistics (estimates of y-intercept and slope). a and b are statistics (estimates of y-intercept and slope). α and β are unknown parameters α and β are unknown parameters a is an unbiased estimator of α and b is an unbiased estimator of β a is an unbiased estimator of α and b is an unbiased estimator of β
We are interested in β We are going to look at inference for β (slope). We are going to look at inference for β (slope). Confidence Intervals and Hypothesis tests. Confidence Intervals and Hypothesis tests.
Confidence Intervals These will be t-tests These will be t-tests What is the basic formula for confidence intervals? What is the basic formula for confidence intervals? Estimate +/- margin of error Estimate +/- margin of error Estimate +/- t-statistic*Standard Error Estimate +/- t-statistic*Standard Error For inference for the true mean slope (β) For inference for the true mean slope (β) b +/- t*(SE) b +/- t*(SE)
Standard Error and DF You will either be given this information or you can get your calculator to give it to you! You will either be given this information or you can get your calculator to give it to you! Degrees of freedom = n – 2 Degrees of freedom = n – 2 Why? Why?
Computer Output Look on page 745 with me! Look on page 745 with me! Remember, under coefficient… Remember, under coefficient… Constant = y-intercept Constant = y-intercept Variable definition = slope Variable definition = slope Standard error is the second row under STDev Standard error is the second row under STDev
Example The local utility company surveys 101 randomly selected customers. For each survey participant, the company collects the following: annual electric bill (in dollars) and home size (in square feet). Output from a regression analysis appears on the next slide The local utility company surveys 101 randomly selected customers. For each survey participant, the company collects the following: annual electric bill (in dollars) and home size (in square feet). Output from a regression analysis appears on the next slide
Example Find and interpret the slope and y-intercept in this situation. Find and interpret the slope and y-intercept in this situation. Construct a 95% confidence interval for the slope. Construct a 95% confidence interval for the slope.
The sentence Your answer for the context in your sentence… the true slope of the population regression line relating (insert context). Your answer for the context in your sentence… the true slope of the population regression line relating (insert context).
Hypothesis Tests Generally, Generally, H 0 : β = 0 H 0 : β = 0 This says that the true slope is zero, which means there is no change in y. This can be different if the context of the problem would mean that no change is not zero… This says that the true slope is zero, which means there is no change in y. This can be different if the context of the problem would mean that no change is not zero…
Calculator! Put your data in List 1 and List 2 Put your data in List 1 and List 2 In your calculator, you go to LinRegTTest under Stat, Test In your calculator, you go to LinRegTTest under Stat, Test
Example Infants who cry easily may be more easily stimulated than others. This may be a sign of higher IQ. Child development researchers explored the relationship between crying of infants 4 to 10 days old and their later IQ scores. A snap of a rubber band on the sole of the foot caused the infants to cry. The researchers recorded the crying and measured its intensity by the number of peaks in the most active 20 seconds. They later measured the children’s IQ at age three years using the Stanford-Binet IQ test. Infants who cry easily may be more easily stimulated than others. This may be a sign of higher IQ. Child development researchers explored the relationship between crying of infants 4 to 10 days old and their later IQ scores. A snap of a rubber band on the sole of the foot caused the infants to cry. The researchers recorded the crying and measured its intensity by the number of peaks in the most active 20 seconds. They later measured the children’s IQ at age three years using the Stanford-Binet IQ test.
Crying IQ The Data Crying IQ Crying IQ Crying IQ Crying3122 IQ135157
Conditions Observations are independent Observations are independent You don’t observe the same person multiple times You don’t observe the same person multiple times The true relationship is linear The true relationship is linear Check residual plot for scatter. Look at scatter plot. Check residual plot for scatter. Look at scatter plot.
Conditions Continued The spread is uniform The spread is uniform The residual plot does not have a cone like appearance. The residual plot does not have a cone like appearance. The residuals have a normal distribution. The residuals have a normal distribution. Graph residuals Graph residuals
Residuals Since almost all the conditions deal with residuals, we should probably review Since almost all the conditions deal with residuals, we should probably review Residual = observed – predicted Residual = observed – predicted y – (y-hat) y – (y-hat) In you calculator: Define L3 as L2 – Y1(L1) In you calculator: Define L3 as L2 – Y1(L1) You can look at a scatter plot of L1 vs. L3 to see residual plot. You can look at a scatter plot of L1 vs. L3 to see residual plot. To determine normality, look at a histogram of L3 To determine normality, look at a histogram of L3
Example of Ohio State University Check your conditions for the previous problem. Check your conditions for the previous problem. Let’s finish the problem now. Let’s finish the problem now.
Example of when H 0 is not β = 0
You have now finished all of your AP Statistics Course work!!!!!!!