Chapter 20

Chapters 20, 21
Hypothesis Testing-- Determining if a
Result is Different from Expected
Example
 An Internet hosting company wants to make
sure that its connection is running at full
speed for a large business at least 90% of the
time or more. A sample of 125 tests is
collected at randomly chosen times, and the
Internet service is running at full speed 82%
of the time. Is this enough evidence to
suggest that the actual population proportion
is not 90%?
 This is the type of question we are trying to
answer with hypothesis testing.
Hypotheses of a Hypothesis Test
 Null Hypothesis: The null hypothesis of a
hypothesis test is the hypothesis to be tested.
We refer to this as H0.

Ex) The population proportion of full speed
Internet is 90%.


H0.: p = .90
The null hypothesis is going to be the
hypothesis that the actual population
proportion equals a certain value. This will be
the case even if we are trying to show that this
is not the case.
 The Alternative Hypothesis: a hypothesis
considered alternate to the null hypothesis.
We use the symbol Ha.

Ex) The population proportion is not 0.90.


Ha: p ≠ 0.90
There are actually three types of Alternative
Hypotheses. When we hypothesize that the
proportion does not equal a certain value,
this is called a two-tailed test.
Three Types of Alternative
Hypotheses
 Two Tailed Test- p ≠ p0

ex) Ha: p ≠ 0.90
 One Tailed Tests
1) Left Tailed Test- p < p0
ex) Ha: p < 0.90
2) Right Tailed Test- p > p0
ex) Ha: p > 0.90
Choosing The Hypotheses
 Null Hypothesis: We always choose the null
hypothesis to be a statement that the
population proportion equals a certain value.
 Alternative Hypothesis: We choose which
of the three to use here based on what we
are trying to show.

Ex) If we are trying to show that the actual
population proportion is less than believed or
claimed, we choose the left-tailed alternative
hypothesis.
Tire Example Ctd.
 If we are the company, we may want to test to
make sure the proportion does not fall below
90% of the time.


H0: p = .90
Ha: p < .90
Performing a Hypothesis Test
 How do we perform a hypothesis test?
 In other words, how do we determine if the
population proportion is actually a different
value than expected (or advertised)?
 When we look at these situations, we are
trying to determine if there is enough
evidence to suggest that the actual
population proportion is different from the
hypothesized proportion.
Hypothesis Testing Strategy
 To begin, we find what is called a test statistic.
 This is simply the z-score:
Sample
proportion
z
Standard
deviation of the
sampling dist.
pˆ  p
p (1  p)
n
Hypothesized pop.
proportion
Hypothesis Testing Strategy ctd.
 We then determine where the test-
statistic falls.
Do Not Reject H0
Reject H0
Reject H0
Nonrejection
Region
Critical values
Critical Values
 The critical values are determined by the
significance level we want to test at.
 Example: If we want to be 95% confident
(more to come on this later) in our result, we
test at the   .05 significance level. This
would make our critical values lie at -1.96 and
1.96.
One-tailed Tests
 Left Tailed Test
Right Tailed Test
Nonrejection
region
Nonrejection
region
Rejection
Region
Critical
value
Critical
value
Rejection
Region
Internet Example Completed
 Hypotheses: H0: p = .90
Ha: p < .90
 Significance Level: Assume α = .05
 Check Assumptions and Conditions:




Independence
Randomization
10% condition
Success/Failure Condition
Tire Example Ctd.
 Test Statistic:
.82  .90
z
 2.98
.90(.10)
125
 Critical Value of a left-tailed test with 5%
significance: z = -1.645
Tire Example ctd.
 Since the test
statistic falls in
the rejection
region, we
should reject
the null
hypothesis.
Two Types of Errors
 There are two types of errors that can be
made in hypothesis testing.
 Type I error: Rejecting a true null
hypothesis.
 Type II error: Not rejecting a false null
hypothesis.
 Question: What is the probability of a type I
error?
Probabilities of Errors
 The probability of a type I error is the
significance level, , of a hypothesis test.
 The smaller the significance level, , the
greater the probability of making a type II
error, , becomes.
The p-value approach to
hypothesis testing
 The p-value indicates how likely it would be
to observe the value obtained for the test
statistic if the null hypothesis were true (in
other words, if the hypothesized mean was
the actual population mean.)
 Note: This is a conditional probability.
 What does this mean?
Interpretation of the p-value
 If the p-value is small, then it would be
extremely unlikely to obtain that sample mean
if the null hypothesis was true.
 Thus, for a p-value smaller than the desired
significance level, we reject the null
hypothesis.
 In general, small p-values provide evidence
against the null hypothesis.
Review of the two-methods
 Critical Value Approach
Step 1: State the null and alternative hypotheses.
Step 2: Determine the significance level.
Step 3: Determine the critical value(s).
Step 4: Determine the value of the test statistic.
Step 5: If the test statistic falls in the rejection
region, we reject the null hypothesis.
Otherwise, we do not.
Step 6: State the conclusion in words.
P-value approach
Step 1: State the null and alternative
hypotheses
Step 2: Determine the significance level.
Step 3: Calculate the value of the test-statistic.
Step 4: Using Table II, calculate the p-value for
the test statistic.
Step 5: If p   reject the null hypothesis.
Otherwise, we do not.
Step 6: State your conclusion in words.
Example
 In a recent survey, 61% of respondents prefer
a chocolate variety of ice cream, according to
a survey of 1000 randomly selected adults.
 Find a 95% confidence interval for the
proportion who prefer a chocolate variety.
Example ctd.
 Test the null hypothesis that half of the people
prefer a chocolate variety of ice cream.
One-tailed or two-tailed?
Example ctd.
 What is the P-value?