Hypothesis test A statistical hypothesis is a statement about the population parameter(s) or distribution. null hypothesis H 0 : prior belief statement. alternative hypothesis H a : a statement that contradicts H 0. A test of hypothesis is a method for using sample data to decide whether H 0 should be rejected. test statistic: a function of sample data on which the decision (reject H 0 or do not reject H 0 ) is to be based. rejection region: The set of all statistic values for which H 0 will be rejected. Type I error: rejecting H 0 when it is true. Type II error: not rejecting H 0 when it is false.
example: An observation X comes from a normal distribution with µ and σ = 1. Test H 0 : µ = 0 vs H a : µ 0. Test statistic: X. Rejection region : x > 1.28 or x < 1.28. α = P(Type I error) = P(H 0 rejected when it is true) = P(X > 1.28orX < 1.28whenµ = 0) = P(Z > 1.28) + P(Z < 1.28) = 0.20. β(2) = P(type II error whenµ = 2) = P(H 0 is not rejected whenµ = 2) = P( 1.28 X 1.28whenµ = 2) = P( 3.28 Z 0.72) = 0.2358 0.0005 = 0.2353. Compute α and β for R : x > 1.96 or x < 1.96.
proposition: For a fixed sample size and a chosen test statistic, decrease α will increase β. Usually fix the size of α and minimize β. The largest value of α that can be tolerated is called the significance level of the test.
Suppose the nicotine content of brand B cigarettes is normal with mean µ and σ = 0.20. Test H 0 : µ = 1.5 vs H a : µ > 1.5 based on a random sample X 1,, X 32 of nicotine contents at α = 0.05. X is normal with µ X = µ and σ X = 0.20 32 = 0.0354. The test statistic is Z = X 1.5 0.0354. rejection region: z c. α = P(Z cwhenz N(0, 1)) = 0.05 c = 1.645.
Test about a population mean H 0 : µ = µ 0 Test statistic value: z = x µ 0 σ/ n. H a : µ > µ 0 rejection region: z > z α H a : µ < µ 0 rejection region: z < z α. H a : µ µ 0 rejection region: z > z α/2, or z < z α/2.
example A manufacturer of sprinkler systems claims the true average system-activation temperature is 130 o. A sample of 9 systems yields x = 131.08 o. If the activation temp is normal with σ = 1.5 o, does the data contradict the manufacturer s claim at α =.01? H 0 : µ = 130 H a : µ 130 Test statistic value: z = x µ 0 σ/ n = 131.08 130 1.5/ 9 = 2.16. Rejection region z 2.58 or z 2.58. Fail to reject H 0. The data does not give strong support that the true average differs from 130.
large sample tests Test statistic T = X µ 0 S/ n. Example: For a sample of 70 bills for meals in a restaurant, we obtained average tip (percentage) x = 17.99 with standard deviation s = 5.937. Does it seem the mean tip in this restaurant exceeds the standard 15 percent? H 0 : µ = 15 vs H a : µ > 15. t = 17.99 15 = 4.21. s/ 70 Using significance level of 0.05, reject region is t > 1.671. Since t falls in the rejection region, H 0 is rejected. There is evidence that the mean tip exceeds 15 percent.
Normal distribution with small n Standardized test statistic : T = X µ 0 S/ n. example: The changes in weights for 17 girls were 11,11,6,9,14,-3,0,7,22,-5,-4,13, 13,9,4,6,11. It can be verified that x = 7.29, s = 7.18. Perform a significance test about whether the population mean was 0, against an alternative designed to see if there is any effect.
Example H 0 : µ = 0 H a : µ 0. The t statistic is t = x 0 s/ n = 7.29 0 7.18/ 17 = 4.19. Based on α = 0.05, rejection region is t > 2.120 or t < 2.120. t falls in the rejection region. Reject H 0. The data gave evidence against H 0 in support of H a. i.e., the therapy had an effect.
exercise A manager suspects the baby food containers in his factory are underfilled. A sample of 16 containers he took randomly gives the mean weight and standard deviation as x = 497.5, s = 3.5 (in grams). The advertised weight is 500 grams. Test the hypothesis that the mean weight is 500 grams versus the hypothesis the mean weight is less than 500 grams.
H 0 : µ = 500 H a : µ < 500 t = x µ 0 s = 497.5 500 3.5 n 16 = 2.86. Using α = 0.05, the rejection region is t < 1.753. t falls in the rejection region. Reject H 0. There is evidence that the mean weight is below 500 grams.
Tests about a population proportion Test statistic: Z = ˆp p 0 p0 (1 p 0 )/n. example: A woman claimed she could tell the color (red or black) of cards by some special abilities. Of the 64 cards presented to her, she guessed 34 correctly. Test the hypothesis that the probability of correct guess is 0.50 (i.e., she has no special abilities) versus the hypothesis that the probability is bigger than 0.50. H 0 : p = 0.5. H a : p > 0.5. ˆp = 34/64 = 0.53 z = ˆp p 0 q p0 (1 p 0 ) n = 0.53 0.5 q 0.5 0.5 64 = 0.48 At α = 0.05, the rejection region is z > 1.645. z does not fall in the rejection region. We do not reject H 0. There is not sufficient evidence that her guess probability is bigger than 0.5.
exercise According to an exit poll in the 2000 NY senatorial election, 55.7% of the sample of size 2232 reported voting for Hillary Clinton. Is this enough evidence to predict who would win? Test that the population proportion who voted for Clinton was 0.50 vs the alternative that it differed from 0.50.
exercise Among 724 flu patients treated with Tamiflu, 72 experienced nausea as an adverse reaction. Test the claim that the rate of nausea is greater than the 6% rate experienced by patients given a placebo using α = 0.01.
H 0 : p = 0.06 H a : p > 0.06. ˆp = 72/724 = 0.0994 z = ˆp p 0 q p0 (1 p 0 ) n = 0.0994 0.06 q 0.06 0.94 724 = 4.46 At α = 0.01, the rejection region is z > 2.33. z falls in the rejection region. Reject H 0. There is evidence that the rate of nausea caused by Tamiflu is greater than 6 %.
exercise When Gregor Mendel conducted his famous hybridization experiments with peas, one such experiment resulted in 580 offspring peas, with 26.2% of having yellow pods. Test the claim that the proportion of yellow pods is equal to 1/4, a proportion proposed in his theory.
H 0 : p = 0.25 H a : p 0.25. ˆp = 0.262 z = ˆp p 0 q p0 (1 p 0 ) n = 0.262 0.25 q 0.25 0.75 580 = 0.67 At α = 0.05, the rejection region is z > 1.96 or z < 1.96. z does not fall in the rejection region. Do not reject H 0. There is no sufficient evidence that the proportion of yellow pods is different from 1/4.
p-value p-value is the probability of obtaining a test statistic value at least as contradictory to H 0 as the observed value assuming H 0 is true. p-value α, reject H 0, otherwise do not reject H 0. When we reject H 0, we say the result is statistically significant. Statistical significance does not mean practical significance.
computing p-value H a : µ > µ 0, p-value= P(T > t) H a : µ < µ 0, p-value = P(T < t) H a : µ µ 0, p-value = P(T > t) + P(T < t). if t > 0 Mendel example: p-value = P(Z > 0.67) + P(Z < 0.67) = 2 0.2546 = 0.5092. Baby formula example: p-value = P(T < 2.86) < 0.02. Guess color example: p-value = P(Z > 0.48) = 0.3156.
1. In 2002, the mean PH level of the rain in a river was 5.27. A researcher wonders if the acidity of rain has changed. From a random sample of 16 rain dates in 2007, she obtained x = 5.42 with s = 0.19. She checked the sample data and concluded it was reasonable to assume the PH level was normally distributed. Use α = 0.01 to assess whether the acidity of rain has changed. 2. In Feb 2008, The Gallup organization surveyed 1034 adults and found that 548 of them were worried that they will outlive their money after they retire. Does the sample evidence suggest that a majority of American adults are worried they will outlive their money? Use α = 0.05.