Chapter 8 Tests of Statistical Hypotheses 8. Tests about Proportios HT - Iferece o Proportio Parameter: Populatio Proportio p (or π) (Percetage of people has o health isurace) x Statistic: Sample Proportio p ˆ = x is umber of successes is sample size Data:, 0,, 0, 0 p ˆ = =. 4 p ˆ = x 5 + 0 + + 0 + 0 x = =.4 5 HT - Samplig Distributio of Sample Proportio A radom sample of size from a large populatio with proportio of successes (usually represeted by a value ) p, ad therefore proportio of failures (usually represeted by a value 0) p, the samplig distributio of sample proportio, = x/, where x is the umber of successes i the sample, is asymptotically ormal with a mea p p ( p) ad stadard deviatio. HT - 3 Cofidece Iterval Cofidece iterval: The ( α)% cofidece iterval estimate for populatio proportio is ± z p ˆ( ) α/ Large Sample Assumptio: Both p ad ( p) are greater tha 5, that is, it is expected that there at least 5 couts i each category. HT - 4 Hypothesis Testig. State research hypotheses or questios. p = 30%?. Gather data or evidece (observatioal or experimetal) to aswer the questio. =.5 = 5% 3. Summarize data ad test the hypothesis. 4. Draw a coclusio. HT - 5 Statistical Hypothesis Null hypothesis (H 0 ): Hypothesis of o differece or o relatio, ofte has =,, or otatio whe testig value of parameters. Example: H 0 : p = 30% or H 0 : Percetage of votes for A is 30%. HT - 6
Statistical Hypothesis Alterative hypothesis (H or H a ) Usually correspods to research hypothesis ad opposite to ull hypothesis, ofte has >, < or otatio i testig mea. Example: H a : p 30% or H a : Percetage of votes for A is ot 30%. HT - 7 Hypotheses Statemets Example A researcher is iterested i fidig out whether percetage of people i favor of policy A is differet from 60%. H 0 : p = 60% H a : p 60% [Two-tailed test] HT - 8 Hypotheses Statemets Example A researcher is iterested i fidig out whether percetage of people i a commuity that has health isurace is more tha 77%. H 0 : p = 77% ( or p 77% ) H a : p > 77 [Right-tailed test] Hypotheses Statemets Example A researcher is iterested i fidig out whether the percetage of bad product is less tha 0%. H 0 : p = 0% ( or p 0% ) H a : p < 0% [Left-tailed test] HT - 9 HT - 0 Evidece Test Statistic (Evidece): A sample statistic used to decide whether to reject the ull hypothesis. HT - Logic Behid Hypothesis Testig I testig statistical hypothesis, the ull hypothesis is first assumed to be true. We collect evidece to see if the evidece is strog eough to reject the ull hypothesis ad support the alterative hypothesis. HT -
I. Hypothesis Oe Sample -Test for Proportio (Large sample test) Two-Sided Test Oe wishes to test whether the percetage of votes for A is differet from 30% H o : p = 30% v.s. H a : p 30% HT - 3 HT - 4 Evidece What will be the key statistic (evidece) to use for testig the hypothesis about populatio proportio? Sample Proportio: p A radom sample of 00 subjects is chose ad the sample proportio is 5% or.5. HT - 5 Samplig Distributio If H 0 : p = 30% is true, samplig distributio of sample proportio will be approximately ormally distributed with mea.3 ad stadard deviatio (or stadard error).30.3 (.3) = 0.0458 00 σ p ˆ = 0.0458 HT - 6 II. Test Statistic p ˆ 0 p p0 z = = σ p ˆ p0 ( p0).5.3 = =.09.3 (.3) 00.5.30.09 0 This implies that the statistic is.09 stadard deviatios away from the mea.3 uder H 0, ad is to the left of.3 (or less tha.3) HT - 7 Level of Sigificace Level of sigificace for the test (α) A probability level selected by the researcher at the begiig of the aalysis that defies ulikely values of sample statistic if ull hypothesis is true. c.v. = critical value Total tail area = α c.v. 0 c.v. HT - 8 3
III. Decisio Rule Critical value approach: Compare the test statistic with the critical values defied by sigificace level α, usually α = 0.05. We reject the ull hypothesis, if the test statistic z < z α/ = z 0.05 =.96, or z > z α/ = z 0.05 =.96. ( i.e., z > z α/ ) Rejectio regio α/=0.05 Two-sided Test Rejectio regio α/=0.05 III. Decisio Rule p-value approach: Compare the probability of the evidece or more extreme evidece to occur whe ull hypothesis is true. If this probability is less tha the level of sigificace of the test, α, the we reject the ull hypothesis. (Reject H 0 if p-value < α) p-value = P(.09 or.09) = x P(.09) = x.379 =.758 Left tail area.379 Right tail area.38.96 0.96 Two-sided Test 0.09.09.09 Critical values HT - 9 HT - 0 p-value p-value The probability of obtaiig a test statistic that is as extreme or more extreme tha actual sample statistic value give ull hypothesis is true. It is a probability that idicates the extremeess of evidece agaist H 0. The smaller the p-value, the stroger the evidece for supportig Ha ad rejectig H 0. HT - IV. Draw coclusio Sice from either critical value approach z =.09 > z α/ =.96 or p-value approach p-value =.758 > α =.05, we do ot reject ull hypothesis. Therefore we coclude that there is o sufficiet evidece to support the alterative hypothesis that the percetage of votes would be differet from 30%. HT - Steps i Hypothesis Testig. State hypotheses: H 0 ad H a.. Choose a proper test statistic, collect data, checkig the assumptio ad compute the value of the statistic. 3. Make decisio rule based o level of sigificace(α). 4. Draw coclusio. (Reject or ot reject ull hypothesis) (Support or ot support alterative hypothesis) HT - 3 Whe do we use this z-test for testig the proportio of a populatio? Large radom sample. HT - 4 4
I. Hypothesis Oe-Sided Test Example with the same data: A radom sample of 00 subjects is chose ad the sample proportio is 5%. Oe wishes to test whether the percetage of votes for A is less tha 30% H o : p = 30% v.s. H a : p < 30% HT - 5 HT - 6 Evidece What will be the key statistic (evidece) to use for testig the hypothesis about populatio proportio? Sample Proportio: p A radom sample of 00 subjects is chose ad the sample proportio is 5% or.5. HT - 7 Samplig Distributio If H 0 : p = 30% is true, samplig distributio of sample proportio will be approximately ormally distributed with mea.3 ad stadard deviatio (or stadard error).30.3 (.3) = 0.0458 00 σ p ˆ = 0.0458 HT - 8 II. Test Statistic p ˆ 0 p p0 z = = σ p ˆ p0 ( p0).5.3 = =.09.3 (.3) 00.5.30.09 0 This implies that the statistic is.09 stadard deviatios away from the mea.3 uder H 0, ad is to the left of.3 (or less tha.3) HT - 9 III. Decisio Rule Critical value approach: Compare the test statistic with the critical values defied by sigificace level α, usually α = 0.05. We reject the ull hypothesis, if the test statistic z < z α = z 0.05 =.645, Rejectio regio α =.05 Left-sided Test.645 0.09 HT - 30 5
III. Decisio Rule p-value approach: Compare the probability of the evidece or more extreme evidece to occur whe ull hypothesis is true. If this probability is less tha the level of sigificace of the test, α, the we reject the ull hypothesis. p-value = P(.09) = P(.09) =.379 Left tail area.379 Left-sided Test.09 0 -Table HT - 3 IV. Draw coclusio Sice from either critical value approach z =.09 > z α/ =.645 or p-value approach p-value =.379 > α =.05, we do ot reject ull hypothesis. Therefore we coclude that there is o sufficiet evidece to support the alterative hypothesis that the percetage of votes is less tha 30%. HT - 3 Ca we see data ad the make hypothesis?. Choose a test statistic, collect data, checkig the assumptio ad compute the value of the statistic.. State hypotheses: H 0 ad H A. 3. Make decisio rule based o level of sigificace(α). 4. Draw coclusio. (Reject ull hypothesis or ot) Errors i Hypothesis Testig Possible statistical errors: Type I error: The ull hypothesis is true, but we reject it. Type II error: The ull hypothesis is false, but we do t reject it. α is the probability of committig Type I Error. α HT - 33 p HT - 34 Oe-Sample z-test for a populatio proportio Test Statistic z-test: Step : State Hypotheses (choose oe of the three hypotheses below) i) H 0 : p = p 0 : p p 0 (Two-sided test) ii) H 0 : p = p 0 : p > p 0 (Right-sided test) iii) H 0 : p = p 0 : p < p 0 (Left-sided test) Step : Compute z test statistic: p0 z = p0( p0) HT - 35 HT - 36 6
Step 3: Decisio Rule: p-value approach: Compute p-value, : p p 0, p-value = P( z ) : p > p 0, p-value = P( z ) : p < p 0, p-value = P( z ) reject H 0 if p-value < α Critical value approach: Determie critical value(s) usig α, reject H 0 agaist i) H A : p p 0, if z > z α/ ii) H A : p > p 0, if z > z α iii) H A : p < p 0, if z < z α Step 4: Draw Coclusio. HT - 37 Example: A researcher hypothesized that the percetage of the people livig i a commuity who has o isurace coverage durig the past moths is ot 0%. I his study, 000 idividuals from the commuity were radomly surveyed ad checked whether they were covered by ay health isurace durig the moths. Amog them, aswered that they did ot have ay health isurace coverage durig the last moths. Test the researcher s hypothesis at the level of sigificace of 0.05. HT - 38 Hypothesis: H 0 : p =.0 : p.0 (Two-sided test) p0..0 z = = =.3 Test Statistic: p0( p0).0(.0) 000 p-value = x.00 =.004 Decisio Rule: Reject ull hypothesis if p-value <.05. Coclusio: p-value =.004 <.05. There is sufficiet evidece to support the alterative hypothesis that the percetage is statistically sigificatly differet from 0%. Two Idepedet Samples z-test for Two Proportios Purpose: Compare proportios of two populatios Assumptio: Two idepedet large radom samples. Step : Hypothesis: ) H 0 = p p ) H 0 = p > p 3) H 0 = p < p Ex. 8.0 HT - 39 HT - 40 If a radom sample of size from populatio has x successes, ad a radom sample of size from populatio has x successes, the sample proportios of these two samples are x p ˆ = (proportio of successes i sample ) x p ˆ = (proportio of successes i sample ) x + x = (overall sample proportio of successes) + Step : Test Statistic: z = ( p ( ) + (If H 0 = p, the p p = 0 ) z has a stadard ormal distributio if ad are large. HT - 4 p ) Step 3: Decisio Rule: p-value approach: Compute p-value, p, p-value = P( z ) > p, p-value = P( z ) < p, p-value = P( z ) reject H 0 if p-value < α Critical value approach: Determie critical value(s) usig α, reject H 0 agaist i) H A p if z > z α/ ii) H A > p if z > z α iii) H A < p if z < z α Step 4: Coclusio HT - 4 7
Example: Test to see if the percetage of smokers i coutry A is sigificat differet from coutry B, at 5% level of sigificace? For coutry A, 500 adults were radomly selected ad 55 of them were smokers. For coutry B, 000 adults were radomly selected ad 65 of them were smokers. = 55/500 =.367 (Coutry A) = 65/000 =.36 (Coutry B) =(55+65)/(500+000) =.344 (overall percetage of smokers) HT - 43 Step : Hypothesis: H 0 = p p Step : Test Statistic: z =. 367. 344(. 344. 36 0 ) + 500 000 =. 53 p-value =.0057x = 0.04 HT - 44 Step 3: Decisio Rule: Usig the level of sigificace at 0.05, the ull hypothesis would be rejected if p-value is less tha 0.05. Step 4: Coclusio: Sice p-value = 0.04 < 0.05, the ull hypothesis is rejected. There is sufficiet evidece to support the alterative hypothesis that there is a statistically sigificatly differece i the percetages of CCofidece iterval: The ( α)% cofidece iterval estimate for the differece of two populatio proportios is ˆ ± z α/ CI does ot cover 0 smokers i coutry A ad coutry B. (0.9%, 7.3%) implies sigificat HT - 45 differece. HT - 46 p p ˆ ( p p p ˆ ) ( ) ˆ ˆ + The 95% cofidece iterval estimate for the differece of the two populatio proportios is:. 367 (. 367). 36(. 36).367.36 ±.96 + 500 000.04 ±.03 4.% ± 3.% Cofidece Iterval Estimate of Oe Proportio = 55/500 =.367 = 36.7% (from A) = 65/000 =.36 = 3.6% (from B) For A: 36.7% ± % or (34.7%, 38.9%) For B: 3.6% ±.7% or (30.9%, 34.3%) 34.7% 38.9% ( )( ) 30.9% 34.3% Methods of Testig Hypotheses Traditioal Critical Value Method P-value Method Cofidece Iterval Method Two CI s do ot overlap implies sigificat differece. HT - 47 HT - 48 8