QMI Lecture 7
QMI Lecture 7
Introduction to Hypothesis
Testing
1
Statistical Inference
Hypothesis testing is the second form of statistical inference.
It also has greater applicability.
2
Nonstatistical Hypothesis Testing
A criminal trial is an example of hypothesis testing without
the statistics.
The jury does not know which hypothesis is true. They must make a
decision on the basis of evidence presented.
3
Nonstatistical Hypothesis Testing
In the language of statistics convicting the defendant is
called
4
Nonstatistical Hypothesis Testing
If the jury acquits it is stating that
5
Nonstatistical Hypothesis Testing
There are two possible errors.
6
Nonstatistical Hypothesis Testing
The probability of a Type I error is denoted as α (Greek
letter alpha). The probability of a type II error is β (Greek
letter beta).
7
Nonstatistical Hypothesis Testing
In our judicial system Type I errors are regarded as more
serious. We try to avoid convicting innocent people. We are
more willing to acquit guilty people.
8
Nonstatistical Hypothesis Testing
The critical concepts are theses:
1. There are two hypotheses, the null and the alternative
hypotheses.
2. The procedure begins with the assumption that the null
hypothesis is true.
3. The goal is to determine whether there is enough evidence
to infer that the alternative hypothesis is true.
4. There are two possible decisions:
Conclude that there is enough evidence to support the
alternative hypothesis.
Conclude that there is not enough evidence to support the
alternative hypothesis.
9
Nonstatistical Hypothesis Testing
5. Two possible errors can be made.
Type I error: Reject a true null hypothesis
Type II error: Do not reject a false null hypothesis.
P(Type I error) = α
P(Type II error) = β
10
Concepts of Hypothesis Testing (1)
There are two hypotheses. One is called the null hypothesis
and the other the alternative or research hypothesis. The
usual notation is:
pronounced
H “nought”
The null hypothesis (H0) will always state that the parameter
equals the value specified in the alternative hypothesis (H 1)
11
Concepts of Hypothesis Testing
Consider Example 10.1 (mean demand for computers during
assembly lead time) again. Rather than estimate the mean
demand, our operations manager wants to know whether the
mean is different from 350 units. We can rephrase this
request into a test of the hypothesis:
H0:µ = 350
12
Concepts of Hypothesis Testing (2)
The testing procedure begins with the assumption that the
null hypothesis is true.
13
Concepts of Hypothesis Testing (3)
The goal of the process is to determine whether there is
enough evidence to infer that the alternative hypothesis is
true.
H1:µ ≠ 350
14
Concepts of Hypothesis Testing (4)
There are two possible decisions that can be made:
16
Concepts of Hypothesis Testing
For example, if we’re trying to decide whether the mean is
not equal to 350, a large value of x (say, 600) would
provide enough evidence.
17
Concepts of Hypothesis Testing (5)
Two possible errors can be made in any test:
A Type I error occurs when we reject a true null hypothesis
and
A Type II error occurs when we don’t reject a false null
hypothesis.
18
Types of Errors
A Type I error occurs when we reject a true null hypothesis
(i.e. Reject H0 when it is TRUE)
H0 T F
Reject I
Reject II
20
Example 11.1 IDENTIFY
We know:
n = 400,
= 178, and
σ = 65
What to do next?!
22
Example 11.1 COMPUTE
23
COMPUTE
Example 11.1 Rejection region
It seems reasonable to reject the null hypothesis in favor of
the alternative if the value of the sample mean is large
relative to 170, that is if > .
α = P(Type I error)
α = P( > )
24
Example 11.1 COMPUTE
25
Example 11.1 COMPUTE
Since our sample mean (178) is greater than the critical value we
calculated (175.34), we reject the null hypothesis in favor of H1, i.e.
that: µ > 170 and that it is cost effective to install the new billing
system
26
Example 11.1 The Big Picture
H0: = 170
H1: > 170 =175.34
=178
Reject H0 in favor of
27
Standardized Test Statistic
An easier method is to use the standardized test statistic:
28
Example 11.1… The Big Picture Again
.05
0 Z
H0: = 170
H1: > 170
Z.05=1.645
z = 2.46
Reject H0 in favor of
29
p-Value of a Test
The p-value of a test is the probability of observing a test
statistic at least as extreme as the one computed given that
the null hypothesis is true.
p-value
30
P-Value of a Test
p-value = P(Z > 2.46)
p-value =.0069
z =2.46
31
Interpreting the p-value
The smaller the p-value, the more statistical evidence exists
to support the alternative hypothesis.
If the p-value is less than 1%, there is overwhelming
evidence that supports the alternative hypothesis.
If the p-value is between 1% and 5%, there is a strong
evidence that supports the alternative hypothesis.
If the p-value is between 5% and 10% there is a weak
evidence that supports the alternative hypothesis.
If the p-value exceeds 10%, there is no evidence that
supports the alternative hypothesis.
We observe a p-value of .0069, hence there is
overwhelming evidence to support H1: > 170.
32
Interpreting the p-value
Overwhelming Evidence
(Highly Significant)
Strong Evidence
(Significant)
Weak Evidence
(Not Significant)
No Evidence
(Not Significant)
p=.0069
33
Interpreting the p-value
Compare the p-value with the selected value of the
significance level:
34
Conclusions of a Test of Hypothesis
If we reject the null hypothesis, we conclude that there is
enough evidence to infer that the alternative hypothesis is
true.
35
One– and Two–Tail Testing
The department store example (Example 11.1) was a one tail
test, because the rejection region is located in only one tail of
the sampling distribution:
36
One– and Two–Tail Testing
The SSA Envelope example is a left tail test because the
rejection region was located in the left tail of the sampling
distribution.
37
Right-Tail Testing
38
Left-Tail Testing
39
Two–Tail Testing
Two tail testing is used when we want to test a research
hypothesis that a parameter is not equal (≠) to some value
40
Example 11.2
In recent years, a number of companies have been formed that
offer competition to AT&T in long-distance calls.
All advertise that their rates are lower than AT&T's, and as a
result their bills will be lower.
42
Example 11.2 IDENTIFY
H1: µ ≠ 17.09
H0: µ = 17.09
43
Example 11.2 IDENTIFY
-z.025 +z.025 z
0
45
Example 11.2 COMPUTE
We find that:
Since z = 1.19 is not greater than 1.96, nor less than –1.96
we cannot reject the null hypothesis in favor of H 1. That is
“there is insufficient evidence to infer that there is a
difference between the bills of AT&T and the competitor.”
46
Two-Tail Test p-value COMPUTE
47
Summary of One- and Two-Tail Tests…
48
Probability of a Type II Error –
It is important that we understand the relationship between
Type I and Type II errors; that is, how the probability of a
Type II error is calculated and its interpretation.
49
Probability of a Type II Error –
A Type II error occurs when a false null hypothesis is not
rejected.
50
Example 11.1 (revisited)…
Our original hypothesis…
51
Effects on of Changing
Decreasing the significance level , increases the value of
and vice versa.
52
Judging the Test…
A statistical test of hypothesis is effectively defined by the
significance level ( ) and the sample size (n), both of
which are selected by the statistics practitioner.
53
Judging the Test…
The power of a test is defined as 1– .
It represents the probability of rejecting the null
hypothesis when it is false.
54