You are on page 1of 13

z-test for proportion

What is proportion:
• 59% of consumers purchase gifts for their fathers.
• 85% of people over 21 said they have entered a sweepstakes.
• 51% of Americans buy generic products.
• 35% of Americans go out for dinner once a week.
Proportion means percentage. Formula to calculate percentage is
𝑜𝑏𝑠𝑒𝑟𝑣𝑒𝑑 𝑣𝑎𝑙𝑢𝑒
%𝑎𝑔𝑒 = × 100%
𝑡𝑜𝑡𝑎𝑙 𝑣𝑎𝑙𝑢𝑒
Many hypothesis-testing situations involve proportions. A proportion is the same
as a percentage.
The formula for the z test for proportion is
𝑝̂ − 𝑝
𝑧=
𝑝𝑞

𝑛
where
𝑥 𝑜𝑏𝑠𝑒𝑟𝑣𝑒𝑑 𝑣𝑎𝑙𝑢𝑒
𝑝̂ = sample proportion = =
𝑛 𝑡𝑜𝑡𝑎𝑙 𝑣𝑎𝑙𝑢𝑒
𝑝 = hypothesized population proportion
n = sample size
Steps involving in hypothesis testing:
Step 1 State the hypotheses and identify the claim.
Step 2 Find the critical value(s).
Step 3 Compute the test value.
Step 4 Make the decision to reject or not reject the null hypothesis.
Explanation of each step
Step 1 State the hypotheses and identify the claim.
There can be three types of this step.
Type I: Two tailed test
𝐻0 : 𝑝 = 𝑝̂
𝐻1 : 𝑝 ≠ 𝑝̂ [Two tailed]
Type II: Right tailed test
𝐻0 : 𝑝 = 𝑝̂
𝐻1 : 𝑝 > 𝑝̂ [Right tailed]
Type III: Left tailed test
𝐻0 : 𝑝 = 𝑝̂
𝐻1 : 𝑝 < 𝑝̂ [Left tailed]
Step 2 Find the critical value(s).
The critical value separates the rejection region from the acceptance region. The
symbol for critical value is C.V.

Finding the critical values depends on value of 𝛼 and which tailed test it is.
We are going to discuss again three types to find critical value.
Type I: Finding critical value for two tailed test.

Let us suppose that 𝛼 is given as 0.01. Calculate 1 − 𝛼 = 0.99


Since it is two tailed test so divided the value of 1 − 𝛼 by 2
1 − 𝛼 0.99
= = 0.495
2 2
In z-table find the value that is closest to 0.495 which is .4951. critical value will be 2.58 as
explained below. Write this value on the boundary of regection region as shown in fig above.
Type II: Finding critical value for Right tailed test.

Let us suppose that 𝛼 is given as 0.05. Calculate 1 − 𝛼 = 0.95


Since it is right tailed test so subtract 0.5 (half area) from the value of 1 − 𝛼
(1 − 𝛼 ) − 0.5 = 0.95 − 0.5 = .45
In z-table find the value that is closest to 0.45, which is .4505. critical value will be 1.65 as
explained below. Write this value on the boundary of regection region as shown in fig above.
Type III: Finding critical value for Left tailed test.

Let us suppose that 𝛼 is given as 0.05. Calculate 1 − 𝛼 = 0.95


Since it is right tailed test so subtract 0.5 (half area) from the value of 1 − 𝛼
(1 − 𝛼 ) − 0.5 = 0.95 − 0.5 = .45
In z-table find the value that is closest to 0.45, which is .4505. critical value will be 1.65 as
explained below. Write this value on the boundary of regection region as shown in fig above.
Step 3 Compute the test value.
Put the values in formula for z-test for proportion
𝑝̂ − 𝑝
𝑧=
𝑝𝑞

𝑛
and compute z.

Step 4 Make the decision to reject or not reject the null hypothesis.
Check either the value calculated in step 3 lies in acceptance region (clean region)
or in the rejection region (shaded region).
a) If z lies in acceptance region then accept 𝐻0
b) If z lies in rejection region then reject 𝐻0
Example: (Right tailed test)
An attorney claims that more than 25% of all lawyers advertise. A sample of 200
lawyers in a certain city showed that 63 had used some form of advertising. At
𝛼 = 0.05, is there enough evidence to support the attorney’s claim?
Solution:
Step 1 State the hypotheses and identify the claim.
Claim: 𝑝 > 0.25 , it will be written against 𝐻1 .
𝐻0 : 𝑝 = 0.25
𝐻1 : 𝑝 > 0.25 [Right tailed] (claim)
Step 2 Find the critical value(s).

2.29
As 𝛼 is given as 0.05. Calculate 1 − 𝛼 = 0.95
Since it is right tailed test so subtract 0.5 (half area) from the value of (1 − 𝛼)
(1 − 𝛼 ) − 0.5 = 0.95 − 0.5 = .45
In z-table find the value that is closest to 0.45, which is .4505. critical value will be
1.65
Step 3 Compute the test value.
𝑥 63
𝑛 = 200, 𝑥 = 63, 𝑝̂ = 𝑛 = 200 = 0.32, 𝑝 = 0.25, 𝑞 = 1 − 𝑝 = 1 − 0.25 = 0.75
𝑝̂ − 𝑝 0.32 − 0.25
𝑧= = = 2.29
𝑝𝑞
√ √0.25 × 0.75
𝑛 200

Step 4 Make the decision to reject or not reject the null hypothesis.
Since 2.29 lies in the rejection region so reject 𝐻0 . Further claim is accepted.
Example: (Left tailed test)
A statistician reads that at least 77% of the population oppose replacing $1 bills
with $1 coins. To see if this claim is valid, the statistician selected a sample of 80
people and found that 55 were opposed to replacing the $1 bills. At 𝛼 = 0.10, test
the claim.
Solution:
Claim: at least means ≥ thus claim is 𝑝 ≥ 0.77 , write it against 𝐻0 as it contains
= sign.
Step 1 State the hypotheses and identify the claim.
𝐻0 : 𝑝 ≥ 0.77 (claim)
𝐻1 : 𝑝 < 0.77 [Left tailed]
Step 2 Find the critical value(s).

-1.7

As 𝛼 is given as 0.10. Calculate 1 − 𝛼 = 0.90


Since it is left tailed test so subtract 0.5 (half area) from the value of (1 − 𝛼)
(1 − 𝛼 ) − 0.5 = 0.90 − 0.5 = .4 . In z-table find the value that is closest to 0.4,
which is 0.4015. critical value will be 1.29
Step 3 Compute the test value.
𝑥 55
𝑛 = 80, 𝑥 = 55, 𝑝̂ = 𝑛 = 80 = 0.69, 𝑝 = 0.77, 𝑞 = 1 − 𝑝 = 1 − 0.77 = 0.23
𝑝̂ − 𝑝 0.69 − 0.77
𝑧= = = −1.7
𝑝𝑞
√ √0.77 × 0.23
𝑛 80

Step 4 Make the decision to reject or not reject the null hypothesis.
Since −1.7 lies in the rejection region so reject 𝐻0 . Further claim is rejected.
Example: (Two tailed test)
A telephone company representative estimates that 40% of its customers have call-
waiting service. To test this hypothesis, she selected a sample of 100 customers and
found that 37 had call waiting. At 𝛼 = 0.01, is there enough evidence to accept the
claim?
Solution:
Claim: clearly 𝑝 = 0.4 and it will be placed against 𝐻0 .
Step 1 State the hypotheses and identify the claim.
𝐻0 : 𝑝 = 0.4 (claim)
𝐻1 : 𝑝 ≠ 0.4 [Two tailed]
Step 2 Find the critical value(s).

−𝟎. 𝟔𝟏

As 𝛼 is given as 0.01. Calculate 1 − 𝛼 = 0.99


1−𝛼 0.99
Since it is two tailed test so divided the value of (1 − 𝛼) by 2. = = 0.495
2 2
In z-table find the value that is closest to 0.495 which is .4951. critical value will be 2.58 .
Step 3 Compute the test value.
𝑥 37
𝑛 = 100, 𝑥 = 37, 𝑝̂ = 𝑛 = 100 = 0.37, 𝑝 = 0.4, 𝑞 = 1 − 𝑝 = 1 − 0.4 = 0.6
𝑝̂ − 𝑝 0.37 − 0.4
𝑧= = = −0.61
𝑝𝑞
√ √0.4 × 0.6
𝑛 100

Step 4 Make the decision to reject or not reject the null hypothesis.
Since −0.61 lies in the acceptance region so accept 𝐻0 . Further claim is accepted.

You might also like