Lecture 20: Single Sample Hypothesis Tests: Population Mean and Proportion Devore, Ch. 8.2 - 8.3
Topics Tests of Single Population Mean Normal Population w/ known s Large Sample Tests Normal Population w/ unknown s Tests of Single Population Proportion Large Sample Test Small Sample Test
Recommended Steps in Hypothesis Testing Identify the parameter of interest and describe it in the context of the problem situation. Determine the null value and state the null hypothesis. State the alternative hypothesis.
Hypothesis-Testing Steps, con’d Give the formula for the computed value of the test statistic. State the rejection region for the selected significance level Compute any necessary sample quantities, substitute into the formula for the test statistic value, and compute that value.
Hypothesis-Testing Steps-end 7. Decide whether H0 should be rejected and state this conclusion in the problem context. The formulation of hypotheses (steps 2 and 3) should be done before examining the data.
Single Population Mean Tests Identifying appropriate test statistic Tests of Single Population Mean Test Case USE Formula Statistic n X o / s m - known s , and normal I zo population large sample, unknown s n S X o / m - II knowing if normal not req'd (CLT) zo unknown s , but normal n S X o / m - III to population required
Case I: Mean - Normal, known s Null Hypothesis: Test Statistic: Alt Hypothesis Reject Region Ho: m =mo n X o / s m - zo =
Case II: Large-Sample Tests When the sample size is large, the z tests for case I are modified to yield valid test procedures without requiring either a normal population distribution or a known
Case II: Mean - Large Sample Large Sample - rule of thumb n > 40 -- for large samples, S will usually be close to s. Null Hypothesis: Test Statistic: Alt Hypothesis Reject Region Ho: m =mo
Case III: Normal Population If X1,…,Xn is a random sample from a normal distribution, the standardized variable has a t distribution with n – 1 degrees of freedom.
Case III: Mean - Normal, unknown s Null Hypothesis: Test Statistic: Alt Hypothesis Reject Region Ho: m =mo
Examples: Piston Rings A manufacturer of piston rings must produce rings with a target = 80.995 mm. (Assume Normality) Suppose you take a sample of 15 rings and obtain a mean = 80.996 and sample standard deviation of 0.0019. Should you adjust your process to shift the mean closer to the target value? Assume a = 0.05. (test if there is evidence to claim that the mean of the process is different than the target value) Should you adjust your process to shift the mean closer to the target value based on a historical (population) std dev of 0.0019? Assume a = 0.05.
b and sample size Hand calculations for Case I (normal, known s) For other cases, use Software (e.g., power and sample size feature in Minitab.) We will now examine some possible cases for Type II errors
Type II errors for Case I Mean Test Type II error (conclude no difference, when a difference exists). Again, type II errors exist for any value in the alt hypothesis region P(Fail to Reject Ho when m=m’) There has been a mean shift (d) so that m’ = m+ d b(m’) = For Ha: m > mo
Example: Piston Rings What is the probability that you will fail to detect a shift in the mean from 80.995 to 80.997 given a shift has occurred? assume a = 0.05, n = 15, s (known) = 0.0019 Assume Ha: Reject if m > mo Calculate b and power by hand and using Minitab 80.955 - 80.997 = 0.002 Note: See Book for other b tests of other alternative hypothesis
Sample Size Calculation May want to know the sample size needed to detect a shift b(m’) = b for a level a test One-tail test Two-tail test For prior problem, what n is needed for a = 0.05, b = 0.1, diff = +0.002 (80.995-80.887), s = 0.0019? Assume 1-side test
A Population Proportion Let p denote the proportion of individuals or objects in a population who possess a specified property.
Large-Sample Tests Large-sample tests concerning p are a special case of the more general large-sample procedures for a parameter
Single Proportion Tests Typically, we only conduct proportion hypothesis test for large samples. For small samples, we may compute probabilities of Type I and Type II errors and compare with criteria (e.g., a=0.05)
Single Proportion - Large Sample Require np0 >= 10 and nqo >= 10 (Normal approximation) Null Hypothesis: p = po Test Statistic: p-hat : Alt Hypothesis Reject Region
Example: Proportion Test Suppose you produce injection molding parts. You claim that your process produces 99.9% defect free parts, or the proportion of defective parts is 0.001 During part buyoff, you produce 500 parts of which 1 is defective. Note: p-hat = 1 / 500 = 0.002 Compute Zo Za--> (Zo > Z0.01 = 2.33) Use a statistical test to demonstrate that your machine is not producing more defects than your advertised rates (assume a = 0.01).
Sample Size Determination Given a hypothesized defect rate of 0.001, how many samples would you need to detect that the defect rate increases to 0.002? Assume 1-side test with a = 0.01 and b = 0.01 Solve using Minitab. 31493
Small-Sample Tests Test procedures when the sample size n is small are based directly on the binomial distribution rather than the normal approximation.
Small Sample Tests Examples: Issues: need to define a rejection region in terms of number of successes, c. then, Type I: P(X >= c when X~Bin(n,po) ) P(type I) = 1 - B(c-1; n, po) Type II: P(X < c when X ~ Bin(n,p’) ) P(type II when p = p’) = B(c-1; n, p’ )