Академический Документы
Профессиональный Документы
Культура Документы
Theme
In many scientific and business contexts, decisions must be made about the values of population
parameters, even though our estimates of these parameters are uncertain. Hypothesis testing provides
a method for making these decisions while controlling for the probability of making certain types of
mistakes.
Step 1: Pose a statistical question. Format it into a set of hypotheses of competing claims.
Step 2: Examine the available data or collect new data. Determine how you will use the data and make
sure you have enough data to minimize the probability of making mistakes.
Step 3: Analyze the data by comparing them to expectations.
Step 4: Interpret the analysis by stating a conclusion.
In general, the null hypothesis is a statement of equality. The alternative hypothesis is a statement of
change and hence, uses an inequality symbol.
1
Hypothesis Testing for Population Proportions Chapter 8
Example 1: In 2016 a Harris poll estimated that 3.3% of American adults are vegetarian. A nutritionist
thinks this rate has increased and will take a random sample of American adults and record whether or
not they are vegetarian. State the null and alternative hypotheses in words and in symbols.
H0:
Ha:
Example 2: A manager at a casual dining restaurant noted that 15% of customers ordered soda with
their meal. In an effort to increase soda sales, the restaurant begins offering free refills with every soda
order for a two-week trial period. During this trial period, 17% of customers ordered soda with their
meal. To test if the promotion was successful in increasing soda orders, the manager wrote the
following hypotheses: H0: p = 0.15 and Ha: 𝑝̂ = 0.17, where 𝑝̂ represents the proportion of customers
who ordered soda with their meal during promotion. Are these hypotheses written correctly? Correct
any mistakes as needed.
It is analogous to assume that a defendant in a jury trial is innocent unless proven guilty “beyond a
reasonable doubt.”
Example 3: An immunologist is testing the hypothesis that the current flu vaccine is less than 73%
effective against the flu virus. The immunologist is using a 1% significance level and these hypotheses:
H0: p = 0.73 and Ha: p < 0.73. Explain what the 1% significance level means in context.
2
Hypothesis Testing for Population Proportions Chapter 8
When the test statistic is far away from the value we would expect that if the null hypothesis is true, we
reject the null hypothesis and conclude the evidence supports the alternative hypothesis.
The test statistic for a hypothesis test for a population proportion has the structure
𝑜𝑏𝑠𝑒𝑟𝑣𝑒𝑑 𝑣𝑎𝑙𝑢𝑒 − 𝑛𝑢𝑙𝑙 𝑣𝑎𝑙𝑢𝑒 𝑝̂ − 𝑝0
𝑧= =
𝑠𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝑒𝑟𝑟𝑜𝑟 𝑆𝐸
where 𝑝̂ is the sample proportion, 𝑝0 is the null hypothesis value, and SE is the standard error given by
the equation
𝑝0 (1 − 𝑝0 )
𝑆𝐸 = √
𝑛
The p-value
The null hypothesis tells us what to expect when we look at our data. If we see something unexpected –
that is, when we are surprised – then we should doubt the null hypothesis. If we are really surprised, we
should reject it altogether.
The gives us a way to numerically measure our surprise. It reports the probability
that, if the null hypothesis is true, our test statistic will have a value as extreme as or more extreme than
the value we actually observe. Small p-values (close to 0) mean we are really surprised. Large p-values
(close to 1) mean we are not surprised at all.
If we get a p-value that is less than our significance level, our p-value is considered small (we are really
surprised!) and we reject the null hypothesis.
If we get a p-value greater than or equal to our significance level, our p-value is not considered small (we
are not surprised) and we do not reject the null hypothesis.
Example 5: Suppose you are testing someone to see whether she or he can tell Coke from Pepsi, and
you are using 20 trials, half with Coke and half with Pepsi. The null hypothesis is that the person is
guessing.
a) About how many should you expect the person to get right under the null hypothesis that the
person is guessing?
b) Suppose person A gets 13 right out of 20, and person B gets 18 right out of 20. Which will have a
smaller p-value, and why
3
Hypothesis Testing for Population Proportions Chapter 8
Example 6: A nutritionist was interested in knowing if the rate of vegetarianism in American adults has
increased. She carried out a hypothesis test and found that the observed value of the test statistic was
2.77. We can calculate that the p-value associated with this is 0.0028, which is very close to 0. Explain
the meaning of the p-value in this context. Based on this result, should the nutritionist believe the null
hypothesis is true?
Example 7: A 2003 study of dreaming published in the journal Perceptual and Motor Skills found that
out of a random sample of 113 people, 92 reported dreaming in color. However, the proportion of
people who reported dreaming in color that was established in the 1940s was 0.29. Check to see
whether the conditions for using a one-proportion z-test are met assuming the researcher wanted to
see whether the proportion dreaming in color had changed since the 1940s.
4
Hypothesis Testing for Population Proportions Chapter 8
Example 8: In a Northeastern University/Gallup poll of 461 young Americans aged 18 to 35, 152
reported they would be comfortable riding in a self-driving car. Suppose we are testing the hypothesis
that more than 30% of Americans in this age group would be comfortable riding in a self-driving car,
using a significance level of 0.05. Which of the following figures correctly matches the alternative
hypothesis p > 0.30. Report and interpret the correct p-value.
Example 9: According to a 2018 survey by Timex reported in Shape magazine, 73% of Americans report
working out one or more times each week. A nutritionist is interested in whether this percentage has
increased. A random sample of 200 Americans found 160 reported working out one or more times each
week. Carry out the first two steps of a hypothesis test to determine whether the proportion has
increased. Explain how you would fill in the required TI calculator entries for p0, x, and n.
5
Hypothesis Testing for Population Proportions Chapter 8
Example 10: According to a 2018 survey by Timex reported in Shape magazine, 73% of Americans report
working out one or more times each week. A nutritionist is interested in whether this percentage has
increased. A random sample of 200 Americans found 160 reported working out one or more times each
week. The first two steps were asked for in Exercise 8.29. Use the out-put provided to carry out the third
and fourth steps of a hypothesis test that will test whether the proportion of Americans who work out
one or more times per week has increased. Use a significance level of 0.05.
Small p-values
• A small p-value means our test statistic is extreme.
• An extreme test statistic means something unusual, and therefore unexpected, has happened.
• Small p-values lead us to reject the null hypothesis.
Example 11: A researcher carried out a hypothesis test using a two-sided alternative hypothesis. Which
of the following z-scores is associated with the smallest p-value? Explain.
i. z = 0.50
ii. z = 1.00
iii. z = 2.00
iv. z = 3.00
6
Hypothesis Testing for Population Proportions Chapter 8
Example 12: According to the Brookings Institution, 50% of eligible 18-to 29-year-old voters voted in the
2016 election. Suppose we were interested in whether the proportion of voters in this age group who
voted in the 2018 election was higher. Describe the two types of errors we might make in conducting
this hypothesis test.
Reducing mistakes
• The only way to reduce the probability of both types of mistakes is to increase the sample size.
Increasing the sample size improves the precision of the test so we make mistakes less often.
• We cannot make the significance level arbitrarily small because this increases the probability the we
mistakenly fail to reject the null hypothesis.
7
Hypothesis Testing for Population Proportions Chapter 8
Example 13: What superpower do Americans want most? In past years, 10% of Americans chose
invisibility as the most desired superpower, based on the Marist poll. Assume this is an accurate
representation of all Americans. A group of futurists examines a more recent 2018 Marist poll that
found that 12% of those sampled picked invisibility as their desired superpower. The futurists carry out a
hypothesis test using a significance level of 0.01, and the result is shown in the StatCrunch output. Based
on this, can they conclude that the percentage of all Americans who would pick invisibility as their
superpower is still 10%? If not, what conclusion would be appropriate based on these sample data?
Even though they are designed to answer different questions, they are similar enough to lead us to
reach the same types of conclusions.
A confidence interval can lead us to the same type of conclusion as a two-sided hypothesis test.
The hypotheses
We are interested in the relationship between two parameters. In comparing population proportions,
the null hypothesis is:
𝐻0 : 𝑝1 = 𝑝2
8
Hypothesis Testing for Population Proportions Chapter 8
The conditions
1. Random Samples If we are not told explicitly that the sample was randomly drawn we may have to
assume this condition is satisfied.
2. Large samples Both sample sizes must be large enough. Check that
ˆ1 10
n1 p n1 (1 − p
ˆ1 ) 10
ˆ 2 10
n2 p n2 (1 − p
ˆ 2 ) 10
3. Independent Samples The samples are independent of each other.
4. Independent within Samples The observations within each sample must be independent of one
another.
Example 14: The researchers in a Pew study interviewed two random samples, one in 2015 and one in
2018. Both samples were asked, “Have you read a print book in the last year?” The results are shown in
the table below.
a) Find and compare the sample proportions that had read a print book for these two groups.
9
Hypothesis Testing for Population Proportions Chapter 8
c) Has the proportion who read print books increased? Find the observed value of the test statistic
to test the hypotheses H0: p2015 = p2018 and Ha: p2015 < p2018 assuming the conditions for a two-
proportion z-test hold.
Example 15: A Gallup poll asked random samples of Americans in 2016 and 2018 if they were satisfied
with the quality of the environment. In 2016, 543 were satisfied with the quality of the environment and
440 were dissatisfied. In 2018, 461 were satisfied and 532 were dis-satisfied. Determine whether the
proportion of Americans who are satisfied with the quality of the environment has declined. Use a 0.05
significance level.
10