Module 5-2: Hypothesis Tests for One Proportion
Example: Process of a court trial.
Suppose that someone is on trial for allegedly committing a crime:
The accused person is assumed to be innocent.
The prosecutors collect and present evidence to contradict the inno-
cence hypothesis.
The jury considers how likely it is that the evidence occurred, given
that the person is innocent.
If there is enough evidence against the presumption of innocence in
favour of guilt, the court rejects the innocence hypothesis and declares
the person guilty.
If the evidence is not strong enough to conclude that the defendant is
guilty (that is, to reject the innocence hypothesis), then the court finds
the person not guilty.
Note: In the case of insufficient evidence, the court does not declare the
person as innocent. It finds the person not guilty. It was not proven
that the person is innocent, but merely that there was not enough evidence
to conclude that the person is guilty.
Module 5-2 Page 1 of 22
A hypothesis is a claim or statement about the value of a population
parameter (or parameters). A hypothesis usually states that a parameter
takes a specific value or lies in a specific range of values.
A hypothesis test is a method of using sample data to decide whether
or not to reject a hypothesis (in favour of another hypothesis).
A hypothesis test for a population parameter has five steps:
1. Assumptions/Conditions: Identify the variable/parameter of in-
terest. State any assumptions and check any conditions needed to
carry out the test.
independence assumptions
randomization conditions
sample size requirements
shape of distributions (population, sampling)
Module 5-2 Page 2 of 22
2. Hypotheses: A hypothesis test involves two types of hypotheses
about parameters:
Null Hypothesis: denoted H0 , is often a statement that a pa-
rameter takes a specific value.
– H0 is assumed to be true until it is declared false.
– Represents the status quo, no change from traditional value, no
difference, or no effect.
– Try to find evidence against.
Alternative Hypothesis: denoted HA , is a statement that the
parameter lies in some alternative set of values (values considered
plausible if we reject the null hypothesis).
– HA will be true if H0 is declared false.
– Represents some change, some difference, some effect.
– Claim someone wishes to establish (try to find evidence for).
– Either a two-sided alternative or one-sided alternative.
two-tailed test lower-tailed test upper-tailed test
In Step 2, we state H0 and HA.
Module 5-2 Page 3 of 22
3. Test Statistic: a quantity calculated from sample data that mea-
sures the distance (often the number of standard deviations) between
the point estimate of the parameter and the null hypothesis value.
In Step 3, we compute the test statistic.
4. P-value: the probability of observing a test statistic value at least as
far away from the null hypothesis value as the test statistic computed
in Step 3 (assuming the null hypothesis is true).
P (obtaining a test statistic as extreme or more
extreme as the one observed | H0 is true)
Measures the strength of the evidence against H0 in favour of HA .
If the P -value is small:
– It means the test statistic we observed would be unlikely if H0
is true.
– The smaller the P -value, the stronger the evidence against H0
in favour of HA.
If the P -value is large
– The data are reasonably consistent with the model from null
hypothesis.
– There is weak evidence against H0.
– It does not mean that H0 is true!
– It means there is insufficient evidence to suggest that H0 is false.
In Step 4, we compute the P -value.
Module 5-2 Page 4 of 22
5. Conclusion: Report the P -value and interpret it in context. Make
a decisions as to whether or not to reject H0. One way to do this is
to compare the P -value to a pre-determined value α, called a signif-
icance level.
If P -value ≤ α, we reject H0 at the significance level α.
If P -value > α, we do not reject H0 (fail to reject H0 ) at the
significance level α.
.
Note:
There are two possible conclusions:
– We reject H0 in favour of HA (there is sufficient (significant) evi-
dence to suggest H0 is false and conclude HA is true).
– We do not reject H0 in favour of HA (there is insufficient evidence
against H0 to conclude HA is true).
NEVER “accept” H0 .
Common significance levels are 0.1, 0.05, and 0.01.
The significance level should be chosen before looking at the data and
its value is context-dependent.
The P -value of a hypothesis test is the smallest value of α for which
H0 can be rejected.
If we reject H0 using a significance level, the result is said to be sta-
tistically significant.
– Does not mean the result has practical importance.
Module 5-2 Page 5 of 22
General Guidelines for Reporting Strength of Evidence Against
H0 using P -value:
Strength of evidence against
P -value the null hypothesis
P -value < 0.001 Very Strong
0.001 < P -value < 0.01 Strong
0.01 < P -value < 0.05 Moderate
0.05 < P -value < 0.1 Suggestive, but inconclusive
P -value > 0.1 Weak (little to none)
Note: These are (roughly) the guidelines given in the textbook. Other
sources may use different cut-offs and, in particular, may have overlapping
intervals. The interpretation of the strength of the evidence is subjective.
Note: Always report the P -value with your conclusion to show the
strength of the evidence against the null hypothesis. Give the reader the
opportunity to make their own conclusion.
Module 5-2 Page 6 of 22
Example: Which of the following pairs can be used for a hypothesis test?
(a) H0 : µ = 300, HA : µ > 300
(b) H0 : p̂ = 0.33, HA : p̂ > 0.33
(c) H0 : p > 0.45, HA : p = 0.45
(d) H0 : µ = 50, HA : µ 6= 50
(e) H0 : p = 0.1, HA : p > 0.2
(f) H0 : p = 0.85, HA : p < 0.85
(g) H0 : ȳ = 35.4, HA : ȳ 6= 35.4
(h) H0 : µ = 11, HA : µ = 12
(i) H0 : p = 2, HA : p > 2
(j) H0 : µ ≤ 47, HA : µ > 47
Example:
State the null hypothesis and alternative hypothesis in each of the following
situations:
(a) A cable company claims that, due to improved procedures, the pro-
portion of cable subscribers that have complaints against them is now
less than 0.13. A consumer rights group wants to test the validity of
this claim.
Module 5-2 Page 7 of 22
(b) According to a large study, a drug company’s old pain reliever formula
provided relief to 89% of the people who used it. The company wants
to test a new formula to determine if it is better.
(c) You meet a man on the street who claims to be psychic. Being skeptical
of his claim, you take a standard deck of 52 cards and ask him to
identify the suit of a randomly selected card without seeing it. You
repeat the experiment 100 times, placing the card back in the deck
after each trial.
(d) In 1984, the LA Times reported that 15% of all California motorists
had tampered with their vehicle emission-control devices so that they
could save money by using leaded gas instead of unleaded gas. Suppose
that in a random sample of 200 cars from one county in California, 21
had been modified. Does this suggest that, at the time, the proportion
of cars in this county with modified devices differed from the statewide
proportion?
Module 5-2 Page 8 of 22
Hypothesis Test for a Population Proportion:
One-Proportion z-Test
A hypothesis test for a population proportion p has five steps:
1. Assumptions/Conditions:
Individuals in sample must be independent of each other.
Data collected using randomization.
The sample size n is large enough: np0 ≥ 10 and n(1 − p0 ) ≥ 10,
where p0 is the assumed value of p in the null hypothesis.
Sample size should be less than 10% of population size.
2. Hypotheses:
The null hypothesis is H0 : p = p0, where 0 ≤ p0 ≤ 1, and the
alternative hypothesis is either
HA : p 6= p0 or HA : p < p0 or HA : p > p0
(two-tailed test) (lower-tailed test) (upper-tailed test)
3. Test Statistic:
Measures how far the sample proportion p̂ falls from p0.
Estimate − H0 value p̂ − p0
z0 = = r
SE(Estimate) p0(1 − p0)
n
The distribution of the test-statistic under the null hypothesis is
Z ∼ N (0, 1) (the standard normal distribution).
Module 5-2 Page 9 of 22
4. P -value: Calculate the probability of observing a test statistic at least
as extreme as the one we actually observed (probability of getting p̂ at
least as far from p = p0 as the one we observed), assuming H0 is true :
two-tailed test
H0 : p = p0
HA : p 6= p0
lower-tailed test
H0 : p = p0
HA : p < p0
upper-tailed test
H0 : p = p0
HA : p > p0
5. Conclusion: Report and interpret the P -value in context. Given a
significance level α, if
P - value ≤ α,
then we reject H0 at level α and if
P - value > α,
then we do not reject H0 at level α.
Module 5-2 Page 10 of 22
Confidence Intervals vs. Hypothesis Tests
There is an important connection between confidence intervals and two-
tailed hypothesis tests:
We reject H0 at the level α if and only if the corresponding 100(1−α)%
confidence interval does not contain the null hypothesis value p0.
We do not reject H0 at the level α if and only if the corresponding
100(1 − α)% confidence interval contains the null hypothesis value p0.
A 100(1 − γ)% confidence interval corresponds to a one-sided hypothesis
test with a significance level α = γ/2.
If the 100(1 − γ)% confidence interval lies entirely within the one-sided
alternative, then we would reject H0 at the α = γ/2 level.
Module 5-2 Page 11 of 22
Example: According to a US national statistics agency, 16% of all ele-
mentary school teachers in the US are male. A researcher randomly selected
1000 elementary school teachers in California and found that 142 were male.
(a) Does this sample provide sufficient evidence that the percentage of male
elementary school teachers in California is different from the national
percentage? (Use α = 0.05.)
1. Assumptions/Conditions:
2. Hypotheses:
Module 5-2 Page 12 of 22
3. Test Statistic:
4. P -value:
5. Conclusion:
Module 5-2 Page 13 of 22
(b) Construct a 95% confidence interval for p. Is the interval consistent
with the conclusion of the hypothesis test?
Module 5-2 Page 14 of 22
Example: A battery manufacturer wants to be reasonably certain that
fewer than 6% of the batteries in a very large shipment are defective. Sup-
pose that 425 of the batteries are randomly selected from this shipment.
Each one is tested and 17 are found to be defective.
a) Does this provide sufficient evidence, at the 0.05 level of significance,
for the manufacturer to conclude that the proportion of defectives in
the entire shipment is less than 0.06?
1. Assumptions/Conditions:
2. Hypotheses:
Module 5-2 Page 15 of 22
3. Test Statistic:
4. P -value:
5. Conclusion:
Module 5-2 Page 16 of 22
(b) at the 0.01 level of significance?
(c) Compare the results of parts (a) and (b) with the appropriate confi-
dence intervals.
Module 5-2 Page 17 of 22
Example: According to a research centre, 35% of US adults have used the
Internet to self diagnose a specific medical condition. A medical insurance
company is concerned that the percentage of online diagnosers is increasing
due to rising health care costs. A random sample of 2400 US adults was
obtained and 871 indicate that they self diagnose online. Is there sufficient
evidence to conclude that the proportion of online diagnosers has increased?
Carry out the appropriate test at the 1% significance level.
1. Assumptions/Conditions:
2. Hypotheses:
Module 5-2 Page 18 of 22
3. Test Statistic:
4. P -value:
5. Conclusion:
Module 5-2 Page 19 of 22
When performing a hypothesis test, there are two types of errors that can
occur:
1. Type I Error: the null hypothesis is true, but we reject it.
2. Type II Error: the null hypothesis is false, but we fail to reject it.
The Truth
H0 True H0 False
Type I
Reject H0 Correct
Our Error
Decision Fail to Type II
Correct
Reject H0 Error
The probability that a Type I error occurs is the significance level
α, that is
α = P (Type I Error) = P (H0 is rejected|H0 is true)
The probability that a Type II error occurs is denoted β, that is,
β = P (Type II Error) = P (H0 is not rejected|H0 is false)
Note: The value of α is chosen by the researcher. For a fixed sample size,
increasing α will decrease β and vice versa. To decrease both values at the
same time, we need to increase the sample size.
Module 5-2 Page 20 of 22
Example: Water samples are taken from water that is used for cooling
as it is returned to a river from a power plant. As long as the mean
temperature of the discharged water is at most 65 degrees Celsius, no
harm will be done to the river’s ecosystem. Fifty samples will be taken and
measured at randomly selected times and the resulting data will be used
to test the hypotheses:
H0 : µ = 65 degree Celsius
HA : µ > 65 degrees Celsius
(a) What is a Type I error in this context?
(b) What is a Type II error in this context?
(c) Which type of error is more serious?
Module 5-2 Page 21 of 22
Example: A calculator manufacturer receives very large shipments of
circuits from a supplier. It is too costly and time consuming to inspect all
circuits in a shipment, so they take a sample of each shipment to inspect.
Data is obtained from the sample to test the hypotheses:
H0 : p = 0.05
HA : p > 0.05
where p is the proportion of defectives in the shipment. If H0 is rejected,
the shipment is sent back to the supplier. If H0 is not rejected, the circuits
are used in the production of calculators.
(a) What type of error occurred if the shipment is returned, but contains
only 4% defective circuits?
(b) What type of error occurred if the shipment contains 6% defective
circuits, but is used to make calculators?
(c) From the manufacturer’s point of view, which type of error would be
more serious?
(d) From the supplier’s point of view, which type of error would be more
serious?
Module 5-2 Page 22 of 22