Itroductio to Hypothesis Testig Research Questio Is the average body temperature of healthy adults differet from 98.6 F? HT - 1 98. 98.5 98.3 98.1 98.3 98.7 98.1 98.4 98. 98.4 98.3 98. x 98.31 s.17 HT - Statistical Hypothesis Null hypothesis (H ): Statistical Hypothesis Alterative hypothesis (H A ): [or H 1 or H a ] Hypothesis of o differece or o relatio, ofte has =,, or otatio whe testig value of parameters. Example: H : = 98.6 F or Usually correspods to research hypothesis ad opposite to ull hypothesis, ofte has >, < or otatio i testig mea. Example: H A : 98.6 F or H A : Average body temperature is ot 98.6 F H : Average body temperature is 98.6 HT - 3 HT - 4 Hypotheses Statemets Example A researcher is iterested i fidig out whether average life time of male is higher tha 77 years. H : = 77 ( or 77 ) H A : > 77 [Right-tailed test] Oe Sample Z-Test for Mea (Large sample test) Oe-Sided Test HT - 5 HT - 6 Hypothesis Testig - 1
I. Hypothesis Oe wishes to test whether the average body temperature for healthy adults is less tha 98.6 F. H : = 98.6 F v.s. H A : < 98.6 F This is a oe-sided test, left-side test. Evidece What will be the key statistic (evidece) to use for testig the hypothesis about populatio mea? Sample mea: A radom sample of 36 subjects is chose ad the sample mea is 98.46 F ad sample stadard deviatio is.3 F. x HT - 7 HT - 8 Samplig Distributio If H : = 98.6 F is true, samplig distributio of mea Normal with mea = 98.6.3 stadard deviatio = =.5. 36 98.6 x.5 X HT - 9 II. Test Statistic x x s s x -.8 98.46 98.6.14.8.3.5 36 This implies that the statistic is.8 stadard deviatios away from the mea 98.6 i H, ad is to the left of 98.6 (or less tha 98.6) HT - 1 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 = III. Decisio Rule Critical value approach: Compare the test statistic with the critical values defied by sigificace level, usually =.5. We reject the ull hypothesis, if the test statistic < =.5 = 1.64. Rejectio regio =.5 Not a commo approach! c.v. HT - 11 Left-sided Test Z 1.64.8 Critical values HT - 1 Hypothesis Testig -
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. The smaller the p-value, the stroger the evidece i supportig H A ad rejectig H. HT - 13 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(.8) =.3 Left tail area.3 Left-sided Test =.5.8 Z HT - 14 IV. Draw coclusio Sice from either critical value approach =.8 < = 1.64 or p-value approach p-value =.3 < =.5, we reject ull hypothesis. Therefore we coclude that there is sufficiet evidece to support the alterative hypothesis that the average body temperature is less tha 98.6 F. HT - 15 Decisio Rule p-value approach: Compute p-value, :, p-value = P( Z ) : >, p-value = P( Z ) : <, p-value = P( Z ) reject H if p-value < HT - 16 Steps i Hypothesis Testig 1. State hypotheses: H 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 ull hypothesis if p-value <.) 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 - 17 Z HT - 18 Hypothesis Testig - 3
Ca we see data ad the make hypothesis? 1. Choose a test statistic, collect data, checkig the assumptio ad compute the value of the statistic.. State hypotheses: H ad H A. 3. Make decisio rule based o level of sigificace(). 4. Draw coclusio. Oe Sample t-test for Mea x s t HT - 19 HT - Oe-sample Test with Ukow Variace I practice, populatio variace is ukow most of the time. The sample stadard deviatio s is used istead for. If the radom sample of sie is from a ormal distributed populatio ad if the ull hypothesis is true, the test statistic (stadardied sample mea) will have a t-distributio with degrees of freedom 1. x Test Statistic : t s HT - 1 I. State Hypothesis Oe-side test example: If oe wish to test whether the body temperature is less tha 98.6 or ot. H : = 98.6 v.s. H A : < 98.6 (Left-sided Test) HT - II. Test Statistic If we have a radom sample of sie 16 from a ormal populatio that has a mea of 98.46 F, ad a sample stadard deviatio.. The test statistic will be a t-test statistic ad the value will be: (stadardied score of sample mea) x 98.46 98.6.14 Test Statistic: t.8 s..5 16 Uder ull hypothesis, this t-statistic has a t- distributio with degrees of freedom 1, that is, 15 = 16 1. HT - 3 III. Decisio Rule Critical Value Approach: To test the hypothesis at level.5, the critical value is t = t.5 = 1.753. Rejectio Regio 1.753.8 Descio Rule: Reject ull hypothesis if t < 1.753 t HT - 4 Hypothesis Testig - 4
III. Decisio Rule Decisio Rule: Reject ull hypothesis if p-value <. HT - 5 HT - 6 p-value Calculatio p-value correspodig the test statistic: For t test, uless computer program is used, p- value ca oly be approximated with a rage because of the limitatio of t-table. p-value = P(T<-.8) P(T<.8) = <? P(T<.6) =.1 Sice the area to the left of.6 is.1, the area to the left of.8 is defiitely less tha.1. Area to the left of.6 is.1 IV. Coclusio Decisio Rule: If t < 1.753, we reject the ull hypothesis, or if p-value <.5, we reject the ull hypothesis. Coclusio: Sice t =.8 < 1.753, or say p-value <.1 <.5, we reject the ull hypothesis. There is sufficiet evidece to support the research hypothesis that the average body temperature is less tha 98.6 F. t Smaller tha.1.8.6 HT - 7 HT - 8 What if we wish to test whether the average body temperature is differet from 98.6 F usig t-test with the same data? The p-value is equal to twice the p-value of the left-sided test which will be less tha.. Decisio Rule p-value approach: Compute p-value, :, p-value = P( T t ) : >, p-value = P( T t ) : <, p-value = P( T t ).8.8 HT - 9 reject H if p-value < HT - 3 Hypothesis Testig - 5
Whe do we use this t-test for testig the mea of a populatio? A radom sample from ormally distributed populatio with ukow variace. or Whe sample sie is relatively large the t- score is approximately equal to -score therefore t-test will be almost the same as - test. HT - 31 Remarks If the sample sie is relatively large (>3) both ad t tests ca be used for testig hypothesis. t-test is robust agaist ormality. If the sample sie is small ad the sample is from a very skewed or other o-ormal distributio, we ca use oparametric alteratives Siged-Rak Test. May commercial packages oly provide t-test sice stadard deviatio of the populatio is ofte ukow. HT - 3 Average Weight for Female Te Year Childre I US Ifo. from a radom sample: x = 8 lb, s = 18.5 lb. Is average weight greater tha 78 lb at =.5 level? H : Mea is 78 lb H a : Mea is greater tha 78 lb HT - 33 Samplig Distributio 18.5 S.E. = 5.71 1 = 1 X 78 8 8 78 t S. E. 18.5 S.E. =.9 = 4 4 X Practical Sigificace? 78 8 HT - 34 Type I & Type II Error Power ad Sample Sie i Testig Oe Mea Type I Error: reject the ull hypothesis whe it is true. The probability of a Type I Error is deoted by. Type II Error: accept the ull hypothesis whe it is false ad the alterative hypothesis is true. The probability of a Type II Error is deoted by. 35 1 : Power of the test 36 Hypothesis Testig - 6
Null hypothesis Decisio True False Reject H Type I Error Correct Decisio Do ot reject H Correct Decisio 1 Type II Error 1 37 Power of the Test The power of the statistical test is the ability of the study as desiged to distiguish betwee the hypothesied value ad some specific alterative value. That is, the power is the probability of rejectig the ull hypothesis if the ull hypothesis is false. Power = P(reject H H is false) Power = 1 The power is usually calculated give a simple alterative hypothesis: H a : = 11 mg/1ml Power = P(reject H H a is true) 38 Formula: The estimated sample sie for a oesided test with level of sigificace ad a power of 1 to detect a differece of a is, ( ) a Or, if is the effect sie, i terms of umber of stadard deviatios, to be detected, the sample sie ( ) 39 For a two-sided test, the formula is ( / ) a Or, if is the effect sie, i terms of umber of stadard deviatios, to be detected, the sample sie would be ( / ) 4 Example: For testig hypothesis that ( / ) a H : = = 7 v.s. H a : 7 (Two-sided Test) with a level of sigificace of =.5. Fid the sample sie so that oe ca have a power of 1 =.9 to reject the ull hypothesis if the actual mea is 5 uit differet from. The stadard deviatio,, is approximately equal 15. =.5 1 =.9 =.1 (1.96 1.8) 15 5 / =.5 = 1.96 =.1 = 1.8 94.48 95 The sample sie eeded is 95. 41 4 Hypothesis Testig - 7