Inroducion o Hypohesis Tesing Research Quesion Is he average body emperaure of healhy aduls 98.6 F? HT - 1 HT - 2 Scienific Mehod 1. Sae research hypoheses or quesions. µ = 98.6? 2. Gaher daa or evidence (observaional or experimenal) o answer he quesion. x = 98.46 3. Summarize daa and es he hypohesis. 4. Draw a conclusion. HT - 3 Saisical Hypohesis Null hypohesis (H ): Hypohesis of no difference or no relaion, ofen has =,, or noaion when esing value of parameers. Example: H : µ = 98.6 F or H : Average body emperaure is 98.6 HT - 4 Saisical Hypohesis Alernaive hypohesis (H A ): [or H 1 or H a ] Usually corresponds o research hypohesis and opposie o null hypohesis, ofen has >, < or noaion in esing mean. Example: H A : µ 98.6 F or H A : Average body emperaure is no 98.6 F HT - 5 Hypoheses Saemens Example A researcher is ineresed in finding ou wheher average hourly salary for baby siing is differen from $6.. H : µ = 6 H A : µ 6 [Two-ailed es] HT - 6 Hypohesis Tesing - 1
Hypoheses Saemens Example A researcher is ineresed in finding ou wheher average life ime of male is higher han 77 years. H : µ = 77 ( or µ 77 ) H A : µ > 77 [Righ-ailed es] Hypoheses Saemens Example A researcher is ineresed in finding ou wheher he average regular gasoline price is less han $1.45 in Mid-Wes region. H : µ = 1.45 ( or µ 1.45 ) H A : µ < 1.45 [Lef-ailed es] HT - 7 HT - 8 Evidence Tes Saisic (Evidence): A sample saisic used o decide wheher o rejec he null hypohesis. HT - 9 Logic Behind Hypohesis Tesing In esing saisical hypohesis, he null hypohesis is firs assumed o be rue. We collec evidence o see if he evidence is srong enough o rejec he null hypohesis and suppor he alernaive hypohesis. HT - 1 I. Hypohesis One Sample -Tes for Mean (Large sample es) Two-Sided Tes One wishes o es wheher he average body emperaure for healhy aduls is differen from 98.6 F. H o : µ = 98.6 F v.s. H A : µ 98.6 F HT - 11 HT - 12 Hypohesis Tesing - 2
Evidence Wha will be he key saisic (evidence) o use for esing he hypohesis abou populaion mean? Sample mean: A random sample of 36 subjecs is chosen and he sample mean is 98.46 F and sample sandard deviaion is.3 F. x HT - 13 Sampling Disribuion If H : µ = 98.6 F is rue, sampling disribuion of mean will be approximaely normally disribued wih mean 98.6 and sandard.3 deviaion (or sandard error) =.5. 36 98.6 σ x =.5 X HT - 14 II. Tes Saisic x µ x µ z = = σ x σ n 98.46 98.6.14 = = = 2.8.3.5 36 98.46 98.6 2.8 This implies ha he saisic is 2.8 sandard deviaions away from he mean 98.6 under H, and is o he lef of 98.6 (or less han 98.6) X HT - 15 Level of Significance Level of significance for he es (α) A probabiliy level seleced by he researcher a he beginning of he analysis ha defines unlikely values of sample saisic if null hypohesis is rue. c.v. = criical value Toal ail area = α c.v. c.v. HT - 16 Criical value approach: Compare he es saisic wih he criical values defined by significance level α, usually α =.5. We rejec he null hypohesis, if he es saisic z < z α/2 = z.25 = 1.96, or z > z α/2 = z.25 = 1.96. ( i.e., z > z α/2 ) p-value approach: Compare he probabiliy of he evidence or more exreme evidence o occur when null hypohesis is rue. If his probabiliy is less han he level of significance of he es, α, hen we rejec he null hypohesis. p-value = P( 2.8 or 2.8) =2 x P( 2.8) = 2 x.3 =.6 Rejecion Rejecion region region Lef ail area.3 α/2=.25 α/2=.25 Two-sided Tes 1.96 1.96 Two-sided Tes 2.8 2.8 2.8 Criical values HT - 17 HT - 18 Hypohesis Tesing - 3
p-value p-value The probabiliy of obaining a es saisic ha is as exreme or more exreme han acual sample saisic value given null hypohesis is rue. I is a probabiliy ha indicaes he exremeness of evidence agains H. The smaller he p-value, he sronger he evidence for supporing Ha and rejecing H. HT - 19 IV. Draw conclusion Since from eiher criical value approach z = 2.8 < z α/2 = 1.96 or p-value approach p-value =.6 < α =.5, we rejec null hypohesis. Therefore we conclude ha here is sufficien evidence o suppor he alernaive hypohesis ha he average body emperaure is differen from 98.6ºF. HT - 2 Seps in Hypohesis Tesing 1. Sae hypoheses: H and H A. 2. Choose a proper es saisic, collec daa, checking he assumpion and compue he value of he saisic. 3. Make decision rule based on level of significance(α). 4. Draw conclusion. (Rejec null hypohesis or no) When do we use his z-es for esing he mean of a populaion? Large random sample. A random sample from normally disribued populaion wih known variance. HT - 21 HT - 22 I. Hypohesis One-Sided Tes One wishes o es wheher he average body emperaure for healhy aduls is less han 98.6 F. Example wih he same daa: A random sample of 36 subjecs is chosen and he sample mean is 98.46 F and sample sandard deviaion is.3 F. H o : µ = 98.6 F v.s. H A : µ < 98.6 F This is a one-sided es, lef-side es. HT - 23 HT - 24 Hypohesis Tesing - 4
II. Tes Saisic x µ x µ z = = σ x σ n 98.46 98.6.14 = = = 2.8.3.5 36-2.8 This implies ha he saisic is 2.8 sandard deviaions away from he mean 98.6 in H, and is o he lef of 98.6 (or less han 98.6) HT - 25 Criical value approach: Compare he es saisic wih he criical values defined by significance level α, usually α =.5. We rejec he null hypohesis, if he es saisic z < z α = z.5 = 1.64. Lef-sided Tes Rejecion region α=.5 1.64 2.8 Criical values HT - 26 p-value approach: Compare he probabiliy of he evidence or more exreme evidence o occur when null hypohesis is rue. If his probabiliy is less han he level of significance of he es, α, hen we rejec he null hypohesis. p-value = P(z 2.8) =.3 Lef ail area.3 Lef-sided Tes α =.5 2.8 HT - 27 IV. Draw conclusion Since from eiher criical value approach z = 2.8 < z α = 1.64 or p-value approach p-value =.3 < α =.5, we rejec null hypohesis. Therefore we conclude ha here is sufficien evidence o suppor he alernaive hypohesis ha he average body emperaure is less han 98.6 F. HT - 28 Decision Rule Criical value approach: Deermine criical value(s) using α, rejec H agains i) H A : µ µ, if z > z α/2 ii) H A : µ > µ, if z > z α iii) H A : µ < µ, if z < z α HT - 29 Decision Rule p-value approach: Compue p-value, : µ µ, p-value = 2 P( z ) : µ > µ, p-value = P( z ) : µ < µ, p-value = P( z ) rejec H if p-value < α HT - 3 Hypohesis Tesing - 5
Errors in Hypohesis Tesing Possible saisical errors: Type I error: The null hypohesis is rue, bu we rejec i. Type II error: The null hypohesis is false, bu we don rejec i. α is he probabiliy of commiing Type I Error. α Can we see daa and hen make hypohesis? 1. Choose a es saisic, collec daa, checking he assumpion and compue he value of he saisic. 2. Sae hypoheses: H and H A. 3. Make decision rule based on level of significance(α). 4. Draw conclusion. (Rejec null hypohesis or no) HT - 31 HT - 32 One Sample -Tes for Mean x µ = s n HT - 33 One-sample Tes wih Unknown Variance σ 2 In pracice, populaion variance is unknown mos of he ime. The sample sandard deviaion s 2 is used insead for σ 2. If he random sample of size n is from a normal disribued populaion and if he null hypohesis is rue, he es saisic (sandardized sample mean) will have a -disribuion wih degrees of freedom n 1. x µ Tes Saisic : = s n HT - 34 I. Sae Hypohesis One-side es example: If one wish o es wheher he body emperaure is less han 98.6 or no. H : µ = 98.6 v.s. H A : µ < 98.6 (Lef-sided Tes) HT - 35 II. Tes Saisic If we have a random sample of size 16 from a normal populaion ha has a mean of 98.46 F, and a sample sandard deviaion.2. The es saisic will be a -es saisic and he value will be: (sandardized score of sample mean) x µ 98.46 98.6.14 Tes Saisic : = = = = 2.8 s.2.5 n 16 Under null hypohesis, his -saisic has a - disribuion wih degrees of freedom n 1, ha is, 15 = 16 1. HT - 36 Hypohesis Tesing - 6
Criical Value Approach: To es he hypohesis a α level.5, he criical value is α =.5 = 1.753. Rejecion Region 1.753 2.8 Descion Rule: Rejec null hypohesis if < 1.753 HT - 37 HT - 38 Decision Rule: Rejec null hypohesis if p-value < α. HT - 39 p-value Calculaion p-value corresponding he es saisic: For es, unless compuer program is used, p- value can only be approximaed wih a range because of he limiaion of -able. p-value = P(T< 2.8) P(T<-2.8) = <? P(T< 2.62) =.1 Since he area o he lef of 2.62 is.1, he area o he lef of 2.8 is definiely less han.1. Area o he lef of 2.62 is.1 2.8 2.62 HT - 4 IV. Conclusion Decision Rule: If < 1.753, we rejec he null hypohesis, or if p-value <.5, we rejec he null hypohesis. Conclusion: Since = 2.8 < 1.753, or say p-value <.1 <.5, we rejec he null hypohesis. There is sufficien evidence o suppor he research hypohesis ha he average body emperaure is less han 98.6 F. Wha if we wish o es wheher he average body emperaure is differen from 98.6 F using -es wih he same daa? The p-value is equal o wice he p-value of he lef-sided es which will be less han.2. HT - 41 2.8 2.8 HT - 42 Hypohesis Tesing - 7
Decision Rule Criical value approach: Deermine criical value(s) using α, rejec H agains i) H A : µ µ, if > α/2 ii) H A : µ > µ, if > α Decision Rule p-value approach: Compue p-value, : µ µ, p-value = 2 P( T ) : µ > µ, p-value = P( T ) : µ < µ, p-value = P( T ) iii) H A : µ < µ, if < α rejec H if p-value < α HT - 43 HT - 44 When do we use his -es for esing he mean of a populaion? A random sample from normally disribued populaion wih unknown variance. When sample size is relaively large he -score is approximaely equal o z-score herefore -es will be almos he same as z-es. HT - 45 Remarks If he sample size is relaively large (>3) boh z and ess can be used for esing hypohesis. -es is robus agains normaliy. In fac, if he sample size is small and he sample is from a very skewed or any nonnormal disribuion, we can use nonparameric alernaives such Sign Tes or Signed-Rank Tes. Many commercial packages only provide -es since sandard deviaion of he populaion is ofen unknown. HT - 46 "Our findings confliced wih Wunderlich's in ha 36.8 degrees C (98.2 degrees F) raher han 37. degrees C (98.6 degrees F) was he mean oral emperaure of our subjecs.... Thiry-seven degrees cenigrade (98.6 degrees F) should be abandoned as a concep relevan o clinical hermomery..." Mackowiak, P. A., Wasserman, S. S., and Levine, M. M. "A Criical Appraisal of 98.6 Degrees F, he Upper Limi of he Normal Body Temperaure, and Oher Legacies of Carl Reinhold Augus Wunderlich." Journal of he American Medical Associaion. 268, 12 (23-3 Sepember 1992): 1578-8. Research Quesion (Revisi) Is he average choleserol level of a cerain populaion 211 mg/1ml? HT - 47 HT - 48 Hypohesis Tesing - 8
P( X > 225) =? X ~ N (µ = 211, s = ) x x n = 1 H : µ = 211 H A : µ > 211 Conclusion! 4.6 Criical Value: 211 225 1.64 3.4 Claim: Choleserol Level has a mean 211. Evidence: x = 225 s = 46.1 x 225 211 = 3.4 4.6 z P-value for righ sided es! HT - 49 Saisical Significance A saisical repor shows ha he average blood pressure for women in cerain populaion is significanly differen from a recommended level, wih a p-value of.2 and he -saisic of 6.2. I generally means ha he difference beween he acual average and he recommended level is saisically significan. And, i is a wo-sided es. Is he average blood pressure significanly less han he recommended level? HT - 5 = 6.2 H A : µ µ H A : µ < µ Saisical Repor p-value for wo-sided es =.2 6.2 6.2 p-value for lef-sided es =.1 6.2 p-value for righ-sided es =.999 Average Weigh for Female Ten Year Children In US Info. from a random sample: n = 1, x = 8 lb, s = 18.5 lb. Is average weigh greaer han 78 lb a α =.5 level? (H A : µ > 78) Tes Saisic: 8 78 = =.35 18.5 1 1.833 α =.5, d.f. = 1 1 = 9,.5, 9 = 1.833 H A : µ > µ Rejec H, if =.35 < 1.833. Failed o rejec H! 6.2 HT - 51 HT - 52 Average Weigh for Female Ten Year Children In US Info. from a random sample: n = 4, x = 8 lb, s = 18.5 lb. Is average weigh greaer han 78 lb a α =.5 level? (H A : µ > 78) 8 78 Tes Saisic: = = 2.22 18.5 1.65 4 α =.5, d.f. = 4 1 = 399,.5, 399 = 1.65 Rejec H, if = 2.22 > 1.65. Rejec H! HT - 53 Sampling Disribuion 18.5 S.E. = = 5.71 1 n = 1 X 78 8 18.5 S.E. = =.9 4 n = 4 X Pracical Significance? 78 8 HT - 54 Hypohesis Tesing - 9