Вы находитесь на странице: 1из 10

Hypothesis Testing for Population Proportions Chapter 8

Hypothesis Testing for Population Proportions


Chapter 8

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.

The essential ingredients of hypothesis testing

The hypothesis testing procedure

is a procedure that enables us to choose two claims when we


have variability in our measurements. The procedure for hypothesis testing is based on particular
terminology and four well-specified steps.

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.

The null and alternative hypothesis

In a hypothesis test, statistical questions are converted into hypotheses.


are always statements about ; they are never statements about sample
statistics.

Hypotheses come in pairs.

• The , written as H0, is the neutral, status quo, skeptical


statement about a population parameter.
• The , Ha, is the research hypothesis. It is a statement about
the value of a parameter that we tend to demonstrate is true.

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.

The always gets the benefit of the doubt throughout the


hypothesis-testing procedure. We only reject the null hypothesis if the observed outcome is extremely
unusual if the null hypothesis were true.

It is analogous to assume that a defendant in a jury trial is innocent unless proven guilty “beyond a
reasonable doubt.”

The significance level


Mistakes are an inevitable part of the hypothesis-testing process. The trick is to not make them often.
• The is the probability of making the mistake of rejecting the
null hypothesis when, in fact, the null hypothesis is true.
• The symbol for the significance level is α.
• For most applications a significance level of 0.05 is used, but 0.01 and 0.10 are also sometimes used.

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

The test statistic


The compares our observed outcome with the outcome we would
get if the null hypothesis is true.

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?

Hypothesis testing in four steps

Four steps of hypothesis testing


1. Hypothesize State your hypotheses about the population parameter.
2. Prepare State a significance level, choose an appropriate test statistic, state and check conditions
required for future computations, state any assumptions that must be made.
3. Compute to Compare Compute the observed value of the test statistic and compare it to what the
null hypothesis said you would get. Find the p-value in order to measure your level of surprise.
4. Interpret Do you reject or not reject your null hypothesis? What does this mean in the context of
the data?

Conditions for a hypothesis test about a population proportion


If these conditions are met, then the sampling distribution of the z-statistic is approximately a standard
normal distribution N(0, 1).
1. Random sample: The sample is collected randomly from the population.
2. Large sample size: The sample size is meets the condition 𝑛𝑝0 ≥ 10 and 𝑛(1 − 𝑝0 ) ≥ 10.
3. Large population: The population is at least 10 times bigger than the sample size if the sample is
collected without replacement.
4. Independence: Each observation has no influence on any other observation.

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

More about the p-value


Calculation the p-value depends on the sign in the alternative hypothesis.
• If 𝐻𝑎 contains ≠, we say the alternative hypothesis is two-sided and the 𝑝 −value would be the total
of the shaded regions (a “two-tailed” 𝑝-value).
• If 𝐻𝑎 contains <, we have a left-tailed test and the p-value is the area to the left of the of the test
statistic.
• If 𝐻𝑎 contains >, we have a right-tailed test and the p-value is the area to the right of the of the test
statistic.

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.

Hypothesis tests in detail

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

If the conditions fail


If the conditions concerning the sampling distribution of the z-statistic fail to be met, then we cannot
find a p-value using the Normal curve. Conditions can fail for the following reasons:
1. The sample size is too small.
2. Samples are not randomly selected – in this case conclusions may not generalize to the population.

Potential mistakes in hypothesis testing


There are two types of potential mistakes that can occur in hypothesis testing:

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.

Statistical significance vs practical significance


A result is when the null hypothesis is rejected – the difference
between the data-estimated value for a parameter and the null hypothesis value for a parameter is so
large it cannot be convincingly explained by chance. However statistically significant findings do not
necessarily mean the results are useful.

A result is both statistically significant and meaningful.

Cautions about writing the conclusion


Because we can never be 100% certain that our conclusion in hypothesis testing is true, when your p-
value is greater than your significance level, avoid using the following phrases:
• We accept H0.
• We proved H0 is true.
Say instead:
• We fail to reject to reject H0.
• We cannot reject H0.

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?

Relationship between confidence interval and hypothesis test


Confidence intervals and hypothesis tests are closely related but ask slightly different questions.
• Confidence intervals – “What is the value of this parameter?”
• Hypothesis test – “Are the data consistent with the parameter being one particular value or might
the parameter be something else?

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.

Significance levels and corresponding confidence levels.

Comparing proportions from two populations

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 alternative hypothesis is one of three possibilities:


𝐻𝑎 : 𝑝1 ≠ 𝑝2 𝐻𝑎 : 𝑝1 > 𝑝2 𝐻𝑎 : 𝑝1 < 𝑝2

The test statistic


The test statistic has the same general form:
𝑒𝑠𝑡𝑖𝑚𝑎𝑡𝑜𝑟 − 𝑛𝑢𝑙𝑙 𝑣𝑎𝑙𝑢𝑒 (𝑝̂1 − 𝑝̂2 ) − 0
𝑧= =
𝑆𝐸 𝑆𝐸
1 1 𝑥 +𝑥
where 𝑆𝐸 = √𝑝̂ (1 − 𝑝̂ ) (𝑛 + 𝑛 ) and 𝑝̂ = 𝑛1 +𝑛2 .
1 2 1 2

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.

b) Find a pooled estimate of the sample proportion.

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

Вам также может понравиться