0% found this document useful (0 votes)
5 views30 pages

Chapter 8 Packet

Hypothesis testing is a statistical procedure that allows for decision-making between two claims based on population parameters, involving a null hypothesis (H0) that represents the status quo and an alternative hypothesis (Ha) that reflects the research hypothesis. The process includes calculating a test statistic and p-value to evaluate the evidence against the null hypothesis, while also accounting for potential mistakes through a significance level (α). Understanding these components is essential for conducting and interpreting hypothesis tests effectively.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views30 pages

Chapter 8 Packet

Hypothesis testing is a statistical procedure that allows for decision-making between two claims based on population parameters, involving a null hypothesis (H0) that represents the status quo and an alternative hypothesis (Ha) that reflects the research hypothesis. The process includes calculating a test statistic and p-value to evaluate the evidence against the null hypothesis, while also accounting for potential mistakes through a significance level (α). Understanding these components is essential for conducting and interpreting hypothesis tests effectively.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

8.

1 The Essential Ingredients of Hypothesis Testing

Hypothesis Testing
o Two methods of statistical inference:
1. Estimating parameters through confidence intervals
2. Making decisions about parameters through hypothesis tests
o Hypothesis testing is a procedure that enables us to choose between two claims
when we have variability in our measurements
1. Based on particular terminology and a well-specified set of steps
2. Also based, however, on a lot of common sense

Main Ingredient: A Pair of Hypotheses


o Hypotheses are always statements about population parameter
o p = population proportion in Chapter 8 (categorical data)
o 𝜇 = population mean in Chapter 9 (numerical data)
o Hypotheses are never statements about statistics (𝑝̂ or 𝑥̅ )
o Hypotheses are always formed first and before conducting the hypothesis test
o The null hypothesis H0, is the neutral, status-quo, business-as-usual statement
about a population parameter.
o The null hypothesis always
• Gets the benefit of the doubt
• Is assumed to be true throughout the testing procedure
➢ If we decide at the last step that the sample results are extremely
unusual under this assumption, then and only then do we refute
the statement in the null hypothesis
o It can represent “no change,” “no effect,” or “no difference”. It can also
represent a historical value or product specification
o The null hypothesis is always a statement of equality = about the
population parameter.
o The alternative hypothesis Ha, is the research hypothesis
o It is a statement about the parameter that we intend to demonstrate is
correct
o It is always different than the null hypothesis
o The alternative hypothesis is a statement about the same parameter, but
contains one of the symbols <, >, or ≠.

Hypotheses for One Proportion


o For a test of a single population proportion p, we have the following sets of
hypotheses:

Two-sided One-sided (left) One-sided (right)


𝑯𝟎 : 𝒑 = 𝒑 𝟎 𝑯𝟎 : 𝒑 = 𝒑𝟎 𝑯𝟎 : 𝒑 = 𝒑𝟎
𝑯𝒂 : 𝒑 ≠ 𝒑 𝟎 𝑯𝒂 : 𝒑 < 𝒑𝟎 𝑯𝒂 : 𝒑 > 𝒑𝟎

➢ Note: 𝒑𝟎 is the value of the population parameter assumed true under the
null hypothesis
Note: Please write your notes for examples in chapter 8 on a separate piece of binder
paper, as almost every example is very long.

Example 1 (Part 1): The statewide success rate in math for all of California’s community
colleges was just 54% in Fall 2010. Over the next decade, the Math Department at West
Valley College tried various methods to improve learning. In Fall 2020, a random sample of
200 WVC math students were surveyed. Of these students, 133 were successful in their
math class. Is the success rate in math for all students at WVC in Fall 2020 significantly
higher than the statewide success rate in math in Fall 2010? Identify the hypotheses using
both words and symbols.

a) What is the variable? Is it numerical or categorical?

b) What is the parameter of interest?

c) Identify the hypotheses for testing the researcher’s question.

Null hypothesis:

• Words: __________________________________________________________________________________ is
(population proportion, p)

_____________________________________________ then the


(status quo)

_____________________________________________________________________________________.
(population parameter, which is assume true)

• Symbol:

Alternative hypothesis:

• Words: __________________________________________________________________________________ is
(population proportion, p)

_____________________________________________ then the


(researcher hypothesis)

_____________________________________________________________________________________.
(population parameter, which is assume true)

• Symbol:
Example 2 (Part 1): In 1994, 61% of parents of children in high school felt that these
students were not being taught enough math and science. A recent survey of 800 randomly
selected parents found that 465 felt their children in high school are not being taught
enough math and science. Do parents feel differently today than they did in 1994? Identify
the hypotheses using both words and symbols.

a) What is the variable?

Variable: _____________________________________ a parent of children in high school


feels that these students are being taught enough math and science

Is it numerical or categorical?

b) What is the parameter of interest?

= ___________________________ of parents of children in high school who feels that

these students are _________ being taught enough math and science ____________

c) Identify the hypotheses for testing the researcher’s question.

Null hypothesis:

• Words: The percentage of parents of children in high school who feel that these

students were not being taught enough math and science __________________ is
(population proportion, p)

_____________________ then _________________________________________.


(status quo) (population parameter, )

• Symbol:

Alternative hypothesis:

• Words: The percentage of parents of children in high school who feel that these

students were not being taught enough math and science __________________ is
(population proportion, p)

__________________________ then ______________________.


(researcher hypothesis) (population parameter, )

• Symbol:
Example 3: Write out the null and alternative hypotheses for each scenario:
a) If a six-sided die is fair, a 4 should be rolled 1/6 of the time. You want to test that
the die is unfair.

b) The proportion of people who live after suffering a stroke is 0.85. A new treatment
is developed, and researcher’s want to see if the proportion has now increased.

c) Researchers want to decide if more than half of U.S. voters support repealing the
current U.S. health plan.

d) In 2009, 11% of the U.S. population had a MySpace account. You want to see if the
proportion has decreased since then.

Template for Hypothesis for One Proportion

If the variable is ______________________, then the template for hypothesis for one proportion is
Next Ingredient: Making Mistakes

o Recall that statistical inference always involves uncertainty


o Thus we must allow for mistakes in the hypothesis testing procedure
o The significance level ∝, is the probability of making a mistake in a hypothesis
test
o In statistical terminology, it is the probability of making the mistake of rejecting the
null hypothesis when, in fact, the null hypothesis is true.

Values for the Significance Level

Since the significance level is the probability of making a mistake (rejecting the null when
we shouldn’t), it should logically be small:

➢ a = 0.05 or 5% is the most typical level of significance


➢ a = 0.01 or 1% is used when making this mistake has very bad repercussions
➢ a = 0.10 or 10% is used when making a mistake is less an issue than making no
conclusion when Ha is true

Example 1 (Part 2): The statewide success rate in math for all of California’s community
colleges was just 54% in Fall 2010. Over the next decade, the Math Department at West
Valley College tried various methods to improve learning. In Fall 2020, a random sample of
200 WVC math students were surveyed. Of these students, 133 were successful in their
math class. Is the success rate in math for all students at WVC in Fall 2020 significantly
higher than the statewide success rate in math in Fall 2010? Suppose we choose  = 0.05 as
our significance level. Interpret the significance level in context.

There is a ________ chance that


WVC will conclude their math success rate is
significantly higher than
the statewide math success rate,
when in fact,
there is no difference.

Example 2 (Part 2): In 1994, 61% of parents of children in high school felt that these
students were not being taught enough math and science. A recent survey of 800 randomly
selected parents found that 465 felt their children in high school are not being taught
enough math and science. Do parents feel differently today than they did in 1994?
Suppose we choose  = 0.10 as our significance level. Write a sentence that interprets
this significance level in context.

There is a ________ chance that


we will conclude the percentage of parents of
children in high school who feel that these students
were not being taught enough math and science
today is different than in 1994,
when in fact,
there is no difference.
Template for Interpreting the Significance Level

“There is ______% chance that we will conclude __________________________________________,


Significance level Alternative Hypothesis, Ha, in words

when in fact, there is no difference.”

Balancing Two Types of Mistakes

Recall: We assume the null hypothesis to be true throughout the testing procedure

Reject 𝑯𝟎 Fail to Reject 𝑯𝟎

𝑯𝟎 True Bad Good


➢ Significance level ∝ is the
probability of rejecting 𝑯𝟎
when 𝑯𝟎 is true

𝑯𝟎 False Good Bad


➢ Power of the Hypothesis Test
is the probability of rejecting
𝑯𝟎 when 𝑯𝟎 is false

The two types of mistakes:


1. Making the mistake of rejecting the null when the null is true (the
probability of doing this is called the significance level)
2. Another mistake we can make is failing to reject the null when the
alternative is true.

Important: We cannot make the significance level arbitrarily small, because doing so
increases the probability that we will mistakenly fail to reject the null hypothesis and doing
so decreases the probability of correctly rejecting the null hypothesis.
Next Ingredient: The Test Statistic

o A test statistic compares our observed outcome in the sample with the outcome
the null hypothesis says we should see
o It tells us the evidence we have against the null hypothesis, by comparing the
real world to the null hypothesis world
o For testing a single proportion, our observed outcome is 𝒑 ̂ and we compare this to
𝑝0 , the value of p under the null
o Applying the Central Limit Theorem, if we have random data and large sample
size, the distribution of 𝒑
̂ is:
𝑝(1 − 𝑝)
𝑁 (𝑝, √ )
𝑛

Test Statistic – One Proportion

o With the results of the CLT, we can then develop a test statistic for testing a single
population proportion
o To test a proportion, we use the one-proportion z-test statistic which compares
the sample outcome to what is assumed under the null (Notice how it is similar to
the z-score formula from section 3.2).

̂ −𝒑𝟎
𝒑
one-proportion z-test statistic =
√𝒑𝟎(1−𝒑𝟎)
𝑛

versus

𝑜𝑏𝑠𝑒𝑟𝑣𝑒𝑑−𝑐𝑒𝑛𝑡𝑒𝑟
z-score =
𝑠𝑝𝑟𝑒𝑎𝑑

How to compute the one Proportion z-Test and p-value using a TI-83/84 graphing
calculator:

1. Using a calculator Press STAT then choose TESTS (by using the right arrow on the
keypad), and choose option 5: 1-PropZTest by scrolling down through the lists of
tests or just hitting the number 5.
2. After choosing 5: 1-PropZTest then plug in the value of p0 from your null
hypothesis, the number of successes for x, the sample size for n, and finally select
the correct option for your alternative hypothesis (prop ≠p0, <p0, >p0) (to select one
scroll through the list and then hit enter for the one you want). To finish I
recommend you select Draw and hit enter, but the Calculate option will also work
but will not give you the extra visual.
3. Make a note of the z-Test Statistic the calculator gives you and the p-value. It may
be helpful to draw the normal curve with the appropriate shading.
Example 1 (Part 3): The statewide success rate in math for all of California’s community
colleges was just 54% in Fall 2010. Over the next decade, the Math Department at West
Valley College tried various methods to improve learning. In Fall 2020, a random sample of
200 WVC math students were surveyed. Of these students, 133 were successful in their
math class. Is the success rate in math for all students at WVC in Fall 2020 significantly
higher than the statewide success rate in math in Fall 2010? Suppose we choose  = 0.05 as
our significance level. Find the one-proportion z-test statistic using a graphing
calculator. Does the test statistic provide evidence or no evidence to discredit the null?

Hypothesis:

Identify key numbers:


o Status quo:

o Number of successes:

o Sample size:

o Sample proportion:

Compute the one-proportion z-test statistic using a graphing calculator:


Stat -> Test -> 1-PropZTest

Input: p0 = ,x= ,n=

Choose: p0

Answer: z = ,p=

Interpret:
o The observed proportion/sample statistic was __________ standard errors

(SE) __________ the null hypothesis of ____________________

o The sample is ____________________________ since the z-test statistic is

____________________________________________________________________________________

o There is ______________________________________ to discredit the null hypothesis


Example 2 (Part 3): In 1994, 61% of parents of children in high school felt that these
students were not being taught enough math and science. A recent survey of 800 randomly
selected parents found that 465 felt their children in high school are not being taught
enough math and science. Do parents feel differently today than they did in 1994?
Find the one-proportion z-test statistic using a graphing calculator. Does the test
statistic provide evidence or no evidence to discredit the null?

Hypothesis:

Identify key numbers:


o Status quo:

o Number of successes:

o Sample size:

o Sample proportion:

Compute the one-proportion z-test statistic using a graphing calculator:


Stat -> Test -> 1-PropZTest

Input: p0 = ,x= ,n=

Choose: p0

Answer: z = ,p=

Interpret:
o The observed proportion/sample statistic was __________ standard errors

(SE) ____________ the null hypothesis of ____________________

o The sample is ____________________________ since the z-test statistic is

____________________________________________________________________________________

o There is ______________________________________ to discredit the null hypothesis


Interpreting the Test Statistic:
o The sign of the test statistic tells us how the sample outcome compares to what is
expected

▪ A positive value means the sample outcome was greater than what was
expected of the population

▪ A negative value means the sample outcome was less than what was
expected of the population

o The test statistic tells us how “unusual” our sample data is

▪ If the z-test statistic is near ±𝟐 or more, then our sample data is unusual
(Notice how this is similar to how we used z-score to describe unusualness in
section 3.2)
o In other words, there is evidence the null hypothesis is discredited

▪ If the z-test statistic is closer to 0, then our sample data is not unusual
o In other words, there is no evidence to discredit the null hypothesis
Final Ingredient: The P-Value
o The null hypothesis tells us what to expect when we look at our sample data
o If we see something unexpected/unusual, then we should doubt the null hypothesis
o The p-value is a number that measures our “surprise” in our sample data if the
null was really true

What is p-value?
o The p-value is the probability of obtaining a test statistic as extreme or more
extreme than the one we observed assuming the null hypothesis is true

Relating p-value to Null Hypothesis


o Our null hypothesis is always, 𝑯𝟎 : 𝒑 = 𝒑𝟎 . Just our alternative hypothesis varies.
o Computing p-value depends on the type of hypothesis test (left, right, or two-tailed)
Right-tailed Test Two-tailed Test Left-tailed Test
H0: p = p0 H0: p = p0 H0: p = p0
Ha: p > p0 Ha: p ≠ p0 Ha: p < p0

The following statements are all equivalent:


• The test value is more extreme
• The z-test statistic is farther from zero
• The tail area is smaller
• The p-value is smaller
• The test value is more unusual if the
null hypothesis 𝑯𝟎 is true
• The result is to reject the null
hypothesis 𝑯𝟎

Interpreting the P-value


o If the p-value is small (extremely close to 0), we have received a surprise– the
outcome from the sample is unusual. This provides evidence to discredit the
statement in the null.
o If the p-value is not small, then no surprise – the outcome happens fairly often
and is not unusual. This indicates that there is no evidence to discredit the null.

Template for interpreting the p-value a%:


“______% is the probability that _______________________________________ or something more
(sample proportion, 𝑝̂ , in words)
extreme, assuming ____________________________________ is true.”
(the null hypothesis, in words)
Example 1 (Part 4): The statewide success rate in math for all of California’s community
colleges was just 54% in Fall 2010. Over the next decade, the Math Department at West
Valley College tried various methods to improve learning. In Fall 2020, a random sample of
200 WVC math students were surveyed. Of these students, 133 were successful in their
math class. Is the success rate in math for all students at WVC in Fall 2020 significantly
higher than the statewide success rate in math in Fall 2010? Suppose we choose  = 0.05 as
our significance level. Interpret the p-value of 1.95E-4 = 0.000195

Interpret: “0.0195% is the probability that 133 of 200 students will be successful in their
(sample proportion)
math class at West Valley, or something more extreme, assuming
the 54% success rate in math at West Valley is true.
(the null hypothesis, in words)

Idea: Since the p-value ________________________________________________________________________, then

o The outcome from the sample is _________________ (which we saw in Example 1, part 3)

o The researcher is ______________________________________________, and might conclude there

is ___________________________________________________ to discredit the null.

Example 2 (Part 4): In 1994, 61% of parents of children in high school felt that these
students were not being taught enough math and science. A recent survey of 800 randomly
selected parents found that 465 felt their children in high school are not being taught
enough math and science. Do parents feel differently today than they did in 1994?
The p-value is 0.095. Interpret.

Interpret: “9.5% is the probability that 465 of 800 parents of children in high school feel
(sample proportion)
they are not taught enough math and science today, or something more extreme, assuming
61% of parents feel this way today is true.
(the null hypothesis, in words)

Idea: Since the p-value ________________________________________________________________________, then

o The outcome from the sample is ________________________________ (see Example 2, part 3)

o The researcher is ______________________________________________, and might conclude there

is ______________________________________________________________ to discredit the null.

Note about MyStatLab study tools: For questions 8.1.15 and 8.1.21, if you decide to use
the MyStatLab study tools “Help me solve this” or “View an example”:
o Find the z-test statistic and p-value using the function 1-PropZTest on your graphing
calculator.
o Do not find the z-test statistic and p-value by hand (i.e. do not use the z-test statistic
formula). That is, ignore the study tool instructions for these three questions.
8.2: Hypothesis Testing in Four Steps

Main Ingredients
o Now that you know the essential ingredients of hypothesis testing (hypotheses,
minimizing mistakes, test statistic, and p-value), it’s time to learn the recipe
o The hypothesis testing procedure uses four steps that combine the ingredients
we’ve just studied into a useful, logical structure

Hypothesis Testing in Four Steps


1. Hypothesis: State your hypothesis about the population parameter
2. Prepare: Choose a significance level and check conditions for a valid test
3. Compute to Compare: Compute the test statistic and find the p-value to measure
the surprise
4. Interpret: Reject or fail to reject the null hypothesis; state the conclusion in the
context of the study

Step 1: Hypothesize
o Recall:
o The null hypothesis is a statement of equality about the population parameter
o The alternative hypothesis is a statement about the same parameter, but contains
one of the symbols <, >, or 
o For a test of a single population proportion, p, we have the following sets of
hypotheses:
H0: p = p0 H0: p = p0 H0: p = p0
Ha: p > p0 Ha: p < p0 Ha: p  p0
➢ Recall: p0 is the value of the population proportion assumed to be true under the
null hypothesis

Example 1 (Part 1): A researcher believes that more than half of all people with Facebook
accounts are female. She takes a random sample of 312 people with Facebook accounts
and finds that 186 are female. Does the data support the researcher’s belief? Identify the
hypotheses.

Hypothesis:

Don’t Change the Hypothesis


o The null and alternative hypothesis must be identified and written down before the
data collected and analyzed
o Important: After a hypothesis is written, never adjust 𝑯𝟎 and 𝑯𝒂 to fit your results.
o In other words, don’t change your hypotheses to correspond to what you
observed in your sample data because changing the alternative hypothesis will
change the p-value and possibly the decision/conclusion.
o If you change your mind based on the data, you must collect a new data set in order to
support the adjusted hypotheses
Step 2: Prepare

o Set the significance level, 


o This is the chance of rejecting the null when, in fact, the null is true
o Typically we use  = 0.05, but we may also use 0.01 or 0.10

o Verify the conditions for the test to be valid (note these are the same ones from the
CLT and confidence intervals). This assures normality.
1. Random sample
2. Large sample: np0  10 and n(1 – p0)  10
3. Large population: N  10n

Example 1 (Part 2): A researcher believes that more than half of all people with Facebook
accounts are female. She takes a random sample of 312 people with Facebook accounts
and finds that 186 are female. Does the data support the researcher’s belief? Check the
conditions for a valid hypothesis test.

Significance level:

Central Limit Theorem conditions:

1. Random sample?

2. Large sample?

What is p0?

i. np0

ii. n(1 – p0)

3. Large population?
There is definitely over _______________ _______________________________.
(10n) (population)

Since all three Central Limit Theorems were met, this means we have a normal distribution
(with mean = 0 and standard deviation= 1) for the z-test statistic, and therefore validates
the use of a hypothesis test.
Step 3: Compute to Compare

TI-83/84 Instructions: One Proportion z-Test


1. Using a calculator Press STAT then choose TESTS (by using the right arrow on the
keypad), and choose option 5: 1-PropZTest by scrolling down through the lists of
tests or just hitting the number 5.
2. After choosing 5: 1-PropZTest then plug in the value of p0 from your null
hypothesis, the number of successes for x, the sample size for n, and finally select
the correct option for your alternative hypothesis (prop ≠p0, <p0, >p0) (to select one
scroll through the list and then hit enter for the one you want). To finish I
recommend you select Draw and hit enter, but the Calculate option will also work
but will not give you the extra visual.
3. Make a note of the z-Test Statistic the calculator gives you and the p-value. It may
be helpful to draw the normal curve with the appropriate shading.

Example 1 (Part 3): A researcher believes that more than half of all people with Facebook
accounts are female. She takes a random sample of 312 people with Facebook accounts
and finds that 186 are female. Does the data support the researcher’s belief? Compute the
test statistic and p-value.

By calculator: Stat -> Test -> 1-PropZTest

Input: p0 = ,x= ,n=

Choose: p0

Answer: z = ,p=

Note about MyStatLab study tools: For questions 8.2.37, 8.2.39, and 8.2.41, if you decide
to use the MyStatLab study tools “Help me solve this” or “View an example”:
o Find the z-test statistic and p-value using the function 1-PropZTest on your graphing
calculator.
o Do not find the z-test statistic and p-value by hand (i.e. do not use the z-test statistic
formula). That is, ignore the study tool instructions for these three questions.
Step 4: Interpret

o Use the p-value and significance level, ∝, to make a decision about your hypothesis
test and write a conclusion.

o If the p-value < ∝,


o Decision: Then we reject the null hypothesis.
o Conclusion: There is significant evidence to suggest
________________________ (and state the alternative hypothesis in plain
English).

o If the p-value > ∝,


o Decision: Then we fail to reject the null hypothesis.
o Conclusion: There is not significant evidence to suggest
________________________ (and state the alternative hypothesis in plain
English.

o Note: Always write the conclusion within the context of the problem and specific
alternative hypothesis, using plain English

Hypothesis-Testing Logic & Using Proper Language

o If the p-value < ∝, then we “reject 𝑯𝟎 ” and “have evidence to support 𝑯𝒂 ”

➢ Do not state that the alternative hypothesis is prove true


➢ Do not state that the null hypothesis is prove false
❖ Why? We do not use “proven” because we cannot be 100% sure of
conclusions based on chance processes

o If the p-value > ∝,, then we “fail to reject” and that “we do not have evidence to
support 𝑯𝒂 ”

➢ Do not state that the 𝑯𝟎 is accepted true


❖ Why? It is possible that the power is too small and that H0 is still false
Example 1 (Part 4): A researcher believes that more than half of all people with Facebook
accounts are female. She takes a random sample of 312 people with Facebook accounts
and finds that 186 are female. Does the data support the researcher’s belief? Use  = 0.05.
Make a decision and write the conclusion.

1. Hypothesis:

2. Significance level:

3. p-value:

4. Decision:

Conclusion:
In Summary: Hypothesis Testing
1. Hypothesize
➢ Identify H0 and Ha based on the research description
2. Prepare
➢ Report the level of significance, a
➢ Check the conditions for a valid test (See **note below if conditions fail)
3. Compute
➢ Report the calculator option
➢ Use the calculator to compute the test statistic and p-value
4. Interpret
➢ Make the decision to reject H0 or not
➢ State the conclusion in the context of the study

**Side note if the conditions fail

If the Conditions Fail

o If the conditions fail to be met for the hypothesis test, the z-test statistic will
not follow a Normal distribution when the null hypothesis is true

o This means we cannot find the p-value using the Normal curve (i.e. we cannot
use normalcdf or 1-PropZTest on the graphing calculator). However, other
approaches often exist

What to Do if the Conditions Fail

o The sample size is too small


o Redo the study with a larger sample size
o Use an advanced test, e.g. Fisher’s Exact Test

o The samples are not random


o Assume random, or at least representative of population
o No guarantee, however, that conclusions are valid and useful
o Conduct research with another group to see if replicable
o State the conclusion for the sample only

Note: Please write your notes for examples in chapter 8 on a separate piece of binder
paper, as almost every example is very long.
Example 2: It is said that 90% of all restaurants fail after one year. Is the proportion of
Chinese restaurants which fail after one year different than 90%? A random sample of 185
Chinese restaurants are tracked for their first few years. After one year, 160 had failed.
Test using a significance level of 0.10. Show all four steps of hypothesis testing.

1. Hypothesis:

2. Significance level:

Central Limit Theorem conditions:

1. Random sample?

2. Large sample?

i. np0

ii. n(1 – p0)

3. Large population?
There is definitely over _______________ _______________________________.
(10n) (population)

3. By calculator: Stat -> Test -> 1-PropZTest

Input: p0 = ,x= ,n=

Choose: p0

Answer: z = ,p=

4. Decision:

Conclusion:
Example 3: In 2009, 11% of Americans had a MySpace account. You want to see if the
proportion of Americans who have a MySpace accounts is less today than compared to
2009. You randomly survey 500 people and find that 43 of them have a MySpace account.
Does the data show that the proportion of Americans today with a MySpace account has
decreased since 2009? Use a 0.05 significance level and show all four steps of hypothesis
testing.

1. Hypothesis:

2. Significance level:

Central Limit Theorem conditions:

1. Random sample?

2. Large sample?

i. np0

ii. n(1 – p0)

3. Large population?
There is definitely over _______________ _______________________________.
(10n) (population)

3. By calculator: Stat -> Test -> 1-PropZTest

Input: p0 = ,x= ,n=

Choose: p0

Answer: z = ,p=

4. Decision:

Conclusion:
Controlling Mistakes – Power
o In addition to focusing on what can go wrong (i.e. the significance level, 𝛼), statisticians
will also focus on the power of a hypothesis test
o The Power of a Hypothesis Test is the probability of rejecting the null when the
alternative is true – that is, the chance of making the right decision!
o Statisticians always strive for a large power (dependent on the significance level,
sample size, and how wrong the null is), while simultaneously keeping the
significance level small

Statistical Significance vs. Practical Significance


o Researchers call a result statistically significant when they reject the null
hypothesis
o This means the difference between their sample evidence and what is assumed to be
true under the null is so large that it cannot be explained by chance
o However, just because a result is statistically significant does not always mean it is
useful or meaningful
o A practically significant result is both statistically significant and meaningful

Example 4: Most people assume that the probability of getting heads or tails when flipping
a coin is 50/50. Some Stanford researchers however believe that it is actually more likely
to land on the same face as it started out on, with a probability of 51%. Let’s suppose you
do the experiment and you also get a sample statistic of 51% for the face you started on.
Assuming the conditions are met, test to see if your statistic is significantly larger than .5
with  = .05 when the sample size is 700 flips versus 7000 flips. For both sample sizes, the
hypothesis is 𝐻0 : 𝑝 = 0.50, 𝐻𝑎 : 𝑝 > 0.50.
a) When sample size is 700 flips, the number of successes (i.e. times the coin land on the
face you started with) is 𝑛𝑝̂ = 700(0.51) = 357 faces and the p-value is 0.298 (from
1-PropZTest: 𝑝0 = 0.50, 𝑥 = 357, 𝑛 = 700, 𝑝 > 𝑝0 ).

Decision:

Conclusion:

b) When sample size is 7000 flips, the number of successes (i.e. times the coin land on
the face you started with) is 𝑛𝑝̂ = 7000(0.51) = 3570 faces and the p-value is 0.0471
(from 1-PropZTest: 𝑝0 = 0.50, 𝑥 = 3570, 𝑛 = 7000, 𝑝 > 𝑝0 ).

Decision:

Conclusion:

c) Compare your p-values and your conclusions for the different sample sizes.

Despite having the same 𝑝̂ , to ensure ______________________________________________________,

(which only happens when the ____________________________________________________________),

you need a ____________________________________________________________________________________.


Confidence Intervals and Hypothesis Tests

o Confidence Intervals are used to answer the question:


“What is the value of this parameter?”

o The Hypothesis Test answers a slightly different question:


“Are the data consistent with the parameter being one particular value,
or might the parameter be something else?”

Example 5: Select whether a confidence interval or hypothesis is the more appropriate


statistical inference to answer the question

a) Which method is more appropriate if you want to know the population percentage of
people who prefer Pepsi?

Confidence interval or Hypothesis test

b) Which method is more appropriate if you want to know if more than 50% prefer Pepsi?

Confidence interval or Hypothesis test

When do Confidence Intervals and Hypothesis Test give the same results?

o Even though they are designed to answer different questions, they are similar enough
that you can often use a CI to reach the same types of conclusions you would with a HT
(given that the HT is a two-sided test)

o Idea: If the hypothesis test 1) is a two-sided test 𝑯𝒂 : 𝒑 ≠ 𝒑𝟎 and 2) has a significance


level of ∝, then the confidence interval has a confidence level of 𝟏−∝.
Significance Level ∝ Confidence Level 𝟏−∝.
0.01 0.99
0.05 0.95
0.10 0.90
Example 6: Suppose you want to find out the answer to the question “Do Americans prefer
Coke or Pepsi?” You conduct a blind taste test in which individuals are randomly asked to
drink one of the colas first, followed by the other cola, and then asked to disclose which
drink they prefer. Results of your taste test indicate that 53 out of 100 individuals prefer
Pepsi.

a) What is p?

b) Conduct a hypothesis test at the  = .05 level of significance. (Assume CLT holds.)

Hypothesis:

Calculator:

Decision:

Conclusion:

c) Construct the corresponding 95% confidence interval to the hypothesis test with a 5%
significance level.

Calculator:

Confidence interval:

Interpret: We are _________ confident that between ____________ and _____________ of

_______________________________ prefer ____________.

Main idea: Since the hypothesis test is two sided, the result for a 95% confidence
interval is the same as the result a hypothesis test with 5% significance level. That is,
the 50% from the hypothesis test falls with the confidence interval of (0.43, 0.63).
8.4: Comparing Proportions from Two Populations

Comparing Two Populations


o Many research questions require we compare two groups
o Men vs. women
o Treatment group vs. control group
o Old data vs. new data
o We now expand the testing procedure for one proportion to allow comparison of
two proportions
o Note, however, we will now have two of everything:
o Two population proportions to compare: p1 and p2
o Two sample sizes: n1 and n2
o Two sample proportions: 𝑝̂1 and 𝑝
̂2

Step 1: Hypothesize
o Recall:
o The null is a statement about past research or the status quo
o The alternative is a statement the researcher hopes to support
o For two proportions, the null hypothesis is 𝑯𝟎 : 𝒑𝟏 = 𝒑𝟐
o Note this is the same as 𝑯𝟎 : 𝒑𝟏 − 𝒑𝟐 = 𝟎
o There are three possibilities for the alternative hypothesis:
Left-tailed test Right-tailed test Two-tailed test
𝑯 𝒂 : 𝒑𝟏 < 𝒑𝟐 𝑯𝒂 : 𝒑𝟏 > 𝒑𝟐 𝑯𝒂 : 𝒑𝟏 ≠ 𝒑𝟐
o Template for Hypothesis for Two Proportion

If the variable is ______________________ and we are comparing _________ populations,


then the template for hypothesis for two proportion is

Example 1 (Part 1): “Apnea of prematurity” occurs when premature babies have
shallow breathing or stop breathing for more than 20 seconds. Researchers assigned a
treatment group to receive caffeine therapy, while a control group received a placebo. Of
the 937 random infants given the therapy, 377 suffered from death or disability. The
placebo group had 932 random infants, and of these, 431 suffered from death or disability.
Does caffeine therapy lower the rate of death or disability?
a) What are the two comparison groups?
Group 1:

Group 2:

b) Identify the hypotheses for the research question.


Step 2: Prepare

o Set the significance level, 


o Verify the conditions for the test to be valid:

1. Both samples are random samples (assume true if not given)

2. Both samples are large:


𝒙 +𝒙
a) Pre-step: Create the pooled sample proportion 𝒑
̂= 𝟏 𝟐
𝒏 +𝒏 𝟏 𝟐
b) Check:
i. ̂ ≥ 𝟏𝟎
𝒏𝟏 𝒑
ii. ̂) ≥ 𝟏𝟎
𝒏𝟏 (𝟏 − 𝒑
iii. ̂ ≥ 𝟏𝟎
𝒏𝟐 𝒑
iv. ̂) ≥ 𝟏𝟎
𝒏𝟐 (𝟏 − 𝒑

Note: Make sure to check 𝒑̂ with 𝒏𝟏 and 𝒏𝟐 . Do not check 𝑝̂1 with 𝑛1 and
̂2 with 𝑛2. We use the pooled sample proportion 𝑝̂ to check both samples are
𝑝
large enough since
➢ the standard error is more complicated than in the one-sample case
➢ the null hypothesis tells us that both populations have the same
population proportions (but we do not know the value of either
population proportion 𝒑𝟏 or 𝒑𝟐 )
➢ therefore, we must pool the two samples together to form an estimate
proportion when checking if the samples are large enough

3. Samples are independent of each other and independent within samples

Note: Do not check for large populations when performing a hypothesis test to
compare two populations.
Example 1 (Part 2): “Apnea of prematurity” occurs when premature babies have
shallow breathing or stop breathing for more than 20 seconds. Researchers assigned a
treatment group to receive caffeine therapy, while a control group received a placebo. Of
the 937 random infants given the therapy, 377 suffered from death or disability. The
placebo group had 932 random infants, and of these, 431 suffered from death or disability.
Does caffeine therapy lower the rate of death or disability?
a) Set a significance level.

b) Verify the conditions for a valid hypothesis test.

1. Random?

2. Prestep:

Large samples:

i. n1 p̂

ii. n1 (1 − p̂)

iii. n2 p̂

iv. n2 (1 − p̂)

3. Independence:

a. Are the two samples independent of EACH OTHER?

b. Are the individuals WITHIN each sample independent?


Step 3: Compute to Compare

o The formula for the test statistics is given by


(𝑝
̂1 − 𝑝
̂) 2 −0
𝑧=
1 1
√𝑝̂ (1 − 𝑝̂ ) (𝑛 + 𝑛 )
1 2
𝑥 𝑥 𝑥 +𝑥
where 𝑝
̂1 = 𝑛1 , 𝑝
̂2 = 𝑛2 , and 𝑝̂ = 𝑛1+𝑛2
1 2 1 2

o The p-value is again found using the Normal distribution – it is the probability of
being as extreme or more extreme than this z, assuming the null is true

TI-83/84 Instructions: Two Proportion z-Test


1. Using a calculator Press STAT then choose TESTS (by using the right arrow on the
keypad), and choose option 6: 2-PropZTest by scrolling down through the lists of
tests or just hitting the number 6.
2. After choosing 6: 2-PropZTest then plug in the number of successes for the two
samples (x1 and x2), the two sample sizes (n1 and n2), and finally select the correct
option for your alternative hypothesis (p1: ≠ p2, < p2, > p2) (to select one scroll
through the list and then hit enter for the one you want). To finish I recommend you
select Draw and hit enter.
3. Make a note of the z-Test Statistic the calculator gives you and the p-value, and
draw the normal curve with the appropriate shading..
4. Using the p-value make a decision about your hypothesis test:

Example 1 (Part 3): “Apnea of prematurity” occurs when premature babies have
shallow breathing or stop breathing for more than 20 seconds. Researchers assigned a
treatment group to receive caffeine therapy, while a control group received a placebo. Of
the 937 random infants given the therapy, 377 suffered from death or disability. The
placebo group had 932 random infants, and of these, 431 suffered from death or disability.
Does caffeine therapy lower the rate of death or disability? Identify the p-value from the
calculator.

2-PropZTest: x1

n1

x2

n2

“p1 p2”
Step 4: Interpret

o Make a decision
o If the p-value < , we reject the null hypothesis
o If the p-value > , we fail to reject the null hypothesis
o Write a conclusion
o Reject the null:
“There is significant evidence the alternative hypothesis is true”
o Fail to reject the null:
“There is not significant evidence the alternative is true”
➢ Note: Always write the conclusion within the context of the problem and
specific alternative hypothesis, using plain English

Example 1 (Part 4): “Apnea of prematurity” occurs when premature babies have
shallow breathing or stop breathing for more than 20 seconds. Researchers assigned a
treatment group to receive caffeine therapy, while a control group received a placebo. Of
the 937 random infants given the therapy, 377 suffered from death or disability. The
placebo group had 932 random infants, and of these, 431 suffered from death or disability.
Does caffeine therapy lower the rate of death or disability?
a) Compare the p-value to  and make a decision.

b) Write a sentence summarizing the conclusion, within the context of the


problem.
In Summary: Hypothesis Testing

1. Hypothesize
➢ Identify H0 and Ha based on the research description
2. Prepare
➢ Report the level of significance, a
➢ Check the conditions for a valid test
3. Compute
➢ Report the calculator option
➢ Use the calculator to compute the test statistic and p-value
4. Interpret
➢ Make the decision to reject H0 or not
➢ State the conclusion in the context of the study

Example 2: A random sample of 500 people were asked about their political affiliation and
their attitude toward government-sponsored mandatory testing of AIDS. The results were
as follows:
Favor Undecided Opposed Total
Democrat 135 80 65
Republican 95 60 65

Is there a difference in the proportions of Democrats and Republicans who are undecided
regarding mandatory testing for AIDS? Use  = 0.05 and show all four steps of hypothesis
testing.

1) Group 1:

Group 2:

Hypothesis:

2) Significance level:

Condition:

1. Random?

2. Prestep:
Large samples:

i. n1 p̂

ii. n1 (1 − p̂)

iii. n2 p̂

iv. n2 (1 − p̂)

3. Independence:

a. Are the two samples independent of EACH OTHER?

b. Are the individuals WITHIN each sample independent?

3) 2-PropZTest: x1

n1

x2

n2

“p1 p2”

p=

4) Decision:

Conclusion:

You might also like