chapter 12 inference for linear regression. reminder of linear regression first thing you should do...

Post on 19-Jan-2016

217 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Chapter 12Chapter 12

Inference for Linear RegressionInference for Linear Regression

Reminder of Linear Reminder of Linear RegressionRegression First thing you should do is First thing you should do is

examine your data…examine your data… Look at your scatterplot. Does it Look at your scatterplot. Does it

appear linear? Are there outliers? appear linear? Are there outliers? What direction is it going in? Is What direction is it going in? Is there a strong relationship?there a strong relationship?

LSR: y-hat = a + bxLSR: y-hat = a + bx a = y-intercept; b= slopea = y-intercept; b= slope Slope is the rate of change in y for Slope is the rate of change in y for

every one x.every one x.

Statistics versus parametersStatistics versus parameters

a and b are statistics (estimates a and b are statistics (estimates of y-intercept and slope).of y-intercept and slope).

αα and and ββ are unknown are unknown parametersparameters

a is an unbiased estimator of a is an unbiased estimator of αα and b is an unbiased estimator and b is an unbiased estimator of of ββ

We are interested in We are interested in ββ

We are going to look at We are going to look at inference for inference for ββ (slope). (slope). Confidence Intervals and Confidence Intervals and

Hypothesis tests. Hypothesis tests.

Confidence IntervalsConfidence Intervals

These will be t-testsThese will be t-tests What is the basic formula for What is the basic formula for

confidence intervals?confidence intervals? Estimate +/- margin of errorEstimate +/- margin of error Estimate +/- t-statistic*Standard Estimate +/- t-statistic*Standard

ErrorError For inference for the true mean For inference for the true mean

slope (slope (ββ)) b +/- t*(SE) b +/- t*(SE)

Standard Error and DFStandard Error and DF

You will either be given this You will either be given this information or you can get your information or you can get your calculator to give it to you!calculator to give it to you!

Degrees of freedom = n – 2Degrees of freedom = n – 2 Why?Why?

Computer OutputComputer Output

Look with me pg 770Look with me pg 770 Remember, under coefficient…Remember, under coefficient…

Constant = y-interceptConstant = y-intercept Variable definition = slopeVariable definition = slope

Standard error is the second Standard error is the second row under STDevrow under STDev

Hypothesis TestsHypothesis Tests

Generally, Generally, HH00 = 0 = 0

This says that the true slope is zero, This says that the true slope is zero, which means there is no change in y. which means there is no change in y. This can be different if the context of This can be different if the context of the problem would mean that no the problem would mean that no change is not zero…change is not zero…

Calculator!Calculator!

Put your data in List 1 and List 2Put your data in List 1 and List 2 In your calculator, you go to In your calculator, you go to

LinRegTTest under Stat, TestLinRegTTest under Stat, Test

Example Example

How well does the number of How well does the number of beers a student drinks predict beers a student drinks predict his or her blood alcohol level? his or her blood alcohol level? Sixteen student volunteers at Sixteen student volunteers at Ohio State University drank a Ohio State University drank a randomly assigned number of randomly assigned number of cans of beer. Thirty minutes cans of beer. Thirty minutes later, a police officer measured later, a police officer measured their blood alcohol content their blood alcohol content (BAC).(BAC).

The DataThe Data

StudentStudent 11 22 33 44 55 66 77 88

BeersBeers 55 22 99 88 33 77 33 55

BACBAC 0.100.10 0.030.03 0.190.19 0.120.12 0.040.04 0.090.0955

0.070.07 0.060.06

StudentStudent 99 1010 1111 1212 1313 1414 1515 1616

BeersBeers 33 55 44 66 55 77 11 44

BACBAC 0.020.02 0.050.05 0.070.07 0.100.10 0.080.0855

0.090.09 0.010.01 0.050.05

ConditionsConditions

Observations are independentObservations are independent You don’t observe the same You don’t observe the same

person multiple timesperson multiple times The true relationship is linearThe true relationship is linear

Check residual plot for scatter. Check residual plot for scatter. Look at scatter plot.Look at scatter plot.

Conditions ContinuedConditions Continued

The spread is uniformThe spread is uniform The residual plot does not have a The residual plot does not have a

cone like appearance.cone like appearance. The residuals have a normal The residuals have a normal

distribution.distribution. Graph residualsGraph residuals

ResidualsResiduals

Since almost all the conditions deal Since almost all the conditions deal with residuals, we should probably with residuals, we should probably reviewreview

Residual = observed – predictedResidual = observed – predicted y – (y-hat)y – (y-hat)

In you calculator: Define L3 as L2 – In you calculator: Define L3 as L2 – Y1(L1)Y1(L1)

You can look at a scatter plot of L1 You can look at a scatter plot of L1 vs. L3 to see residual plot.vs. L3 to see residual plot.

To determine normality, look at a To determine normality, look at a histogram of L3histogram of L3

Example of Ohio State Example of Ohio State UniversityUniversity

Check your conditions for the Check your conditions for the previous problem.previous problem.

Let’s finish the problem now.Let’s finish the problem now.

Example of when HExample of when H00 is not is not ββ = 0 = 0

Homework:Homework: Read Chapter 12. Do questions Read Chapter 12. Do questions

#9, 10, 14, 18, MC 21-#9, 10, 14, 18, MC 21-26(explain)26(explain)

You have now You have now finished all of your finished all of your

AP Statistics AP Statistics Course work!!!!!!!Course work!!!!!!!

top related