Week 11-Fundamentals of Hypothesis Testing

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

Chapter 9 9-1

BEA674 Data and Business Decision Making


Chapter 9
Fundamentals of Hypothesis Testing:
One-Sample Tests
Chap 9-2
Learning Objectives
In this chapter, you learn:
The basic principles of hypothesis testing.
How to use hypothesis testing to test a mean or
proportion.
The assumptions of each hypothesis-testing
procedure, how to evaluate them, and the
consequences if they are seriously violated.
How to avoid the pitfalls involved in hypothesis
testing.
Pitfalls & ethical issues involved in hypothesis testing.
Copyright 2014 Pearson Education
Chap 9-3
What is a Hypothesis?
A hypothesis is a claim (assertion) about a
population parameter:

population mean.


population proportion.

Example: The mean monthly cell phone bill in this city is
= $42.
Example: The proportion of adults in this city with
cell phones is = 0.68.
Copyright 2014 Pearson Education
Chapter 9 9-2
Chap 9-4
The Null Hypothesis, H
0
States the claim or assertion to be tested.
Example: The mean diameter of a
manufactured bolt is 30mm ( )
Is always about a population parameter,
not about a sample statistic.
30 : H
0
=
30 : H
0
= 30 X : H
0
=
Copyright 2014 Pearson Education
Chap 9-5
The Null Hypothesis, H
0
Begin with the assumption that the null
hypothesis is true.
Similar to the notion of innocent until
proven guilty.

Refers to the status quo or historical value.
Always contains =, or , or sign.
May or may not be rejected.
Copyright 2014 Pearson Education
Chap 9-6
The Alternative Hypothesis, H
1
Is the opposite of the null hypothesis.
e.g., The average diameter of a manufactured
bolt is not equal to 30mm ( H
1
: 30 ).
Challenges the status quo.
Never contains the =, or , or sign.
May or may not be proven.
Is generally the hypothesis that the
researcher is trying to prove.
Copyright 2014 Pearson Education
Chapter 9 9-3
Chap 9-7
The Hypothesis Testing Process
Claim: The population mean age is 50.
H
0
: = 50 H
1
: 50
Sample the population and find sample mean.
Population
Sample
Copyright 2014 Pearson Education
Chap 9-8
The Hypothesis Testing Process
Suppose the sample mean age was X = 20.

This is significantly lower than the claimed mean
population age of 50.

If the null hypothesis were true, the probability of
getting such a different sample mean would be very
small, so you reject the null hypothesis.

In other words, getting a sample mean of 20 is so
unlikely if the population mean was 50, you conclude
that the population mean must not be 50.
Copyright 2014 Pearson Education
Chap 9-9
The Hypothesis Testing Process
Sampling
Distribution of X
= 50
If H
0
is true
If it is unlikely that you
would get a sample
mean of this value ...
... then you reject
the null hypothesis
that = 50.
20
... When in fact this were
the population mean
X
Copyright 2014 Pearson Education
Chapter 9 9-4
Chap 9-10
The Test Statistic and Critical Values
If the sample mean is close to the stated
population mean, the null hypothesis is not
rejected.

If the sample mean is far from the stated
population mean, the null hypothesis is rejected.

How far is far enough to reject H
0
?

The critical value of a test statistic creates a line in
the sand for decision making -- it answers the
question of how far is far enough.
Copyright 2014 Pearson Education
Chap 9-11
The Test Statistic and Critical Values
Critical Values

Too Far Away From Mean of Sampling Distribution
Sampling Distribution of the test statistic
Region of
Rejection
Region of
Rejection
Region of
Non-Rejection
Copyright 2014 Pearson Education
Chap 9-12
Possible Errors in Hypothesis Test
Decision Making
Type I Error:
Reject a true null hypothesis.
Considered a serious type of error.
The probability of a Type I Error is o.
Called level of significance of the test.
Set by researcher in advance.
Type II Error:
Failure to reject a false null hypothesis.
The probability of a Type II Error is .
Copyright 2014 Pearson Education
Chapter 9 9-5
Chap 9-13
Possible Errors in Hypothesis Test
Decision Making
Possible Hypothesis Test Outcomes
Actual Situation
Decision H
0
True H
0
False
Do Not
Reject H
0
No Error
Probability 1 -
Type II Error
Probability
Reject H
0
Type I Error
Probability
No Error
Power 1 -
Copyright 2014 Pearson Education
Chap 9-14
Possible Errors in Hypothesis Test
Decision Making
The confidence coefficient (1-) is the
probability of not rejecting H
0
when it is true.

The confidence level of a hypothesis test is
(1-)*100%.

The power of a statistical test (1-) is the
probability of rejecting H
0
when it is false.
Copyright 2014 Pearson Education
Chap 9-15
Type I & II Error Relationship
Type I and Type II errors cannot happen at
the same time.
A Type I error can only occur if H
0
is true.
A Type II error can only occur if H
0
is false.

If Type I error probability (o) , then
Type II error probability ()
Copyright 2014 Pearson Education
Chapter 9 9-6
Chap 9-16
Factors Affecting Type II Error
All else equal,
when the difference between
hypothesized parameter and its true value

when o
when
when n
Copyright 2014 Pearson Education
Chap 9-17
Hypothesis Tests for the Mean
o Known o Unknown
Hypothesis
Tests for
(Z test) (t test)
Copyright 2014 Pearson Education
Chap 9-18
Z Test of Hypothesis for the Mean
( Known)
Convert sample statistic ( ) to a Z
STAT
test statistic.


X
The test statistic is:
n

X
Z
STAT

=
Known Unknown
Hypothesis
Tests for
o Known o Unknown
(Z test) (t test)
Copyright 2014 Pearson Education
Critical value approach
p-value approach
Chapter 9 9-7
Chap 9-19
6 Steps in Hypothesis Testing
1. State the null hypothesis, H
0
and the
alternative hypothesis, H
1.
2. Choose the level of significance, o, and the
sample size, n.
3. Determine the appropriate test statistic and
sampling distribution.
4. Determine the critical values that divide the
rejection and non-rejection regions.
Copyright 2014 Pearson Education
Chap 9-20
6 Steps in Hypothesis Testing (continued)
5. Collect data and compute the value of the test
statistic.
6. Make the statistical decision and state the
managerial conclusion.
If the test statistic falls into the non-rejection region, do not
reject the null hypothesis H
0
.
If the test statistic falls into the rejection region, reject the
null hypothesis. Express the managerial conclusion in the
context of the problem
Copyright 2014 Pearson Education
Chap 9-21
Hypothesis Testing
Example: Test the claim that the true mean diameter of a
manufactured bolt is 30mm. (Assume = 0.8)
1. State the appropriate null and alternative hypotheses
H
0
: = 30 H
1
: 30 (This is a two-tail test.)

2. Specify the desired level of significance and the sample
size.
Suppose that o = 0.05 and n = 100 are chosen for this
test.
Copyright 2014 Pearson Education
Chapter 9 9-8
Chap 9-22
2.0
0.08
.16
100
0.8
30 29.84
n

X
Z
STAT
=

=
Hypothesis Testing (continued)
3. Determine the appropriate technique:
is assumed known so this is a Z test.
4. Determine the critical values:
For o = 0.05 the critical Z values are 1.96
5. Collect the data and compute the test statistic.
Suppose the sample results are:
n = 100, X = 29.84 ( = 0.8 is assumed known)
So the test statistic is:
Copyright 2014 Pearson Education
Chap 9-23
Reject H
0
Do not reject H
0
6. Is the test statistic in the rejection region?
o/2 = 0.025
-Z
/2
= -1.96 0

Reject H
0
if
Z
STAT
< -1.96 or
Z
STAT
> 1.96;
otherwise do
not reject H
0.
Hypothesis Testing (continued)
o/2 = 0.025
Reject H
0
+Z
/2
= +1.96
Here, Z
STAT
= -2.0 < -1.96, so the
test statistic is in the rejection
region.

Copyright 2014 Pearson Education
Chap 9-24
6 (continued) - Reach a decision and interpret the result.
-2.0
Since Z
STAT
= -2.0 < -1.96, reject the null hypothesis
and conclude there is sufficient evidence that the mean
diameter of a manufactured bolt is not equal to 30.
Hypothesis Testing
Reject H
0
Do not reject H
0
o = 0.05/2
-Z
/2
= -1.96 0

o = 0.05/2
Reject H
0
+Z
/2
= +1.96
Copyright 2014 Pearson Education
Chapter 9 9-9
Chap 9-25
p-Value Approach to Hypothesis Testing
p-value: Probability of obtaining a test
statistic equal to or more extreme than the
observed sample value given H
0
is true.
The p-value is also called the observed level of
significance.
It is the smallest value of o for which H
0
can be
rejected.
Copyright 2014 Pearson Education
Chap 9-26
p-Value Approach to Testing:
Interpreting the p-value
Compare the p-value with o.
If p-value < o , reject H
0
.
If p-value > o , do not reject H
0
.


Remember:
If the p-value is low, then H
0
must go.
Copyright 2014 Pearson Education
Chap 9-27
The 5 Step p-value approach to
Hypothesis Testing
1. State the null hypothesis, H
0
and the alternative
hypothesis, H
1
.


2. Choose the level of significance, o, and the sample size, n.

3. Determine the appropriate test statistic and sampling
distribution.

4. Collect data and compute the value of the test statistic and
the p-value.

5. Make the statistical decision and state the managerial
conclusion.
If the p-value is < then reject H0, otherwise do not reject H0. State the
managerial conclusion in the context of the problem.
Copyright 2014 Pearson Education
Chapter 9 9-10
Chap 9-28
p-value Hypothesis Testing
Example: Test the claim that the true mean diameter
of a manufactured bolt is 30mm. (Assume = 0.8)
1. State the appropriate null and alternative hypotheses:
H
0
: = 30 H
1
: 30 (This is a two-tail test.)

2. Specify the desired level of significance and the
sample size.
Suppose that o = 0.05 and n = 100 are chosen for
this test.
Copyright 2014 Pearson Education
Chap 9-29
2.0
0.08
.16 0
100
0.8
30 29.84
n

X
Z
STAT
=

=
p-value Hypothesis Testing (continued)
3. Determine the appropriate technique.
is assumed known so this is a Z test.
4. Collect the data, compute the test statistic and the
p-value.
Suppose the sample results are:
n = 100, X = 29.84 ( = 0.8 is assumed known)
So the test statistic is:
Copyright 2014 Pearson Education
Chap 9-30
5. Is the p-value < ?
Need to find the probability that the Z test stats. value is greater
than +2 along with the probability that the Z test value is less
than -2 .

Since p-value = 0.0456 < = 0.05 *Reject H
0 .
State the managerial conclusion in the context of the
situation.
There is sufficient evidence to conclude the average
diameter of a manufactured bolt is not equal to 30mm.
p-value Hypothesis Testing (continued)
Copyright 2014 Pearson Education
[From Table E.2: [- 2 =0.028] P-value =0.028+0.028=0.0456
Chapter 9 9-11
Connection Between Two Tail Tests and
Confidence Intervals
For X = 29.84, = 0.8 and n = 100, the 95%
confidence interval is:



29.6832 29.9968

Since this interval does not contain the hypothesized
mean (30), we reject the null hypothesis at o = 0.05
100
0.8
(1.96) 29.84 to
100
0.8
(1.96) - 29.84 +
Copyright 2014 Pearson Education
n

/2
Z X

Chap 9-32
Do You Ever Truly Know ?
Probably not!

In virtually all real world business situations, is not
known.

If there is a situation where is known then is also
known (since to calculate you need to know .)

If you truly know there would be no need to gather a
sample to estimate it.

Copyright 2014 Pearson Education
Chap 9-33
Hypothesis Testing: Unknown
If the population standard deviation is unknown, you
instead use the sample standard deviation S.

Because of this change, you use the t-distribution instead
of the Z distribution to test the null hypothesis about the
mean.

When using the t-distribution you must assume the
population you are sampling from follows a normal
distribution.

All other steps, concepts, and conclusions are the same.
Copyright 2014 Pearson Education
Chapter 9 9-12
Chap 9-34
t-Test of Hypothesis for the Mean:
Unknown
The test statistic is:
Hypothesis
Tests for
Known Unknown o Known o Unknown
(Z test) (t test)
Convert sample statistic ( ) to a t
STAT
test
statistic.


The test statistic is:
Hypothesis
Tests for
Known Unknown o Known o Unknown
(Z test) (t test)
X
The test statistic is:
n
S
X
t
STAT

=
Hypothesis
Tests for
Known Unknown o Known o Unknown
(Z test) (t test)
Copyright 2014 Pearson Education
Critical value approach.
Chap 9-35
Two-Tail Test: o Unknown
Example: The average cost of a
hotel room in New York is said to
be $168 per night. To determine
if this is true, a random sample of
25 hotels is taken and resulted in
an X of $172.50 and an S of
$15.40. Test the appropriate
hypotheses at o = 0.05.

(Assume the population distribution is normal)
H
0
: = 168
H
1
: = 168
Copyright 2014 Pearson Education
Chap 9-36
o = 0.05
n = 25, df = 25-1=24
o is unknown, so
use a t-statistic
Critical Value:
t
24,0.025
= 2.0639 Do not reject H
0
: insufficient evidence that true
mean cost is different from $168.
Reject H
0
Reject H
0
o/2=.025
-t
24,0.025
Do not reject H
0
0

o/2=.025
-2.0639
2.0639
1.46
25
15.40
168 172.50
n
S
X
STAT
t =

=
1.46
Solutions:
H
0
: = 168
H
1
: = 168
t
24,0.025
Copyright 2014 Pearson Education
Two-Tail Test: o Unknown (continued)
Chapter 9 9-13
Connection of Two Tail Tests to
Confidence Intervals
For X = 172.5, S = 15.40 and n = 25, the 95%
confidence interval for is:

172.5 - (2.0639) 15.4/ 25 to 172.5 + (2.0639) 15.4/ 25

166.14 178.86

Since this interval contains the Hypothesized mean (168),
we do not reject the null hypothesis at o = 0.05.
Copyright 2014 Pearson Education
n
S
t X
2 /

Chap 9-38
One-Tail Tests
In many cases, the alternative hypothesis
focuses on a particular direction.
H
0
: 3
H
1
: < 3
H
0
: 3
H
1
: > 3
This is a lower-tail test since the
alternative hypothesis is focused on
the lower tail below the mean of 3.
This is an upper-tail test since the
alternative hypothesis is focused on
the upper tail above the mean of 3.
Copyright 2014 Pearson Education
Chap 9-39
Reject H
0
Do not reject H
0
There is only one
critical value, since
the rejection area is
in only one tail.
Lower-Tail Tests
o
-Z

or -t

0


H
0
: 3
H
1
: < 3
Z or t

X

Critical value
Copyright 2014 Pearson Education
Chapter 9 9-14
Chap 9-40
Reject H
0
Do not reject H
0
Upper-Tail Tests
o
Z

or t
0


H
0
: 3
H
1
: > 3
There is only one
critical value, since
the rejection area is
in only one tail.
Critical value
Z or t

X

_

Copyright 2014 Pearson Education
Chap 9-41
Upper-Tail t-Test for Mean: o unknown
Example: A phone industry manager thinks
that customer monthly cell phone bills have
increased, and now average over $52 per
month. The company wishes to test this
claim. (Assume a normal population)
H
0
: 52 the average is not over $52 per month.
H
1
: > 52 the average is greater than $52 per month
(i.e., sufficient evidence exists to support the
managers claim).
Form hypothesis test:
Copyright 2014 Pearson Education
Chap 9-42
Reject H
0
Do not reject H
0
Suppose that o = 0.10 is chosen for this test and
n = 25.
Find the rejection region:
o = 0.10
1.318
0

Reject H
0
Reject H
0
if t
STAT
> 1.318
Copyright 2014 Pearson Education
Upper-Tail t-Test for Mean: o unknown
Chapter 9 9-15
Chap 9-43
Obtain sample and compute the test statistic.

Suppose a sample is taken with the following
results: n = 25, X = 53.1, and S = 10
Then the test statistic is:
0.55
25
10
52 53.1
n
S
X
t
STAT
=

=
Copyright 2014 Pearson Education
Upper-Tail t-Test for Mean: o unknown
Chap 9-44
Reject H
0
Do not reject H
0
o = 0.10
1.318
0

Reject H
0
Do not reject H
0
since t
STAT
= 0.55 1.318
there is not sufficient evidence that the
mean bill is over $52.
t
STAT
= 0.55
Reach a decision and interpret the result:
Copyright 2014 Pearson Education
Upper-Tail t-Test for Mean: o unknown
Chap 9-45
Hypothesis Tests for Proportions
Involves categorical variables.
Two possible outcomes:
Possesses characteristic of interest.
Does not possess characteristic of interest.
Fraction or proportion of the population in the
category of interest is denoted by .
Copyright 2014 Pearson Education
Chapter 9 9-16
Chap 9-46
Sample proportion in the category of interest is
denoted by p.




When both n and n(1-) are at least 5, p can
be approximated by a normal distribution with
mean and standard deviation.

size sample
sample in interest of category in number
n
X
p = =
t = p
n
) (1

t t
=
p
Copyright 2014 Pearson Education
Hypothesis Tests for Proportions
Chap 9-47
The sampling
distribution of p is
approximately
normal, so the test
statistic is a Z
STAT

value:
Hypothesis Tests for Proportions
n
) (1
p
Z
STAT

=
n > 5
and
n(1-) > 5
Hypothesis
Tests for p
n < 5
or
n(1-) < 5
Not discussed
in this chapter
Copyright 2014 Pearson Education
Critical value approach
Chap 9-48
Z-Test for Proportion
Example: A marketing
company claims that it
receives 8% responses
from its mailing. To test
this claim, a random
sample of 500 were
surveyed with 25
responses. Test at the o
= 0.05 significance level.
Check:
n = (500)(.08) = 40
n(1-) = (500)(.92) = 460


Copyright 2014 Pearson Education
Chapter 9 9-17
Chap 9-49
Z-Test for Proportion: Solution
o = 0.05
n = 500, p = 0.05
Reject H
0
at o = 0.05
H
0
: = 0.08
H
1
: = 0.08
Critical Values: 1.96
Test Statistic:
Decision:
Conclusion:
z
0
Reject Reject
.025 .025
1.96
-2.47
There is sufficient evidence
to reject the companys
claim of 8% response rate.
2.47
500
.08) .08(1
.08 .05
n
) (1
p
STAT
Z =

=


-1.96
Copyright 2014 Pearson Education
Chap 9-50
Do not reject H
0
Reject H
0
Reject H
0
o/2 = .025
1.96
0

Z = -2.47
Calculate the p-value and compare to o
(For a two-tail test the p-value is always two-tail)
0.0136 2(0.0068)
2.47) P(Z 2.47) P(Z
= =
> + s
p-value = 0.0136:
p-Value approach: Solution
Reject H
0
since p-value = 0.0136 < o = 0.05
Z = 2.47
-1.96
o/2 = .025
0.0068 0.0068
Copyright 2014 Pearson Education
Chap 9-51
Questions To Address In The
Planning Stage
What is the goal of the survey, study, or experiment?
How can you translate this goal into a null and an alternative hypothesis?
Is the hypothesis test one or two tailed?
Can a random sample be selected?
What types of data will be collected? Numerical? Categorical?
What level of significance should be used?
Is the intended sample size large enough to achieve the desired power?
What statistical test procedure should be used?
What conclusions & interpretations can you reach from the results of the
planned hypothesis test?

Failing to consider these questions can lead to bias or
incomplete results.
Copyright 2014 Pearson Education
Chapter 9 9-18
Statistical Significance vs Practical
Significance
Statistically significant results (rejecting the null
hypothesis) are not always of practical
significance.
This is more likely to happen when the sample size
gets very large.
Practically significant results might be found to
be statistically insignificant (failing to reject the
null hypothesis).
This is more likely to happen when the sample size is
relatively small.
Copyright 2014 Pearson Education
Chap 9-52
Reporting Findings & Ethical Issues
Should document & report both good & bad results.
Should not only report statistically significant results.
Reports should distinguish between poor research
methodology and unethical behavior.
Ethical issues can arise in:
The use of human subjects.
The data collection method.
The type of test being used.
The level of significance being used.
The cleansing and discarding of data.
The failure to report pertinent findings.
Chap 9-53
Copyright 2014 Pearson Education
Chap 9-54
Chapter Summary
In this chapter we discussed:
Hypothesis testing methodology.
Performing a Z Test for the mean ( known).
Critical value and pvalue approaches to hypothesis
testing.
Performing one-tail and two-tail tests.
Performing a t test for the mean ( unknown).
Performing a Z -test for the proportion.
Statistical and practical significance.
Pitfalls and ethical issues.

[** Note: Power of a hypothesis test (online topic) Not covered]
Copyright 2014 Pearson Education

You might also like