Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
1 Testing hypothesis about population mean Basic Idea : Suppose that in a box there are 100 balls which are identical except their two distinct colors: white or black. Assume that 1 ball has one color and remaining 99 balls have an alternative color. If we randomly draw a ball which is white, what conclusion can we make about the color of the 99 balls? Why? Definition: An event B is said to be a rare event if it is not easy to be observed or its probability P(B) is small. Usually P(B) ≤ 10%. In above example, we make a hypothesis that there is only 1 white ball, in other words, the 99 balls have black color. If this hypothesis were correct, observation of white color would be a rare event (with probability 1%). However, we observed it at the first experiment. Therefore, We doubt that there are only one white ball or in the other words we doubt that the observation of white color is a rare event. Thus, we make a decision that the hypothesis is wrong and rejected. we draw a conclusion that the 99 balls have white color. We have 99% confidence that our conclusion is true. In the following, from above basic idea we will develop a procedure or statistics method to test a hypothesis. The key point is to derive a rare event, then conduct a test and make decision. Z test for a population mean: Suppose that we know the population having a normal 2 distribution N (µ, σ) with unknown µ and known standard deviation σ. By the past experience, we have a conjecture that µ = a. Now the question is how to develop a statistic method to check whether this conjecture is true. According to the basic idea described above. We give a hypothesis first. Then, we choose a random variable including the information of the hypothesis. This random variable is called a statistic. For a given small probability α which is called the significance level, we can find a rare event of the statistic with the significance level. From this rare event, we can find the rejection region. Then, a test can be conducted. The detailed procedure is presented as follows: (1)(Null) Hypothesis H0 : µ = a versus Ha : µ 6= a (Null hypothesis is our conjecture which need to be tested.) (2) Test statistics : z := x̄ − µ √ ∼ N (0, 1) σ/ n (3) Set a significance level α, say α = 5%. (4) Find the rejection region. For given α, since P(−z ∗ ≤ ξ ≤ z ∗) = 1 − α This means that with 1 − α = 95% of probability, z will fall in the interval [−z ∗, z ∗]. In other words, if we define R := (−∞, −z ∗) ∪ (z ∗, ∞), 3 then (ξ ∈ R) is a rare event (P(ξ ∈ R) = 5%). Since a rare event is not easy to be observed, if the observed sample mean x̄ makes x̄ − µ √ ∈ R, σ/ n this means that a rare event is observed at first experiment. Thus, this contradiction makes us doubt that such an event is a rare event. We trace back for mistakes. The step-by-step reasoning has no-problem. We found that the only possible mistake is the null hypothesis. Thus, we reject the null hypothesis. Example: By past experience, we know that the daily yield of a chemical manufactured in a chemical plant has N (µ, σ = 21). The 50 day observed sample mean of the daily yields is x̄ = 871 tons. Test the hypothesis that the average daily yield of the chemical is µ = 880 tons per day against the alternative µ 6= 880 using α = 0.05. (1) H0 : µ = 880 Ha : µ 6= 880 (2) Test statistic: Z := X̄ − 880 √ ∼ N (0, 1) 21/ 50 (3) significance level α = 0.05. (4) If H0 is true, then P(−1.96 ≤ X̄ − 880 √ ≤ 1.96) = 0.95 21/ 50 4 Thus, the rejection region is R = (−∞, −1.96) ∪ (1.96, ∞). Since 871 − 880 √ = −3.03 ∈ R, 21/ 50 we reject the null hypothesis µ = 880 tons. Above example is a two sided alternatives since µ 6= 880. Therefore, the rejection region is also two sided, i.e. R = (−∞, −1.96) ∪ (1.96, ∞). Some situations, we have one-sided alternative. Test procedure: Let x1, x2, · · · , xn be a SRS of size n from a normal distribution with unknown mean µ and known standard deviation σ . Define x̄ − µ0 √ . z =: σ/ n (a) To test H0 : µ = µ0 versus Ha : µ > µ0 at the α level of significance, reject H0 if z ≥ zα , where P(Z ≥ zα ) = α. (b) To test H0 : µ = µ0 versus Ha : µ < µ0 at the α level of significance, reject H0 if z ≤ −zα , where P(Z ≤ −zα ) = α. (c) To test H0 : µ = µ0 versus Ha : µ 6= µ0 at the α level of significance, reject H0 if z ≥ zα/2 or z ≤ −zα/2, where P(|Z| ≥ zα/2) = α. The p-value is the smallest α at which we can reject H0. More precisely, we have p-value = P(Z ≥ z) + P(Z ≤ −z) for two sided test p-value = P(Z ≥ z) for one sided test Ha : µ > µ0 p-value = P(Z ≤ −z) for one sided test Ha : µ < µ0 5 where Z ∼ N (0, 1) and the lower case z is the observed value of the test statistic. Example: A petroleum company is searching for additives that might increase gas mileage. As a pilot study, they send 30 cars fueled with a new additive on a road trip from New York to Los Angeles. Without the additive, those same cars are known to average 25.0 mpg(mileage per gallon) with a standard deviation of 2.4 mpg. It turns out that the 30 cars averaged ȳ = 26.3 mpg with the additive. We know that the mileage per gallon has a normal distribution N (µ, 2.4). Test the hypothesis that the additive is not effective. (1) H0 : µ = 25.0 Ha : µ > 25.0 (additive is effective) (2) If H0 is true, Test statistic: Z := X̄ − 25.0 √ ∼ N (0, 1). 2.4/ 30 26.3 − 25.0 √ = 2.9668, 2.4/ 30 we reject the null hypothesis µ = 25.0 mpg since the p-value p = P(Z ≥ 2.9668) = 0.0015. The additive is effective. This is an example of one sided hypothesis test. Chapter Sixteen: Inference in practice When we use statistical inference, we have to be cautious about the following conditions: (1) The data must be an SRS from the population. 6 (2) The z procedures aren’t correct for probability samples more complex than a SRS. (3) Outliers can distort the result. (4) The population distribution has to be normal. (5) You must know the standard deviation of the population. (6) undercoverage and nonresponse are often more serious than random sampling error. (7) Sample size affects statistical significance. (8) p-value is less than 10%. Example: You turn your Web browser to the online Excite Poll. You see that yesterday’s question was ”Do you support or oppose state laws allowing illegal immigrants to have driver’s license?” In all, 10, 282 people responded, with 8138 (79%) saying they were opposed. You should refuse to calculate any 95% confidence interval based on this sample because (1) yesterday’s responses are meaningless today. (2) inference from a voluntary response sample can’t be trusted. (3) the sample is too large. Solution: (2) is correct because this voluntary response sample collects only the opinions of those who visit this site and feel strongly enough to respond. Chapter Eighteen: Population mean inference with unknown σ 7 CI for the mean of a normal population: Draw an SRS of size n from a normal population having unknown mean µ and unknown standard deviation σ. A level C confidence interval for µ is s s [x̄ − t∗ √ , x̄ + t∗ √ ], n n where t∗ is the level C critical point from the t distribution t(n − 1), i.e. P(|t| ≤ t∗) = P({−t∗ ≤ t ≤ t∗}) = C. For example, if C = 95% and n = 3, then t∗ = 4.303 from the Table C. In above CI, t∗ √σn is called the margin of error with C confidence. Example: A random sample of 10 high school students gains an average of x̄ = 22 points in their second attempt at the SAT mathematical exam. The change in score has a normal distribution with unknown standard deviation. The sample standard deviation is s = 20. (1) Find the 95% CI for µ. (2) Find the margin of error for 99% confidence. Solution: (1) The 95% CI for µ is s s 20 20 [x̄ − t∗ √ , x̄ + t∗ √ ] = [22 − 2.262 √ , 22 + 2.262 √ ] n n 10 10 = [7.693855, 36.3061] (2) The the margin of error for 99% confidence is s 20 t∗ √ = 3.25 √ = 20.5548. n 10 8 Test procedure: Let x1, x2, · · · , xn be a SRS of size n from a normal distribution with unknown mean µ and unknown standard deviation σ . Define x̄ − µ0 t =: √ ∼ t(n − 1). s/ n (a) To test H0 : µ = µ0 versus Ha : µ > µ0 at the α level of significance, reject H0 if t ≥ tα , where P(t ≥ tα ) = α. (b) To test H0 : µ = µ0 versus Ha : µ < µ0 at the α level of significance, reject H0 if t ≤ −tα , where P(t ≤ −tα ) = α. (c) To test H0 : µ = µ0 versus Ha : µ 6= µ0 at the α level of significance, reject H0 if t ≥ tα/2 or t ≤ −tα/2, where P(|t| ≥ tα/2) = α. The p-value is the smallest α at which we can reject H0. More precisely, we have p-value = P(t ≥ t0) + P(t ≤ −t0) for two sided test p-value = P(t ≥ t0) for one sided test Ha : µ > µ0 p-value = P(t ≤ −t0) for one sided test Ha : µ < µ0 where t ∼ t(n − 1) and the t0 is the observed value of the test statistic.