AMS7: WEEK 7. CLASS 1 More on Hypothesis Testing Monday May 11th, 2015
Testing a Claim about a Standard Deviation or a Variance We want to test claims about or 2 Example: Newborn babies from mothers taking a Vitamin Supplement have weights with a standard deviation equal to 0.4 Kg. Requirements for the test: - The sample is a random sample - The population has a normal distribution (more strict condition than when testing claims for the mean)
Test Statistic for the Variance or the Standard Deviation = P-value and critical values are found from the Chi-square ( ) table with n-1 degrees of freedom Properties of the Chi-square: All the values are non-negative and the distribution is nonsymmetric There is a different distribution for each number of degrees of freedom Values are in Table A-4. The table gives the critical values for different areas to the right of the value
Distribution
Example IQ scores of statistics students are normally distributed with mean 100 and a standard deviation of 15. A simple random sample of 13 students yields a standard deviation of s=7.2. A psychologist thinks that the standard deviation of IQ should be higher than 15. Assume that IQ scores for statistics students is normally distributed and use a significance level of 0.05 to test this claim. 1) Hypothesis in symbolic form: Ho: =15 H1: >15 (Original claim) We have a right-tailed test.
Example (Cont.) 2) Use test statistic = deviation) (for variance or standard = = (. ) = 2.765 (Assume Ho is True) 3) Use table with 12 degrees of freedom Area to the right of the critical value is 0.05. Critical value is = 21.026. The critical region are all the values greater than 21.026. 4) Since the test statistic is not in the critical region we fail to reject Ho. We do not have enough evidence from the sample to claim that the standard deviation of IQ scores o statistics students is greater than 15.
Hypothesis testing to compare properties from two populations We will: 1) Compare two proportions p 1 and p 2 (assuming independent populations) where p 1 is the proportion in population 1 and p 2 proportion in population 2. is the 2) Compare two means 1 and 2 (assuming independent populations) where 1 is the population 1 mean and 2 is the population 2 mean.
Comparing two proportions Null hypothesis and alternative hypotheses: Ho: p 1 = p 2 Ho: p 1 - p 2 =0 (is the same as) H1: p 1 < p 2 or p 1 > p 2 or p 1 p 2 H1: p 1 - p 2 <0 or p 1 - p 2 >0 or p 1 - p 2 0 Left-tailed Right-tailed Two-tailed Requirements: For each sample check: - Number of successes is at least five - Number of failures is at least five
Example In a study of women and heart disease, the following sample results were obtained: among 10,239 women with low level of physical activity (less than 200 kcal/wk), there were 101 cases of heart disease. Among 9,877 women with physical activity between 200 and 600 kcal/wk, there were 56 cases of heart disease. Use a 0.05 significance level to test the claim that the rate of heart disease is higher for women with lower levels of physical activity.
Example (Cont.) p 1 : Proportion of cases of heart disease in women with low level of physical activity p 2 : Proportion of cases of heart disease in women with higher level of physical activity Problem data: x1=101 x2=56 n1= 10,239 n2=9,877 = = =0.00986 = = = 0.00567 = 1 =0.99014 = 1 =0.99433
Setting the Hypothesis Test Pooled estimate of p 1 and p 2 (Mixing the two samples) 1 + 2 = 1 + 2 = 1 Test statistic: We want to test a hypothesis or claim on (p 1 - p 2 ) : Sample estimate of (p 1 - p 2 ) (p 1 - p 2 ): Mean of ( )
Test Statistics We assume Ho is True. Normally Ho:(p 1 - p 2 )=0 This is zero!!! = ( ) 1 + 2 The denominator is the standard deviation of ( assuming p 1 = p 2 Since Ho is assumed to be true before hand, p 1 - p 2 is zero. The test statistics is: = 1 + 2 )
Example (Cont.) In the example: Claim: p 1 > p 2 1) Hypothesis: Ho: p 1 = p 2 Ho: p 1 - p 2 =0 H1: p 1 > p 2 H1: p 1 - p 2 >0 (Right-Tailed Test) 2) Critical values: =0.05; z = 1.645. Critical region: Values of the test statistic > 1.645
Example (Cont.) Pooled proportion estimates: = = =0.0078 = 1 = 0.9922 ( )= + =.. +.. =0.00124 z= = =.. = 3.38
Example (Cont.) 3) Decision: - Observed z statistics (3.38) is in the critical region REJECT Ho. Using the p-value method: - P-value=P(z>3.38)=1-0.9996=0.0004 < 0.05 REJECT Ho ( Results are expected to be identical) - The sample data support the claim that the proportion of heart disease cases in the group of women with low level of physical activity is significantly higher than the cases in the high activity group.
Confidence Interval of the difference (p 1 - p 2 ) ( ) E < p 1 -p 2 < ( ) + E Where E = + / In this example we find the 90% confidence interval or (1-2 ) 100% CI with =0.05 E = + / = 1.645 = 0.00203.. +..
Confidence Interval of the difference (p 1 - p 2 ) (Cont.) C.I. 0.00419-0.0023< p 1 -p 2 < 0.00419+0.00203 0.00216 < p 1 -p 2 < 0.00622 The interval does not contain the Zero REJECT Ho
Inferences about two means We want to test hypothesis about ( 1-2 ) Requirements 1) Independent samples 2) Simple random samples 3) n1>30, n2>30 and/or both samples come from normally distributed populations We normally do not know the population standard deviations
Test statistics for comparing two population means Student t distribution: = 1 2 ( ) = 1 2 1 + 2 Degrees of Freedom (df): This book assumes df= smaller value between (n1-1) y (n2-1) (See page 390 in the Textbook) Confidence Interval: ( ) E < 1-2 < ( ) + E Where E = / + between (n1-1) and (n2-1).. Degrees of freedom= smaller value