+ - 0:00:00
Notes for current slide
Notes for next slide

Simple Linear Regression

Inference

Prof. Maria Tackett

1

Topics

3

Topics

  • Conduct a hypothesis test for β1
3

Topics

  • Conduct a hypothesis test for β1


  • Calculate a confidence interval for β1
3

Movie ratings data

The data set contains the "Tomatometer" score (critics) and audience score (audience) for 146 movies rated on rottentomatoes.com.

4

The model

model <- lm(audience ~ critics, data = movie_scores)
model %>%
tidy() %>%
kable(format = "html", digits = 3)
term estimate std.error statistic p.value
(Intercept) 32.316 2.343 13.795 0
critics 0.519 0.035 15.028 0
5

The model

^audience=32.316+0.519×critics

term estimate std.error statistic p.value
(Intercept) 32.316 2.343 13.795 0
critics 0.519 0.035 15.028 0

6

Does the data provide sufficient evidence that β1 is significantly different from 0?

7

Outline of a hypothesis test

8

Outline of a hypothesis test

1️⃣ State the hypotheses.

8

Outline of a hypothesis test

1️⃣ State the hypotheses.

2️⃣ Calculate the test statistic.

8

Outline of a hypothesis test

1️⃣ State the hypotheses.

2️⃣ Calculate the test statistic.

3️⃣ Calculate the p-value.

8

Outline of a hypothesis test

1️⃣ State the hypotheses.

2️⃣ Calculate the test statistic.

3️⃣ Calculate the p-value.

4️⃣ State the conclusion.

8

1️⃣ State the hypotheses

term estimate std.error statistic p.value
(Intercept) 32.316 2.343 13.795 0
critics 0.519 0.035 15.028 0


H0:β1=0Ha:β10

9

1️⃣ State the hypotheses

term estimate std.error statistic p.value
(Intercept) 32.316 2.343 13.795 0
critics 0.519 0.035 15.028 0


H0:β1=0Ha:β10

place-holder

Null hypothesis

10

1️⃣ State the hypotheses

term estimate std.error statistic p.value
(Intercept) 32.316 2.343 13.795 0
critics 0.519 0.035 15.028 0


H0:β1=0Ha:β10

place-holder

Null hypothesis

Alternative hypothesis

11

2️⃣ Calculate the test statistic

term estimate std.error statistic p.value
(Intercept) 32.316 2.343 13.795 0
critics 0.519 0.035 15.028 0


test statistic=EstimateHypothesizedStandard error

12

2️⃣ Calculate the test statistic

term estimate std.error statistic p.value
(Intercept) 32.316 2.343 13.795 0
critics 0.519 0.035 15.028 0


t=ˆβ10SEˆβ1

13

2️⃣ Calculate the test statistic

term estimate std.error statistic p.value
(Intercept) 32.316 2.343 13.795 0
critics 0.519 0.035 15.028 0


t=ˆβ10SEˆβ1

t=0.518700.0345=15.03

13

3️⃣ Calculate the p-value

term estimate std.error statistic p.value
(Intercept) 32.316 2.343 13.795 0
critics 0.519 0.035 15.028 0


p-value=P(|t||test statistic|)

Calculated from a t distribution with n2 degrees of freedom

14

3️⃣ Calculate the p-value

15

Understanding the p-value

Magnitude of p-value Interpretation
p-value < 0.01 strong evidence against H0
0.01 < p-value < 0.05 moderate evidence against H0
0.05 < p-value < 0.1 weak evidence against H0
p-value > 0.1 effectively no evidence against H0



These are general guidelines. The strength of evidence depends on the context of the problem.

16

4️⃣ State the conclusion

term estimate std.error statistic p.value
(Intercept) 32.316 2.343 13.795 0
critics 0.519 0.035 15.028 0


17

4️⃣ State the conclusion

term estimate std.error statistic p.value
(Intercept) 32.316 2.343 13.795 0
critics 0.519 0.035 15.028 0


The data provide sufficient evidence that the population slope β1 is different from 0.

There is a linear relationship between the critics score and audience score for movies on rottentomatoes.com.

17

What is a plausible range of values for the population slope β1?

18

Confidence interval for β1

 Estimate± (critical value) ×SE

19

Confidence interval for β1

 Estimate± (critical value) ×SE

ˆβ1±t×SEˆβ1


t is calculated from a t distribution with n2 degrees of freedom

19

Calculating the 95% CI for β1

term estimate std.error statistic p.value
(Intercept) 32.316 2.343 13.795 0
critics 0.519 0.035 15.028 0

ˆβ1=0.519t=1.977SEˆβ1=0.035

20

Calculating the 95% CI for β1

term estimate std.error statistic p.value
(Intercept) 32.316 2.343 13.795 0
critics 0.519 0.035 15.028 0

ˆβ1=0.519t=1.977SEˆβ1=0.035

0.519±1.977×0.035[0.450,0.588]

20

Interpretation

[0.450,0.588]

21

Interpretation

[0.450,0.588]


We are 95% confident that for every one point increase in the critics score, the audience score is predicted to increase on average between 0.450 and 0.588 points.

21

Recap

22

Recap

  • Conducted a hypothesis test for β1
22

Recap

  • Conducted a hypothesis test for β1


  • Calculated a confidence interval for β1
22
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow