1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS 0 +sd 0...

42
1 1 0 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS 0 +sd 0 –sd 0 –2sd 1 +2sd 2.5% 2.5% X f X null hypothesis: H 0 : = 0 alternative hypothesis: H 1 : = 1

Transcript of 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS 0 +sd 0...

Page 1: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

1

10

This sequence explains the logic behind a one-sided t test.

ONE-SIDED t TESTS

0+sd0–sd0–2sd 1+2sd

2.5% 2.5%

Xf

X

null hypothesis: H0: = 0

alternative hypothesis: H1: = 1

Page 2: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

2

We will start by considering the case where can take only two possible values: 0, as under the null hypothesis, and 1, the only possible alternative.

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

Xf

X

2.5% 2.5%

null hypothesis: H0: = 0

alternative hypothesis: H1: = 1

Page 3: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

3

An example of this situation is where you are selling computer accessories and among your products there are two types of removable lap-top batteries: regular (average charge duration 0) and long life (average charge duration 1).

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

Xf

X

2.5% 2.5%

null hypothesis: H0: = 0

alternative hypothesis: H1: = 1

Page 4: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

4

You have been sent an unmarked shipment and you take a sample and see how long they last. Your null hypothesis is that they are regular batteries.

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

Xf

X

2.5% 2.5%

null hypothesis: H0: = 0

alternative hypothesis: H1: = 1

Page 5: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

5

Suppose that the sample outcome is as shown. You would not reject the null hypothesis because the sample estimate lies within the acceptance region for H0.

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

Xf

X

2.5% 2.5%

null hypothesis: H0: = 0

alternative hypothesis: H1: = 1

Page 6: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

6

Here you would reject the null hypothesis and conclude that the shipment was of long life batteries.

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

Xf

X

2.5% 2.5%

null hypothesis: H0: = 0

alternative hypothesis: H1: = 1

Page 7: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

7

Here you would stay with the null hypothesis.

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

Xf

X

2.5% 2.5%

null hypothesis: H0: = 0

alternative hypothesis: H1: = 1

Page 8: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

8

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

Xf

X

2.5% 2.5%

A sample outcome such as this one gives rise to a serious problem. It lies in the rejection region for H0, so our first impulse would be to reject H0.

null hypothesis: H0: = 0

alternative hypothesis: H1: = 1

Page 9: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

9

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

Xf

X

2.5% 2.5%

But to reject H0 and go with H1 is nonsensical. Granted, the sample outcome seems to contradict H0, but it contradicts H1 even more strongly.

null hypothesis: H0: = 0

alternative hypothesis: H1: = 1

Page 10: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

10

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

Xf

X

2.5% 2.5%

The probability of getting a sample outcome like this one is much smaller under H1 than it is under H0.

null hypothesis: H0: = 0

alternative hypothesis: H1: = 1

Page 11: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

11

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

Xf

X

2.5%

For this reason the left tail should be eliminated as a rejection region for H0. We should use only the right tail as a rejection region.

null hypothesis: H0: = 0

alternative hypothesis: H1: = 1

Page 12: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

12

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

Xf

X

2.5%

The probability of making a Type I error, if H0 happens to be true, is now 2.5%, so the significance level of the test is now 2.5%.

null hypothesis: H0: = 0

alternative hypothesis: H1: = 1

Page 13: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

13

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

Xf

X

5%

We can convert it back to a 5% significance test by building up the right tail until it contains 5% of the probability under the curve. It starts 1.645 standard deviations from the mean.

null hypothesis: H0: = 0

alternative hypothesis: H1: = 1

Page 14: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

14

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

Xf

X

5%

Why would we want to do this? For the answer, we go back to the trade-off between Type I and Type II errors.

null hypothesis: H0: = 0

alternative hypothesis: H1: = 1

Page 15: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

15

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

Xf

X

5%

With a 5% test, there is a greater chance of making a Type I error if H0 happens to be true, but there is less risk of making a Type II error if it happens to be false.

null hypothesis: H0: = 0

alternative hypothesis: H1: = 1

Page 16: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

16

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

Xf

X

5%

Note that the logic for dropping the left tail depended only on 1 being greater than 0. It did not depend on 1 being any specific value.

null hypothesis: H0: = 0

alternative hypothesis: H1: = 1

Page 17: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

17

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

Xf

X

5%

Hence we can generalize the one-sided test to cover the case where the alternative hypothesis is simply that is greater than 0.

null hypothesis: H0: = 0

alternative hypothesis: H1: > 0

Page 18: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

18

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

Xf

X

5%

To justify the use of a one-sided test, all we have to do is to rule out, on the basis of economic theory or previous empirical experience, the possibility that is less than 0.

null hypothesis: H0: = 0

alternative hypothesis: H1: > 0

Page 19: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

19

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

Xf

X

5%

null hypothesis: H0: = 0

alternative hypothesis: H1: < 0

Sometimes, given a null hypothesis H0: = 0, on the basis of economic theory or previous experience, you can rule out the possibility of being greater than 0.

Page 20: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

20

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

Xf

X

5%

In this situation you would also perform a one-sided test, now with the left tail being used as the rejection region. With this change, the logic is the same as before.

null hypothesis: H0: = 0

alternative hypothesis: H1: < 0

Page 21: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

We will next investigate how the use of a one-sided test improves the trade-off between the risks of making Type I and Type II errors.

21

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

2.5% 2.5%

Xf

X

null hypothesis: H0: = 0

alternative hypothesis: H1: = 1

Page 22: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

22

We will start by returning to the case where can take only two possible values, 0 and 1.

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

2.5% 2.5%

Xf

X

null hypothesis: H0: = 0

alternative hypothesis: H1: = 1

Page 23: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

23

Suppose that we use a two-sided 5% significance test. If H0 is true, there is a 5% risk of making a Type I error.

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

2.5% 2.5%

Xf

X

null hypothesis: H0: = 0

alternative hypothesis: H1: = 1

Page 24: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

24

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

2.5% 2.5%

Xf

X

However, H0 may be false. In that case the probability of not rejecting it and making a Type II error is given by the blue shaded area.

null hypothesis: H0: = 0

alternative hypothesis: H1: = 1

Page 25: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

25

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

2.5% 2.5%

Xf

X

This area gives the probability of the estimate lying within the acceptance region for H0, if H1 is in fact true.

null hypothesis: H0: = 0

alternative hypothesis: H1: = 1

Page 26: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

26

Now suppose that you use a one-sided test, taking advantage of the fact that it is irrational to reject H0 if the estimate is in the left tail.

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

Xf

X

5%

null hypothesis: H0: = 0

alternative hypothesis: H1: > 0

Page 27: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

27

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

Xf

X

5%

Having expanded the right tail to 5%, we are still performing a 5% significance test, and the risk of making a Type I error is still 5%, if H0 is true.

null hypothesis: H0: = 0

alternative hypothesis: H1: > 0

Page 28: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

28

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

Xf

X

5%

But if H0 is false, the risk of making a Type II error is smaller than before. The probability of an estimate lying in the acceptance region for H0 is now given by the red area.

null hypothesis: H0: = 0

alternative hypothesis: H1: > 0

Page 29: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

29

This is smaller than the blue area for the two-sided test.

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

Xf

X

null hypothesis: H0: = 0

alternative hypothesis: H1: = 1

Page 30: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

30

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

Xf

X

Thus, with no increase in the probability of making a Type I error (if H0 is true), we have reduced the probability of making a Type II error (if H0 is false).

null hypothesis: H0: = 0

alternative hypothesis: H1: = 1

Page 31: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

31

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

Xf

X

When the alternative hypothesis is H1: > 0 or H1: < 0, the more general (and more typical) case, we cannot draw this diagram.

null hypothesis: H0: = 0

alternative hypothesis: H1: = 1

Page 32: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

32

ONE-SIDED t TESTS

10 0+sd0–sd0–2sd 1+2sd

Xf

X

Nevertheless we can be sure that, by using a one-sided test, we are reducing the probability of making a Type II error, if H0 happens to be false.

null hypothesis: H0: = 0

alternative hypothesis: H1: = 1

Page 33: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

33

One-sided tests are often particularly useful where the analysis relates to the evaluation of treatment and effect. Suppose that a number of units of observation receive some type of treatment and Xi is a measure of the effect of the treatment for observation i.

ONE-SIDED t TESTS

Xfnull hypothesis: H0: = 0

alternative hypothesis: H1: ≠ 0

X0 1.96 sd–1.96 sd

2.5% 2.5%

reject H0 reject H0do not reject H0

Page 34: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

34

To demonstrate that the treatment did have an effect, we set up the null hypothesis H0: = 0 and see if we can reject it, given the sample average X.

ONE-SIDED t TESTS

Xf

X0 1.96 sd–1.96 sd

2.5% 2.5%

reject H0reject H0 do not reject H0

null hypothesis: H0: = 0

alternative hypothesis: H1: ≠ 0

Page 35: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

35

If you use a two-sided 5% significance test, X must be 1.96 standard deviations above or below 0 if you are to reject H0.

ONE-SIDED t TESTS

Xf

X0 1.96 sd–1.96 sd

2.5% 2.5%

reject H0reject H0 do not reject H0

null hypothesis: H0: = 0

alternative hypothesis: H1: ≠ 0

Page 36: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

36

ONE-SIDED t TESTS

Xf

X0–1.96 sd

2.5%

do not reject H0

1.65 sd

However, if you can justify the use of a one-sided test, for example with H1: > 0, your estimate has to be only 1.65 standard deviations above 0.

reject H0

null hypothesis: H0: = 0

alternative hypothesis: H1: > 0

Page 37: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

37

ONE-SIDED t TESTS

Xf

X0–1.96 sd

2.5%

reject H0

1.65 sd

This makes it easier to reject H0 and thereby demonstrate that the treatment has had a significant effect.

do not reject H0

null hypothesis: H0: = 0

alternative hypothesis: H1: > 0

Page 38: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

38

ONE-SIDED t TESTS

Xf

X0–1.96 sd

2.5%

reject H0

1.65 sd

do not reject H0

Throughout this sequence, it has been assumed that the standard deviation of the distribution of b2 is known, and the normal distribution has been used in the diagrams.

null hypothesis: H0: = 0

alternative hypothesis: H1: > 0

Page 39: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

39

ONE-SIDED t TESTS

Xf

X0–1.96 sd

2.5%

reject H0

1.65 sd

do not reject H0

In practice, of course, the standard deviation has to be estimated as the standard error, and the t distribution is the relevant distribution. However, the logic is exactly the same.

null hypothesis: H0: = 0

alternative hypothesis: H1: > 0

Page 40: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

40

ONE-SIDED t TESTS

Xf

X0–1.96 sd

2.5%

reject H0

1.65 sd

do not reject H0

At any given significance level, the critical value of t for a one-sided test is lower than that for a two-sided test.

null hypothesis: H0: = 0

alternative hypothesis: H1: > 0

Page 41: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

41

ONE-SIDED t TESTS

Xf

X0–1.96 sd

2.5%

reject H0

1.65 sd

do not reject H0

Hence, if H0 is false, the risk of not rejecting it, thereby making a Type II error, is smaller.

null hypothesis: H0: = 0

alternative hypothesis: H1: > 0

Page 42: 1 11 00 This sequence explains the logic behind a one-sided t test. ONE-SIDED t TESTS  0 +sd  0 –sd  0 –2sd  1 +2sd 2.5% null hypothesis:H 0 :

Copyright Christopher Dougherty 2012.

These slideshows may be downloaded by anyone, anywhere for personal use.

Subject to respect for copyright and, where appropriate, attribution, they may be

used as a resource for teaching an econometrics course. There is no need to

refer to the author.

The content of this slideshow comes from Section R.13 of C. Dougherty,

Introduction to Econometrics, fourth edition 2011, Oxford University Press.

Additional (free) resources for both students and instructors may be

downloaded from the OUP Online Resource Centre

http://www.oup.com/uk/orc/bin/9780199567089/.

Individuals studying econometrics on their own who feel that they might benefit

from participation in a formal course should consider the London School of

Economics summer school course

EC212 Introduction to Econometrics

http://www2.lse.ac.uk/study/summerSchools/summerSchool/Home.aspx

or the University of London International Programmes distance learning course

EC2020 Elements of Econometrics

www.londoninternational.ac.uk/lse.

2012.11.02