You are on page 1of 39

Business Statistics: Communicating with Numbers

By Sanjiv Jaggia and Alison Kelly

McGraw-Hill/Irwin

Copyright 2013 by The McGraw-Hill Companies, Inc. All rights reserved.

9.1 Introduction to Hypothesis


Testing

Statistical Hypothesis
is a statement about the value of a population
parameter (e.g., mean)

The null hypothesis, denoted by H0 ,


is a statement about one of the parameters of the
population, presumed as default state of nature or
status quo.

9-2

9.1 Introduction to Hypothesis


Testing
The

alternative (research) hypothesis, HA,


is statement which contradicts the null
hypothesis (usually what we want to prove).

We Reject the null hypothesis if


Sample evidence is inconsistent with H0.

We Do not reject the null hypothesis if


Sample evidence is not inconsistent with H0 or
We do not have enough evidence to reject H0.

9-3

A Summary of Forms for Null and


Alternative Hypotheses about a
Population Mean

A hypothesis test about the value of a population mean


takes one of the following three forms (where 0 is the
hypothesized value of the population mean). We always
look at alternative hypothesis to define the type)

left-tailed test right-tailed test

H 0: > 0 H 0: < 0
H a : < 0

H a : > 0

two-tailed test

H 0: = 0
Ha: 0

Note that H0 always contains the equality.

9-4

9.1 Introduction to Hypothesis


Example: A trade group predicts that back-to-school
Testing

spending will average $606.40 per family this year.


A different economic model is needed if the
prediction is wrong.
1. Parameter of interest is since we are interested
in the average back-to-school spending.
2. Since we want to determine if the population
mean differs from $606.4 (i.e, ), it is a two-tail
test.
3. H0: = 606.4
HA: 606.4
9-5

9.1 Introduction to Hypothesis


Example: An advertisement states that on average
Testing

you can lose more than 10 pounds in the diet


program. A consumer activist wants to test this
claim.
1. Parameter of interest is since we are interested
in the average weight loss.
2. Since the activist wants to determine whether >
10, it is a one-tail (right-tailed) test.
3. H0: < 10
HA: > 10

9-6

Type I and Type II Errors


Since hypothesis tests are based on sample data,
we must allow for the possibility of errors:

I error, (significance level,


probability of rejecting H0 when it is true.

Type

II error ()
probability of not rejecting H0 when it is false.

Type

9-7

Decisions in Hypotheses
Testing
Actual Situation
H0 True
Decision

(not guilty)

Do not reject H0
(not guilty)
Reject H0
(guilty)

Ha True

Correct
(1-)

Type I
Error ()

(guilty)
Type II
Error ()
Correct
(1-)

9-8

9.1 Introduction to Hypothesis


Testing
Example: Consider the following competing
hypotheses that relate to the court of law.
H0: An accused person is innocent
HA: An accused person is guilty
Consequences of Type I and Type II errors:
Type I error: Conclude that the accused is
guilty when in reality, he/she is innocent.
Type II error: Conclude that the accused is
innocent when in reality, he/she is guilty.
For a given sample size n, a decrease in will
increase and vice versa.
Both and decrease as n increases.
9-9

9.2-9.3 Hypothesis Test of the


Population Mean

Hypothesis testing enables us to determine whether


the sample evidence is inconsistent with what is in
the null hypothesis (H0).

Basic principle: First assume that H

is true and
then determine if sample evidence contradicts this
assumption.
Two approaches to hypothesis testing:
The critical value approach.
The p-value approach.
0

9-10

9.2-9.3 Hypotheses Testing of the


Population Mean
Critical value approach

Test Statistic (TS)


a value of the parameter we get from the sample
(e.g., x for the mean)
We Reject H0 and conclude H0 is not correct if TS
(e.g., x ) is in the rejection region.
The rejection region is determined by (Type I
error, significance level) and type of test.
9-11

9.2-9.3 Hypotheses Testing of the


Population Mean

The Critical Value Approach


Critical value: a point that separates the
rejection region from the non-rejection region.

Reject H0 if
z > z/2 or z < z/2
Reject H0 if z < z

Reject H0 if z > z

9-12

9.2-9.3 Hypotheses Testing of the


Population Mean

Critical value approach


The value of the test statistic for the hypothesis
test of the population mean when the population
standard deviation is known is computed as:
x 0 (if is known) or
x 0 (if is unknown
z
tdf
n
s n
111
and s is
used)
where 0 is the hypothesized mean value.
Test statistic (z or t) is compared to critical value
(z or t based on and type of test)
9-13

9.2-9.3 Hypothesis Test of the


Population
Mean
The Critical Value
Approach

The critical value depends on the alternative


hypothesis.

Decision Rule: Reject H0 if:


z > z for a right-tailed test
z < z for a left-tailed test
z > z/2 or z < z/2 for a two-tailed test

The same rules are true for t (when is unknown and s


is used to calculate test statistic.)
9-14

9.2-9.3 Hypothesis Test of the


Population Mean

The Critical Value Approach


Four Step Procedure Using the Critical Value
Approach
Step

1. Specify the null and the alternative


hypotheses.
Step 2. Specify the test statistic and compute its
value.
Step 3. Find the critical value or values.
Step 4. State the conclusion and interpret the
results.
9-15

9.2-9.3Hypothesis Test of the


Population
Mean
that a research analyst wishes to
Example: Recall

determine if average back-to-school spending differs


from $606.40.
Out of 30 randomly drawn households from a normally
distributed population (n=30), sample mean (
) is
$622.85 and the population standard deviation () is $65

Step 1. H0: = 606.4, HA: 606.4


Step 2. z = 1.39 (using formula below)
x 0
z
n
Step 3. Based on HA, this
is a two-tail test and for
= 0.05, the critical value
is z = z0.025 = 1.96.
9-16

9.2-9.3 Hypothesis Test of the


Population Mean
Step 4. As test statistic z=1.39 < critical
value z/2 =1.96, the Null hypothesis is NOT
rejected. The average spending is around
606.4

9-17

9.2-9.3 Hypothesis Test of the


Population
Mean
Example 2: The Critical Value Approach
the following: n 35, x 16.37, s 7.22
Step 1. State the hypotheses:
H0 : 24
H A : 24
Consider

Step 2. Because n = 35 (i.e, n > 30), we can assume that


the sample mean is normally distributed but population
standard deviation is unknown. Thus we compute the
test statistic as t:
t34

x 0
s

16.37 24
7.22

35

6.25

9-18

9.2-9.3 Hypothesis Test of the


Population
Mean
Example
2 (continue):
a

n 35, x 16.37, s 7.22, t 34 6.25


H0:

> 24, HA: < 24

Step

3. Based on HA,
this is a left-tail test.
For = 0.05 and
n1 = 34 df, the
critical value is
t,df = t0.05,34 = 1.691

(1.691 due to symmetry).


9-19

9.1-9.3 Hypothesis Test of the


Population Mean
Example 2 (continue):
Step 4. State the conclusion and interpret the results.
Reject H0 as t34 =-6.25 < t0.05,34 = 1.691.

we reject H0 and conclude that the sample data


support the alternative claim that average is
less than 24 ( < 24).

9-20

9.2-9.3 Hypothesis Test of the


Population Mean

The p-value Approach

The value of the test statistic for the hypothesis test of


the population mean when the population standard
deviation is known is computed as
z

x 0

where 0 is the hypothesized mean value.

p-value: the likelihood of obtaining a sample mean that is


at least as extreme as the one derived from the given
sample, under the assumption that the null hypothesis is
true.
9-21

9.2-9.3 Hypothesis Test of the


Population Mean

The p-value Approach


Determining

the p-value depending on the type of


the hypotheses test.

Reject H0 if p-value <

9-22

9.2-9.3 Hypothesis Test of the


Population
Mean
The
p-value Approach

The calculation of the p-value depends on the


specification of the alternative hypothesis:

Decision rule: Reject H0 if p-value < .

The smaller the p-value, the stronger the evidence to reject null
hypothesis

The rule is universal for any type of test.


9-23

9.2-9.3 Hypothesis Test of the


Population Mean

Four Step Procedure Using The p-value


Approach
Step

1. Specify the null and the alternative


hypotheses.
Step 2. Specify the test statistic and compute its
value.
Step 3. Calculate the p-value.
Step 4. State the conclusion and interpret the
results.

9-24

9.2-9.3 Hypothesis Test of the


Population Mean

Example: The p-value Approach

the following: n 25, x 71, 9


Step 1. State the hypotheses: H : 67
0
Consider

H A : 67

Thus, 0 = 67
Step

2. Given that the population is normally


distributed with a known standard deviation,
= 9,we compute the value of the test statistic
as z x 0 71 67 2.22

25

9-25

9.2-9.3 Hypothesis Test of the


Population Mean

Example (continue): The p-value Approach

0 67
Unstandardized Normal Distribution: x 71
z 2.22 0
Standardized Normal Distribution:
Step 3. Now compute the p-value:
Note that since HA: > 67,
this is a right-tail test.
Thus, P ( X 71) P (Z 2.22)
1 0.9868
0.0132

p-value = 0.0132
or 1.32%
9-26

9.2-9.3 Hypothesis Test of the


Population
MeanThe p-value Approach
Example
(continue):
p-value

= 0.0132 or 1.32%
Typically, before implementing a hypothesis test,
we choose a value for = 0.01, 0.05, or 0.1 and
reject H0 when the p-value < .
Lets

say, before conducting the study, we chose


= 0.05.
Step 4. Since p-value = 0.0132 < = 0.05, we
reject H0 and conclude that the sample data
support the alternative claim that average is
greater than 67( > 67)
9-27

9.2-9.3 Hypothesis Test of the


Population Mean
Example (continue): The Critical Value Approach
Step

1. H0: < 67, HA: > 67

Step

2. From previous example, test statistic

z 2.22

Step

3. Based on HA, this is a


right-tail test and for
= 0.05, the critical value
is z = z0.05 = 1.645.

9-28

9.2-9.3 Hypothesis Test of the


Population Mean

Example (continue): The Critical Value


Approach
If

z falls in the rejection region, then the p-value


must be less than .
If z does not fall in the
rejection region, then the
p-value must be greater
than .

The

decision will be the same


for both approaches

9-29

9.2-9.3 Hypothesis Test of the


Population
Mean
The same approach may be used for t test statistic
but t-table does not provide you with many possible
t values.
You can either:

use Excel TDIST function to find corresponding


probability
or use an interval of possible probabilities for pvalue (see example on the next slide)

9-30

9.2-9.3 Hypothesis Test of the


Population Mean

Example 2: The p-value Approach


a
n 35, x 16.37, s 7.22
Step

1. H0: = 14, HA: 14

Step

2. Compute the value of the test statistic as:

t34

Step

x 0
s

16.37 14
7.22

35

1.94

3. Compute the p-value.

Since t34=1.94 > 0, the p-value for a two-tailed test is


2P(T34 > t34). Referencing the tdf table for df = 34, we find
that the exact probability P(T34 > 1.94) cannot be
determined.
9-31

9.2-9.3 Hypothesis Test of the


Population
Mean The p-value Approach
Example
2 (continue):
Step

3. Compute the p-value (continued).

Look up t34 = 1.94 in the t-table to find the p-value.

Note that t34 = 1.94 lies between 1.691 and 2.032.

Thus, 0.025 < P(T34 > 1.94) < 0.05.


However, because this is a two-tail test, we multiply by
two to get 0.05 < p-value < 0.10.

9-32

9.2-9.3 Hypothesis Test of the


Population
Mean
Example 2(continue): The p-value Approach
0.05

< p-value < 0.10


= 0.05.
Step 4. State the conclusion and interpret the
results.

Since the p-value satisfies 0.05 < p-value < 0.10, pvalue is greater than = 0.05.
Thus, we do not reject H0 and conclude that the mean
study time of students at the university is not statistically
different from todays national average of 14 hours per
week.

9-33

9.4 Hypothesis Testing for Population


Proportion

We can carry out hypothesis testing for


population proportion p the same way we do
it for population mean in case np > 5 and
n(1 - p) > 5 (normal distribution) :
H 0: p > p0

H 0: p < p0

H0: p = p0

H a : p < p0

H a : p > p0

H a : p p0

9-34

9.4 Hypothesis Test of the Population


Proportion

Test statistic P for the hypothesis test of the


population proportion p is assumed to follow
the z distribution:
where p x n
p p0
and p0 is the hypothesized
z
p0 1 p0 n
value of the population
proportion.

9-35

9.4 Hypothesis Test of the Population


Proportion
Example: The p-value approach
an

180, x 67, p0 0.4

Step

1. H0: p > 0.4, HA: p < 0.4

Step

2. Compute the value of the test statistic.

First verify that the sample is large enough:


np0 67 0.4 26.8 5

n(1 p0 ) 67 0.6 40.2 5

Compute the test statistic using p = 67/180 = 0.3722:

p p0

p0 1 p0 n

0.3722 0.4
0.4 1 0.4 180

0.76

9-36

9.4 Hypothesis Test of the Population


Proportion
Example (continue):
Step

4. State the conclusion and interpret the


results.
p-value = 0.2236 > = 0.10.
Do not reject H0: p > 0.4 and conclude
HA: p < 0.4.

Thus, the magazines claim that fewer than


40% of households in the United States have
changed their lifestyles because of escalating
gas prices is not justified by the sample data.

9-37

9.4 Hypothesis Test of the Population


Proportion
Example: The Critical Value Approach
an

180, x 67, p0 0.4

Step

1. H0: p > 0.4, HA: p < 0.4

Step

2. Compute the value of the test statistic.

First verify that the sample is large enough:


np0 67 0.4 26.8 5

n(1 p0 ) 67 0.6 40.2 5

Compute the test statistic using p = 67/180 = 0.3722:

p p0

p0 1 p0 n

0.3722 0.4
0.4 1 0.4 180

0.76

9-38

9.4 Hypothesis Test of the Population


Proportion
Example (continue): The Critical Value Approach

Step 3. Based on HA: p < 0.4, this is a left-tailed test


and the significance level = 0.10 the critical value is
-z =-1.28

Step 4. State the conclusion and interpret the results.


Do not reject H0: p > 0.4 as
z=-0.76 > -z =-1.28

Thus, the magazines claim that fewer than 40% of


households in the United States have changed
their lifestyles because of escalating gas prices is
not justified by the sample data.

9-39

You might also like