0% found this document useful (0 votes)
22 views50 pages

310 Spring2012 Chapter11

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)
22 views50 pages

310 Spring2012 Chapter11

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/ 50

Chapter Eleven

Introduction to Hypothesis
Testing

618
Hypothesis Testing
• Along with Estimation, Hypothesis Testing
constitutes the second type of statistical
inference.

• The goal of hypothesis testing is to determine


whether there is enough “statistical evidence”
to conclude that a conjecture or hypothesis
about a population parameter is supported by
the data.

619
Null and Alternative Hypothesis
• When we do hypothesis testing, we test
between two hypothesis or conjectures.
• The first such conjecture is called the null
hypothesis and is denoted as H0.
• The second conjecture is called the alternative
hypothesis and is denoted as H1.
• The goal is to design a statistical procedure
that allows us to determine whether the data
supports the null or the alternative
hypothesis.
620
• How do we determine which one is the null
(H0) and which one is the alternative (H1)
hypothesis?

• We consider the null hypothesis (H0) as the


one that is more costly (socially, economically,
etc.) to reject when it is true.

• The statistical testing procedures are designed


in a way that keeps the probability of wrongly
rejecting H0 low.

621
• The basic illustrative example of hypothesis
testing and the distinction between H0 and H1 is
the issue of establishing culpability of a person
in a trial.
• The worst possible social outcome in this case is
to convict an innocent person. Thus, the null
hypothesis becomes:
H0 : The defendant is innocent
• And the alternative hypothesis is:
H1 : The defendant is guilty
• Again, H0 is the hypothesis (conjecture)
considered more costly (socially, economically,
etc.) to wrongly reject.
622
Type I and Type II Errors
• There are two types of errors (mistakes) we can make
in a hypothesis test:
I. Type I Error: Rejecting a true null hypothesis H0
II. Type II Error: Failing to reject a false null hypothesis
H0
• Significance Level: Is the probability of committing a
Type I error. It is typically denoted by α
• The probability of committing a Type II error is
typically denoted by β
• As we discussed above, the Type I error is deemed
more costly than Type II.
• The goal is to design testing procedures where the
researcher can control the significance level and fix it
to be low. For example, fix α=5%.
623
• Ideally, one would want procedures where both
error probabilities α and β Are low. Unfortunately,
these error probabilities are inversely related.
Therefore, we settle on fixing α to be low.

• In our previous example, we have:


• α= Probability of convicting an innocent
defendant.
• β = Probability of letting a guilty defendant free.

624
Logical Steps of a Hypothesis Test
• We begin with a null H0 and alternative hypothesis H1.
• The testing procedure begins with the assumption that
H0 is true.
• The goal is to determine whether there is enough
evidence in the data to support H1.
• There are only two possible decisions:
• Conclude that there is enough evidence to support H1
• Conclude that there is not enough evidence to support
H1
• The decision rule revolves around
Pr(Type I error) = α
625
Hypothesis Tests of a Population Mean µ
when the Standard Deviation  is Known
• Here, the goal is to compare µ against a pre‐
specified value, µ*.
• There are two types of alternative hypothesis:
• Two‐tail test.‐ Here, we have
H0: µ = µ* vs. H1: µ ≠ µ*
• One‐tail tests.‐ Here, we could have either
H0: µ ≤ µ* vs. H1: µ > µ*
or…
H0: µ ≥ µ* vs. H1: µ < µ*
626
Re‐expressing One‐Tail Tests
• Suppose we have
H0: µ ≤ µ* vs. H1: µ > µ*
• Notice that if we have enough evidence in favor of
H1 when we start with the assumption that µ = µ*,
the evidence in favor of H1 would be even stronger if
we assumed that µ < µ*.
• For this reason, it would suffice to use
H0: µ = µ* vs. H1: µ > µ*
• If we reject µ = µ* in favor of µ > µ*, we would
automatically also reject µ ≤ µ* in favor of µ > µ*.
627
• Analogous reasoning leads us to conclude that, in
order to test
H0: µ ≥ µ* vs. H1: µ < µ*
it suffices to test
H0: µ = µ* vs. H1: µ < µ*

• This is because, if we reject µ = µ* in favor of µ < µ*


we would necessarily also reject µ ≥ µ* in favor of µ
< µ*.

628
• Therefore, we can re‐express our tests as:

• Two‐tail test.‐
H0: µ = µ* vs. H1: µ ≠ µ*

• One‐tail tests.‐
H0: µ = µ* vs. H1: µ > µ*
or…
H0: µ = µ* vs. H1: µ < µ*

629
• Example 10.1: This is the example about the
manager wanting to estimate the demand for
computers.
• Back then, we determined that a 95%
confidence interval for the mean demand µ
was [340.76 , 399.56]
• Suppose now that the computer firm wants to
determine whether the mean demand µ is
different from 350.
• In this case, we would have
H0: µ=350 vs. H1: µ≠350
630
• Next, suppose a new inventory strategy is considered,
but it has been determined that this new strategy
would be profitable if and only if the mean demand µ
is greater than 350.
• Suppose the firm wants to test the hypothesis that this
new strategy will be profitable.
• Recall that H0 is the hypothesis that is costly to
wrongly reject. In this case, it would be costly to adopt
the new strategy when it is not profitable. Thus, we
should have “H0: The new strategy is NOT profitable”.
• That is, we should use a one‐tail test
H0: µ ≤ 350 vs. H1: µ > 350
• As we concluded previously, to test this one‐tail
hypothesis we use
H0: µ = 350 vs. H1: µ > 350
631
• Example 11.1: A department store is considering a
new billing system for the store’s credit customers. It
has been determined that the new system will be
cost‐effective only if the mean monthly account µ is
more than $170.
• Suppose the store wants to evaluate whether it
should adopt the new billing system or not.
• Again, the store wants to avoid wrongly considering
that the new system is cost‐effective. Therefore, we
should use:
H0: µ ≤ 170 vs. H1: µ > 170
• As before, to test this one‐tail hypothesis we simply
use
H0: µ = 170 vs. H1: µ > 170
632
Testing Methods
• OK, we are finally ready to describe the actual
methodology used in a hypothesis test.

• There are two general approaches:


1) The rejection region method.
2) The p‐value approach.

• We will describe how each of these approaches works


in both two‐tail and one‐tail hypothesis tests.

• Note: Remember, we are maintaining the assumption


that the standard deviation  is known.
633
Rejection Region Method
• All tests about the population mean µ are based on
looking at the sample mean

• The rejection region method works by establishing a


region of values such that we reject H0 whenever
Falls inside this region.

• The features of the rejection region depend on:


i. The significance level α we want to achieve.
ii. Whether we have a one‐tail or a two‐tail test.
634
Rejection Region Method with One‐tail Tests
• First, we begin with a pre‐specified significance level α (we
get to choose this). Recall that α is defined as:
Pr(Rejecting H0 when it is true)
• Now, suppose our test is
H0: µ = µ* vs. H1: µ > µ*
• Intuitively: Since X is a consistent estimator of µ, we
would have evidence in favor of H1 if X   * is “large”.
According to this logic, we should reject H0 in favor of H1 if

X   *  xL
• Where xL is a cut‐off value. How do we determine xL by
making sure that we achieve the significance level α that
we pre‐specified. For this, we invoke the Central Limit
Theorem.
635
• That is, we choose xL in order to satisfy
Pr(Rejecting H0 when it is true) = α
• That is, we need
Pr( X   *  xL when H 0 is true)  
• Next, recall “H0 is true” simply means “µ = µ*”.
• Therefore, we need xL to be such that:
Pr( X   *  xL when    *)  
• Using the Central Limit Theorem, if µ = µ*, then
X   *

n
is approximately distributed as a Standard Normal
636
• Dividing both sides by , we have

 
 
 X   * xL 
Pr( X   *  xL )  Pr 
   
 
 n n
• By the Central Limit Theorem, if µ= µ*, the above
probability is approximately equal to
 
 
 xL 
Pr Z 
  
 
 n
where Z is a Standard Normal random variable… 637
• If we want to make the above probability
equal to α, we need to make
xL
 z

n
where (as before), zα is the value that satisfies
Pr(Z > zα) = α.
• To satisfy the above equality, we need to set

x L  z 
n

638
• Therefore, the rejection region approach tells
us to reject H0: µ = µ* in favor of H1: µ > µ* if

X   *  z 
n
• Rearranging, we reject H0: µ = µ* in favor of
H1: µ > µ* if
X *
 z

n

639
• We denote
X *
z

n
and we refer to z as the standardized test‐statistic
or simply as our test‐statistic.

• We reject H0: µ = µ* in favor of H1: µ > µ* if


z > zα
• All of our testing procedures for hypothesis about
µ revolve around the test‐statistic ‘z’.
640
• Now, suppose our test is
H0: µ = µ* vs. H1: µ > µ*
• Intuitively: Since X is a consistent estimator of µ, we
would have evidence in favor of H1 if X   * is “very
negative”. According to this logic, we should reject H0
in favor of H1 if
X   *   xu

• Where xu is a cut‐off value. As before, we determine


the value of xu by making sure that we achieve the
significance level α that we pre‐specified. For this,
once again we invoke the Central Limit Theorem.
641
• That is, we choose xu in order to satisfy
Pr(Rejecting H0 when it is true) = α
• That is, we need
Pr( X   *   xu when H 0 is true)  
• Next, recall “H0 is true” simply means “µ = µ*”.
• Therefore, we need xu to be such that:
Pr( X   *   xu when    *)  
• Using the Central Limit Theorem, if µ = µ*, then
X   *

n
is approximately distributed as a Standard Normal
642
• Dividing both sides by , we have
 
 
 X   *  xu 
Pr( X   *   xu )  Pr 
   
 
 n n 
• By the Central Limit Theorem, if µ= µ*, the above
probability is approximately equal to
 
 
  xu 
Pr Z 
  
 
 n 
where Z is a Standard Normal random variable… 643
• If we want to make the above probability equal to
α, we need to make
 xu
 z1

n
where (as before), z1‐α is the value that satisfies
Pr(Z > z1‐α) = 1‐α.
• By the symmetry properties of the Standard
Normal (we have discussed this before), we have
z1‐α = ‐ zα
• To satisfy the above equality, we need to set
 xu
  z 
 that is: x u  z  
n
n 644
• Therefore, the rejection region approach tells
us to reject H0: µ = µ* in favor of H1: µ < µ* if

X   *   z 
n
• Rearranging, we reject H0: µ = µ* in favor of
H1: µ < µ* if
X *
  z

n

645
• Again, denoting

X *
z

n

as our test‐statistic, then we reject H0: µ = µ*


in favor of H1: µ < µ* if
z <‐ zα
646
• The last case is the two‐tailed hypothesis:
H0: µ = µ* vs. H1: µ ≠ µ*
• Intuitively now, we should reject H0 in favor of H1 if

either is very large or very negative. Either of
these would constitute evidence in favor of H1 and
against H0.
• That is, we should reject H0 in favor of H1 if


• As in all previous cases, we choose ∗ to make sure
that the significance level  is attained.

647
• So, we choose ∗ such that:


• We have
∗ ∗
∗ ∗

• Next, notice that ∗ if and only if

∗ < ∗
• Therefore,
∗ ∗
∗ ∗ < ∗


< ∗)

648
• Therefore, we need to choose ∗ such that


< ∗) =
• That is,


< ∗) = 1‐ 
• Standardizing both inequalities by , the
previous line becomes

∗ ∗

649
• But by the Central Limit Theorem, if H0 is
correct and µ = µ*, the previous probability is
approximately equal to
̅∗ ̅∗

where Z is a Standard Normal.


• So, in order to achieve the significance level ,
we need to choose ∗ such that
∗ ∗

650
• To make this happen, recall from Chapter 10 that if Z
is a Standard Normal, then

• Therefore, we need to choose ∗ such that


̅∗
⁄ that is: ∗ ⁄

• Therefore, we reject H0: µ = µ* in favor of H1: µ ≠ µ*


651
• Again, denoting

X *
z

n

as our test‐statistic, then we reject H0: µ = µ*


in favor of H1: µ ≠ µ* if
|z| > zα/2
652
Summary of Rejection Region Hypothesis
Testing Methodology
• Let our test‐statistic be denoted as
X *
z

n
• We reject H0: µ = µ* in favor of H1: µ > µ* if
z > zα
• We reject H0: µ = µ* in favor of H1: µ < µ* if
z <‐ zα
• We reject H0: µ = µ* in favor of H1: µ ≠ µ* if
|z| > zα/2
653
Example 11.1 (cont.): Suppose a random sample of
n=400 accounts is drawn, and the resulting
sample mean is . Our goal is to test
H0: µ ≤ 170 vs. H1: µ > 170
• As before, to test this one‐tail hypothesis we
simply use
H0: µ = 170 vs. H1: µ > 170
• Suppose our desired significance level is = 5%,
and that the true standard deviation of account
balances is =$65.
• From our previous analysis, the rejection region
method tells us to reject H0 in favor of H1 if z > zα
So, all that is left is to compute the test‐statistic
‘z’.
654
• For =5%, we have zα = 1.645.
• The value of our test‐statistic is:

X * 178  170


z   2.46
 65
n 400

• Since z=2.46 is greater than zα = 1.645, we


reject H0: µ = 170 in favor of H1: µ > 170.

655
p‐Value Approach
• We have already described our rejection rules
for each type of test (two‐tailed, and one‐
tailed). Now, we can define the notion of a p‐
value:
• p‐Value: The p‐value of a test is the
probability of observing a test statistic at least
as extreme as the one computed in the data
given that the null hypothesis is true.
• Here, the phrase “at least as extreme” means
“at least as detrimental to the null
hypothesis”.
656
• Thus, we can now describe how to obtain the p‐
value for each type of test…
• Suppose we have H0: µ = µ* vs. H1: µ > µ*. We
know that we reject H0 in favor of H1 if our test‐
statistic X *
z

n
is large. Since the p‐value is the probability of
observing a test‐statistic at least as bad for H0 as
the one we observed in the data, then the p‐value
is the probability of observing a test‐statistic at
least as large as the one we obtained in the data
657
• Under the null hypothesis H0, the test‐statistic z
is approximately a Standard Normal.
• Therefore, the p‐value becomes

where Z is a Standard Normal random variable


and z is the value obtained for our test statistic.
• In the previous example, the p‐value of the test
is:
Pr( Z > 2.46 ) = 1 – Pr( Z <2.46 )
= 1 ‐ 0.9931 = 0.0069

658
• Using the same reasoning, the p‐values for the other
types of tests are:
• If H0: µ = µ* vs. H1: µ < µ*.
p‐value =

• If H0: µ = µ* vs. H1: µ ≠ µ*.


p‐value

where Z is a Standard Normal and ‘z’ is the value we


obtained for our test‐statistic in the data observed.

659
Summary of p‐value formulas
• Let Z be a Standard Normal and ‘z’ be the value
obtained for our test‐statistic in the data
observed. Then:
• If H0: µ = µ* vs. H1: µ > µ*.
p‐value =

• If H0: µ = µ* vs. H1: µ < µ*.


p‐value =

• If H0: µ = µ* vs. H1: µ ≠ µ*.


p‐value
660
• Once we compute the p‐value, we can describe the
result as follows:
• If the p‐value is less than .01: We say there is
overwhelming evidence to infer that H1 is true and
H0 is false. We also say that the test is highly
significant.
• If the p‐value is between .01 and .05: We say there
is strong evidence to infer that H1 is true and H0 is
false. We also say that the test is significant.
• If the p‐value is between .05 and .10: We say there
is weak evidence to infer that H1 is true and H0 is
false. We also say that the test is not statistically
significant.
• If the p‐value is higher than .10: We say there is
little to no evidence in favor of H1.
661
• Example: A business student claims that, on
average, an MBA student is required to
prepare more than five cases per week. To
examine the claim, a statistics professor asks a
random sample of 10 MBA students to report
the number of cases they prepare weekly. The
results are:
2 7 4 8 9 5 11 3 7 4
• Can we conclude at a 5% significance level
that the claim is true, assuming that the
number of cases is Normally distributed with a
standard deviation of 1.5?

662
• Specifically, we want to test
against
• As we discussed previously, it suffices to test
against
• Our test statistic is

• The rejection region method says that we reject H0: µ =


5 in favor of H1: µ > 5 if
z > zα
• We have zα= z.05=1.645. Since 2.11 > 1.645, we
reject H0 in favor of H1: There is enough
evidence to infer that the mean is greater than
5 cases. 663
• The p‐value for this test is:

• Thus, there is strong evidence to infer that H1


is true and H0 is false. Using our previous
terminology, we say that the test is significant.

664
• Example: A manufacturer of lightbulbs advertises that,
on average, its long‐life bulb will last more than 5,000
hours. To test this claim, a statistician took a random
sample of 100 bulbs and measured the amount of time
until each bulb burned out. He obtained
• If we assume that the lifetime of this type of bulb has a
standard deviation of 400 hours, can we conclude at
the 5% significance level that the claim is true?
• Letting µ denote the population mean of the lifetime of
bulbs, this problem asks us to test
against ,000
• Once again, it suffices to test
against

665
• Our test statistic is

.

The rejection region method says that we reject H0:


µ = 5000 in favor of H1: µ > 5000 if
z > zα
• We have zα= z.05=1.645. Since 1.62 < 1.645,
we fail to reject H0 in favor of H1: There is
NOT enough evidence to infer that the mean
is greater than the claim is true.

666
• The p‐value of this test is given by:

• There is weak evidence to infer that H1 is true


and H0 is false. The test is not statistically
significant

667

You might also like