regression. height weight suppose you took many samples of the same size from this population &...

17
Regression Regression

Upload: lee-james

Post on 31-Dec-2015

219 views

Category:

Documents


3 download

TRANSCRIPT

RegressionRegression

60 62 64 66 68Height

Wei

ght

Suppose you took many

samples of the same size from this population & calculated the LSRL for

each.

Using the slope from each of

these LSRLs – we can create a

sampling distribution for the slope of the

true LSRL.

bb bbbb b

What shape will this

distribution have?

What is the mean of the sampling

distribution equal?

b =

22

2

2

ˆ

1

iiii

ii

bxx

s

xx

nyy

s

What is the standard

deviation of the sampling distribution?

Person #

Ht Wt

1 64 130

10 64 175

15 64 150

19 64 125

21 64 145

40 64 186

47 64 121

60 64 137

63 64 143

68 64 120

70 64 112

78 64 108

83 64 160

Suppose we look at part of a population of adult women. These women are all 64 inches tall.

What distribution does their weight have?

60 62 64 66 68Height

Wei

ght

60 62 64 66 68

How much would an adult female weigh if she were 5 feet

tall?

She could weigh varying amounts –

in other words, there is a

distribution of weights for adult

females who are 5 feet tall.

This distribution is normally distributed.(we hope)

What would you expect for other heights?

Where would you expect the TRUE LSRL

to be?

What about the standard deviations of

all these normal

distributions?

60 62 64 66 68

60 62 64 66 68

xy

We want the standard deviations of all these normal distributions to be

the same.

y

y

y

==

Regression ModelRegression Model• The mean response y has a straight-line

relationship with x: – Where: slope and intercept are unknown

parameters

• For any fixed value of x, the response y varies according to a normal distribution. Repeated responses of y are independent of each other.

• The standard deviation of y (y) is the same for all values of x. (y is also an unknown parameter)

xy

• The slope b of the LSRL is an unbiased estimator of the true slope .

• The intercept a of the LSRL is an unbiased estimator of the true intercept .

• The standard error s is an unbiased estimator of the true standard deviation of y (y).

bxay ˆ xy

22

ˆ 22

n

residualsn

yysNote:

df = n-2

We use to estimate

60 62 64 66 68Height

Wei

ght

Suppose the LSRL has a

horizontal line –would height be

useful in predicting weight?

What is the slope of a horizontal

line?

A slope of zero – means that there is NO relationship

between x & y!

Let’s review the regression model!Let’s review the regression model!

For a given x-value, the responses (y) are normally distributed

x & y have a linear relationship with the

true LSRL going through the yxy

y is the same for each x-value.

Assumptions for inference on slopeAssumptions for inference on slope

• The observations are independent– Check that you have an SRS

• The true relationship is linear– Check the scatter plot & residual plot

• The standard deviation of the response is constant.– Check the scatter plot & residual plot

• The responses vary normally about the true regression line.– Check a histogram or boxplot of residuals

HypothesesHypotheses

H0: = 0

Ha: > 0

Ha: < 0

Ha: ≠ 0

This implies that there is no

relationship between x & y

Or that x should not be used to

predict y

What would the slope equal if there were a perfect relationship

between x & y?

1

Be sure to define !

Formulas:Formulas:• Confidence Interval:

• Hypothesis test:

b

1bs

bt

statistic of SD valuecritical statisticCI

*t 1b

s

statistic of SD

parameter - statisticstatisticTest

df = n -2

Because there are two unknowns &

Example: It is difficult to accurately determine a person’s body fat percentage without immersing him or her in water. Researchers hoping to find ways to make a good estimate immersed 20 male subjects, and then measured their weights.

Weight (lb) Body Fat (%)175 6181 21200 15159 6196 22192 31205 32173 21187 25188 30188 10240 20175 22168 9246 38160 10215 27159 12146 10219 28

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

c) Explain the meaning of the coefficient of determination in context.

a) Find the LSRL, correlation coefficient, and coefficient of determination.

Body fat = -27.376 + 0.250 weightr = 0.697r2 = 0.485

There is approximately .25% increase in body fat for every pound increase in weight.

Approximately 48.5% of the variation in body fat can be explained by the regression of body fat on weight.

d) Estimate , , and .

= -27.376 = 0.25 = 7.049

e) Create a scatter plot and residual plot for the data.

2

2

nresiduals

s

Weight

Res

idu

als

Weight

Bo

dy

fat

f) Is there sufficient evidence that weight can be used to predict body fat? Assumptions:•Have an SRS of male subjects•Since the residual plot is randomly scattered, weight & body fat are linear•Since the points are evenly spaced across the LSRL on the scatterplot, y is approximately equal for all values of weight

•Since the boxplot of residual is approximately symmetrical, the responses are approximately normally distributed.

H0: = 0 Where is the true slope of the LSRL of weight Ha: ≠ 0 & body fat

Since the p-value < , I reject H0. There is sufficient evidence to suggest that weight can be used to predict body fat.

05.180006.120.40607.

025.0

dfvalueps

bt

b

tb

sb

g) Give a 95% confidence interval for the true slope of the LSRL.Assumptions:•Have an SRS of male subjects•Since the residual plot is randomly scattered, weight & body fat are linear•Since the points are evenly spaced across the LSRL on the scatterplot, y is approximately equal for all values of weight•Since the boxplot of residual is approximately symmetrical, the responses are approximately normally distributed.

We are 95% confident that the true slope of the LSRL of weight & body fat is between 0.12 and 0.38.

Be sure to show all graphs!

18)377.,122(.0607.101.225.0* dfstb b

h) Here is the computer-generated result from the data:

Sample size: 20R-square = 43.83%s = 7.0491323

Parameter

Estimate Std. Err.

Intercept -27.376263 11.547428

Weight 0.24987414 0.060653996

df?

Correlation coeficient?Be sure to write as decimal first!

What does “s” represent (in context)?

What do these numbers represent?

What does this number represent?