ˆ . x p n =

advertisement
LARGE SAMPLE TESTS ON PROPORTIONS
Binomial experiment with n trials and unknown proportion of successes p.
GOAL: Test
Ho: p=p0, where p0 is a specified, known value.
DATA: Observe x successes, get sample proportion of successes
x
pˆ = .
n
GOAL: Test
Ho: p=p0, where p0 is a specified, known value.
Use the fact (Fact 4) that statistic
z=
pˆ − p0
p0 (1 − p0 )
n
has approximately N(0, 1) distribution under Ho (when p=p0) for large n.
TEST FOR PROPORTION: PROCEDURE
Let significance level =α.
STEP 1. Ho: p = po
vs
Ha: p ≠ po or
STEP 2. Compute the test statistic: z =
Ha: p > po or Ha: p < po
pˆ − p0
p0 (1 − p0 )
n
STEP 3. Find the critical number in the Z table.
Two sided alternative
critical value = zα/2.
One sided alternative
critical value = zα.
STEP 4. DECISION.
Ha: p ≠ po Reject Ho if |z|> zα/2;
Ha: p > po Reject Ho if z > zα;
Ha: p < po Reject Ho if z < - zα.
STEP 5. Answer the question in the problem.
P-value approach
STEP 3. Compute the approximate p-value.
Two sided test p-value:
Ha: p ≠ po, approximate P-value: 2P( Z > |z|)
One sided tests p-values:
Ha: p > po, approximate P-value: P( Z > z)
Ha: p < po, approximate P-value: P( Z < z)
STEP 4. DECISION
Reject Ho if p-value < significance level α.
STEP 5. Answer the question in the problem.
EXAMPLE
Example. When a coin is tossed 100 times, we get 60 Heads. Test if the coin
is fair versus the alternative that it is loaded in favor of Heads, using
significance level of 5%.
Solution. X=number of H in 100 tosses of a coin; n= 100, x=60, α = 5%.
p= true probability of H on the coin, X ~Bin(100, p).
STEP1. Ho: p=0.5
STEP 2. Test statistic
Ha: p > 0.5
pˆ − po
z=
=
po (1 − po )
n
0.6 − 0.5
= 2.
0.5(1 − 0.5)
100
STEP 3. Critical value? z0.05 =1.645.
STEP 4. DECISION: z = 2 > 1.645 = z0.05
STEP 5. The coin favors heads.
reject Ho.
EXAMPLE contd.
P-value approach
STEP 3. To get p-value, we need the distribution of
pˆ .
By the Normal approximation to Binomial, under Ho,
p̂ has an
approximately Normal distribution with mean po =0.5 and
st. deviation
0.5(1 − 0.5)
= 0.05.
100
P-value =
P ( pˆ > 0.6) ≈ P ( Z > 2) = 0.0228.
STEP 4. DECISION: P-value = 0.0228 < α=0.05
STEP 5. The coin favors Heads.
reject Ho.
Download