29
Linear regression Linear regression T-test T-test Your last test !! Your last test !!

Linear regression T-test

Embed Size (px)

DESCRIPTION

Linear regression T-test. Your last test !!. Crying and IQ. - PowerPoint PPT Presentation

Citation preview

Page 1: Linear regression T-test

Linear regression T-Linear regression T-testtestYour last test !!Your last test !!

Page 2: Linear regression T-test

Crying and IQCrying and IQ

Infants who cry easily may be more Infants who cry easily may be more stimulated than others. This may be a stimulated than others. This may be a sign of higher IQ. Researchers recorded sign of higher IQ. Researchers recorded the crying of 38 infants and measured the crying of 38 infants and measured its intensity by the number of peaks in its intensity by the number of peaks in the most active 20 seconds. They later the most active 20 seconds. They later measured the children’s IQ at age measured the children’s IQ at age three years using the Stanford-Binet IQ three years using the Stanford-Binet IQ testtest..

Page 3: Linear regression T-test
Page 4: Linear regression T-test

How good does this How good does this line fit the data?line fit the data?

What are some things that determine how What are some things that determine how good the line fits the data?good the line fits the data? R^2R^2 The residual plot.The residual plot. Any obvious curvature in the data?Any obvious curvature in the data?

Page 5: Linear regression T-test
Page 6: Linear regression T-test

Conditions/Assumptions/Conditions/Assumptions/requirementsrequirements

S---Sample, Identify it!S---Sample, Identify it!

N--Normally distributed residuals(no outliers)N--Normally distributed residuals(no outliers)

A--andA--and

I----each piece of data is independent.I----each piece of data is independent.

L----Linear RelationshipL----Linear Relationship

S---Scattered Residual Plot.S---Scattered Residual Plot.

Page 7: Linear regression T-test
Page 8: Linear regression T-test
Page 9: Linear regression T-test

If a baby doesn’t cry, what is their predicted IQ?

If a baby doesn’t cry their predicted IQ is 91.3

Page 10: Linear regression T-test

Explain the meaning of the slope in context of the problem.Explain the meaning of the slope in context of the problem.

For every unit increase in crycount we can expect an average increase of 1.49 in predicted IQ.

Page 11: Linear regression T-test

Explain the meaning of the S? Interpret in context of the Explain the meaning of the S? Interpret in context of the problem.problem.

S is the standard deviation of the residuals. The avg difference between actual IQ and predicted IQ is about 17.5.

Page 12: Linear regression T-test

What is the meaning of the correlation coefficient in terms What is the meaning of the correlation coefficient in terms of this problem? What is its value?of this problem? What is its value?

R = .445….There is a weak positive linear association between infant crycount and predicted IQ at age 3.

Page 13: Linear regression T-test

What is the meaning of coefficient of determination in this What is the meaning of coefficient of determination in this problem? What is its value?problem? What is its value?

20.7% of the variation in predicted IQ can be explained by the approximate linear relationship with infant crycount.

Page 14: Linear regression T-test

What is the standard deviation of the slope in this problem? What is the standard deviation of the slope in this problem? What does it mean?What does it mean?

Seb = .4870……With different samples of this size we can expect a difference in slope to vary as much as .4870.

Page 15: Linear regression T-test

Run the TestRun the Test

Ho: B = 0 vs Ha: B > 0, where B is the the true Ho: B = 0 vs Ha: B > 0, where B is the the true slope of the relationship between infants crying and slope of the relationship between infants crying and later IQ.later IQ.

Assumptions/Conditions………..SNAILSAssumptions/Conditions………..SNAILS We have a random sample of 38 infants cry counts We have a random sample of 38 infants cry counts

and IQ measured later at 3 years old. The residuals and IQ measured later at 3 years old. The residuals can be considered Normal because of the CLT. IQ can be considered Normal because of the CLT. IQ scores can be considered independent and all scores can be considered independent and all infants from the selected population is more than infants from the selected population is more than 10x the sample. We have a linear association 10x the sample. We have a linear association between crying and IQ. The residuals are randomly between crying and IQ. The residuals are randomly scattered about the regression line.scattered about the regression line.

Page 16: Linear regression T-test

Linear Regression T – TestLinear Regression T – Test

t = 3.07t = 3.07

P-value = .004P-value = .004

This p-value is low enough to reject Ho at any This p-value is low enough to reject Ho at any level of alpha. This is strong evidence that level of alpha. This is strong evidence that there may be a positive linear relationship there may be a positive linear relationship between infants cry counts and later IQ score.between infants cry counts and later IQ score.

Page 17: Linear regression T-test

CI for the slope:CI for the slope:

Using the data from the crying problem, give Using the data from the crying problem, give a 90% confidence interval for the slope of the a 90% confidence interval for the slope of the problem. Formula is on next slide…..degrees problem. Formula is on next slide…..degrees of freedom is N-2 since any two points will of freedom is N-2 since any two points will make a line, so we discard 2.make a line, so we discard 2.

Page 18: Linear regression T-test
Page 19: Linear regression T-test

Linear Regression T Linear Regression T IntervalInterval

Conditions have been met.Conditions have been met.

(0.6709, 2.3149)(0.6709, 2.3149)

We are 90% confident that mean IQ increases We are 90% confident that mean IQ increases is between .6709 and 2.3149 point for each is between .6709 and 2.3149 point for each additional peak in crying.additional peak in crying.

Since 0 is not included in this interval we have Since 0 is not included in this interval we have strong evidence that there may be a positive strong evidence that there may be a positive linear relationship between infant cry counts linear relationship between infant cry counts and later IQ.and later IQ.

Page 20: Linear regression T-test

Blood alcohol content Blood alcohol content and Beerand Beer

16 student volunteers at Ohio 16 student volunteers at Ohio State University drank a randomly State University drank a randomly assigned number of cans of beer. assigned number of cans of beer. Thirty minutes later, a police Thirty minutes later, a police officer measured their BAC.officer measured their BAC.

Page 21: Linear regression T-test

Beers & BACBeers & BAC

Student 1 2 3 4 5 6 7 8

Beers 5 2 9 8 3 7 3 5

BAC 0.10

0.03 0.19 0.12 0.04 0.095 0.07 0.06

Student 9 10 11 12 13 14 15 16

Beers 3 5 4 6 5 7 1 4

BAC 0.02

0.05 0.07 0.10 0.085 0.09 0.01 0.05

Is there a positive relationship between the number of beers consumed and blood alcohol content(BAC)?

Run a Linear Regression T Test…..follow the PHANTOMS

Page 22: Linear regression T-test

HypothesisHypothesis

Ho: B = 0 The number of beers has no effect on BAC

Ha: B > 0 The number of beers has a positive effect on BAC

Page 23: Linear regression T-test
Page 24: Linear regression T-test

Assumptions/ConditionsAssumptions/Conditions

•We have an independent sample of 16 student volunteers.

•Residuals are normally distributed and scattered around the regression line(check/show boxplot)

•We have a linear relationship

Page 25: Linear regression T-test

Name the Test, Test Name the Test, Test Statistic & P-valueStatistic & P-value

•Linear Regression T – Test

• t = 7.48

•P-value = 0

Page 26: Linear regression T-test

Make a Decision, Make a Decision, Sentence in ContextSentence in Context

•This p-value is low enough to reject Ho at any level

•This is very strong evidence to suggest that an increase in the number of beers may increase BAC.

•Do a 95% CI for the slope of the Do a 95% CI for the slope of the relationship between BAC and beers.relationship between BAC and beers.

Page 27: Linear regression T-test

•(.01281, .02311)

•Since 0 is not included in our interval we have evidence to suggest that there may be a positive linear relationship between beers consumed and BAC.

Page 28: Linear regression T-test

•If you have drank no beers, what is you predicted BAC? Is this If you have drank no beers, what is you predicted BAC? Is this reasonable?reasonable?

•Interpret the slope in context.Interpret the slope in context.

•Interpret the correlation coefficient for this question? Interpret the correlation coefficient for this question?

•Interpret the coefficient of determination for this question? Interpret the coefficient of determination for this question?

•What does the S mean? Interpret this in context.What does the S mean? Interpret this in context.

Page 29: Linear regression T-test

If no beers are consumed we can expect a BAC of If no beers are consumed we can expect a BAC of -.0127. Since this is less than zero it is not -.0127. Since this is less than zero it is not reasonable.reasonable.

For every beer consumed we can expect on average For every beer consumed we can expect on average an increase in BAC of .0180.an increase in BAC of .0180.

R = .8944….There is a strong positive linear R = .8944….There is a strong positive linear association between beers consumed and predicted association between beers consumed and predicted BAC.BAC.

80% of the variation in BAC can be explained by the 80% of the variation in BAC can be explained by the approximate linear relationship with beers approximate linear relationship with beers consumed. consumed.

S is the standard deviation of the residuals…The S is the standard deviation of the residuals…The average difference between the actual BAC and average difference between the actual BAC and predicted BAC is .02044.predicted BAC is .02044.