Slide 5. Chapter 5: Hypothesis testig Hypothesis testig is about makig decisios Is a hypothesis true or false? Are wome paid less, o average, tha me? Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009
Slide 5. Priciples of hypothesis testig The ull hypothesis is iitially presumed to be true Evidece is gathered, to see if it is cosistet with the hypothesis If it is, the ull hypothesis cotiues to be cosidered true (later evidece might chage this) If ot, the ull is rejected i favour of the alterative hypothesis Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009
Slide 5.3 Two possible types of error Decisio makig is ever perfect ad mistakes ca be made Type I error: rejectig the ull whe true Type II error: acceptig the ull whe false Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009
Slide 5.4 Type I ad Type II errors True situatio Decisio H 0 true H 0 false Accept H 0 Reject H 0 Correct decisio Type I error Type II error Correct decisio Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009
Slide 5.5 Avoidig icorrect decisios We wish to avoid both Type I ad II errors We ca alter the decisio rule to do this Ufortuately, reducig the chace of makig a Type I error geerally meas icreasig the chace of a Type II error Hece a trade off Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009
Slide 5.6 Diagram of the decisio rule f x H H 0 Type I error Type II error x Rejectio regio x D No-rejectio regio Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009
Slide 5.7 How to make a decisio Where do we place the decisio lie? Set the Type I error probability to a particular value. By covetio, this is 5%. This is kow as the sigificace level of the test. It is complemetary to the cofidece level of estimatio. 5% sigificace level 95% cofidece level. Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009
Slide 5.8 Example: How log do LEDs last? A maufacturer of LEDs claims its product lasts at least 5,000 hours, o average. A sample of 50 LEDs is tested. The average time before failure is 4,900 hours, with stadard deviatio 500 hours. Should the maufacturer s claim be accepted or rejected? Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009
Slide 5.9 The hypotheses to be tested H 0 : m = 5,000 H : m < 5,000 This is a oe tailed test, sice the rejectio regio occupies oly oe side of the distributio Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009
Slide 5.0 Should the ull hypothesis be rejected? Is 4,900 far eough below 5,000? Is it more tha.64 stadard errors below 5,000? (.64 stadard errors below the mea cuts off the bottom 5% of the Normal distributio.) z x m s 4,900 5,000 500 80.79 Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009
Slide 5. Should the ull hypothesis be rejected? (cotiued) 4,900 is.79 stadard errors below 5,000, so falls ito the rejectio regio (bottom 5% of the distributio) Hece, we ca reject H 0 at the 5% sigificace level or, equivaletly, with 95% cofidece. If the true mea were 5,000, there is less tha a 5% chace of obtaiig sample evidece such as x 4,900 from a sample of = 80. Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009
Slide 5. Formal layout of a problem. H 0 : m = 5,000 H : m < 5,000. Choose sigificace level: 5% 3. Look up critical value: z* =.64 4. Calculate the test statistic: z = -.79 5. Decisio: reject H 0 sice -.79 < -.64 ad falls ito the rejectio regio Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009
Slide 5.3 Oe vs two tailed tests Should you use a oe tailed (H : m < 5,000) or two tailed (H : m 5,000) test? If you are oly cocered about fallig oe side of the hypothesised value (as here: we would ot worry if LEDs lasted loger tha 5,000 hours) use the oe tailed test. You would ot wat to reject H 0 if the sample mea were aywhere above 5,000. If for aother reaso, you kow oe side is impossible (e.g. demad curves caot slope upwards), use a oe tailed test. Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009
Slide 5.4 Oe vs two tailed tests (cotiued) Otherwise, use a two tailed test. If usure, choose a two tailed test. Never choose betwee a oe or two tailed test o the basis of the sample evidece (i.e. do ot choose a oe tailed test because you otice that 4,900 < 5,000). The hypothesis should be chose before lookig at the evidece! Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009
Slide 5.5 Two tailed test example It is claimed that a average child speds 5 hours per week watchig televisio. A survey of 00 childre fids a average of 4.5 hours per week, with stadard deviatio 8 hours. Is the claim justified? The claim would be wrog if childre sped either more or less tha 5 hours watchig TV. The rejectio regio is split across the two tails of the distributio. This is a two tailed test. Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009
Slide 5.6 A two tailed test diagram f x H H 0 H.5%.5% x Reject H 0 Reject H 0 Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009
Slide 5.7 Solutio to the problem. H 0 : m = 5 H : m 5. Choose sigificace level: 5% 3. Look up critical value: z* =.96 4. Calculate the test statistic: z x m 4.5 5 s 8 00 0.65 5. Decisio: we do ot reject H 0 sice 0.65 <.96 ad does ot fall ito the rejectio regio Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009
Slide 5.8 Why 5%? The choice of sigificace level Like its complemet, the 95% cofidece level, it is a covetio. A differet value ca be chose, but it does set a bechmark. If the cost of makig a Type I error is especially high, the set a lower sigificace level, e.g. %. The sigificace level is the probability of makig a Type I error. Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009
Slide 5.9 The prob-value approach A alterative way of makig the decisio Returig to the LED problem, the test statistic z = -.79 cuts off 3.67% i the lower tail of the distributio. 3.67% is the prob-value for this example Sice 3.67% < 5% the test statistic must fall ito the rejectio regio for the test Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009
Slide 5.0 Two ways to rejectio... Reject H 0 if either or z < -z* (-.79 < -.64) the prob-value < the sigificace level (3.67% < 5%) Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009
Slide 5. Testig a proportio Same priciples: reject H 0 if the test statistic falls ito the rejectio regio. To test H 0 : = 0.5 vs H : 0.5 (e.g. a coi is fair or ot) the test statistic is z p p 0.5 0.5 0.5 Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009
Slide 5. Testig a proportio (cotiued) If the sample evidece were 60 heads from 00 tosses (p = 0.6) we would have z 0.6 0.5 0.5 0.5 00 so we would (just) reject H 0 sice >.96. Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009
Slide 5.3 Testig the differece of two meas To test whether two samples are draw from populatios with the same mea H 0 : m = m or H 0 : m - m = 0 H : m m or H 0 : m - m 0 The test statistic is z x x m m s s Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009
Slide 5.4 Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009 Testig the differece of two proportios To test whether two sample proportios are equal H 0 : = or H 0 : - = 0 H : or H 0 : - 0 The test statistic is ˆ ˆ ˆ ˆ p p z ˆ p p
Slide 5.5 Two cosequeces: Small samples ( < 5) the t distributio is used istead of the stadard ormal for tests of the mea t x m s ~ t tests of proportios caot be doe by the stadard methods used i the book Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009
Slide 5.6 Testig a mea A sample of cars of a particular make average 35 mpg, with stadard deviatio 5. Test the maufacturer s claim of 40 mpg as the true average. H 0 : m = 40 H : m < 40 Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009
Slide 5.7 Testig a mea (cotiued) The test statistic is t 35 40 5.5 The critical value of the t distributio (df =, 5% sigificace level, oe tail) is t* =.796 Hece we caot reject the maufacturer s claim Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009
Slide 5.8 Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009 Testig the differece of two meas The test statistic is where S is the pooled variace S S x x t m m s s S
Slide 5.9 Summary The priciples are the same for all tests: calculate the test statistic ad see if it falls ito the rejectio regio The formula for the test statistic depeds upo the problem (mea, proportio, etc) The rejectio regio varies, depedig upo whether it is a oe or two tailed test Barrow, Statistics for Ecoomics, Accoutig ad Busiess Studies, 5 th editio Pearso Educatio Limited 009