Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Hypothesis Testing
Objectives of this module
• To introduce a range of hypothesis tests suitable
for testing for differences between averages.
• Specifically:
• 1 Sample t-test
• 2 Sample t-test
• Paired t-test
• ANOVA
Tools for Verifying the Causes
Increasing complexity
Dotplot relationships
of relationship
Determine strength
Hypothesis Tests Correlation
of relationships
Quantify
ANOVA Regression relationships
1
Determine 1 Sample t - Test
YES
the Number
of Samples
Are the 2
Samples 2 Sample t - Test
normally
distributed 2 Paired t - Test
3+
One-way Anova
Transform the
NO Data
using Box-Cox
Compare
NO Median
Values
To compare the Medians of samples of data
Determine
YES the Number
of Samples
Are the
Samples Use the
normally Transform the
Data YES Mood’s
distributed NO using Box-Cox
Median
Test
P--value
• Tail area
• Area under curve beyond value of interest
• Probability of being at value of interest or
beyond
-4 -3 -2 -1 0 1 2 3 4 -4 -3 -2 -1 0 1 2 3 4 -4 -3 -2 -1 0 1 2 3 4
Supplier B Variation in
process output
Process YB
Improve: Have We Made a Difference?
Old Process
CHANGE
Yold
Sample yold and sold
Is there a difference?
Sample ynew and snew
Variation in
process output
20
20
Frequency
Frequency
10 10
0 0
10 11 12 13 14 15 16 17 18 19 20 10 11 12 13 14 15 16 17 18 19
Yold Ynew
Old New
sample sample
Distribution of
sample means -
100%
99.73%
95.45%
68.26%
-∞ +∞
-3σx -2σx-1σx 1σx 2σx 3σx Theoretically the
Mean µx
limits are±∞
We cannot be 100% certain that an actual sample mean
falls outside the distribution. There is always an
element of risk
95% Confidence
Mean µx
Risk
The risk of making this error The risk of making this error
Is called the α-risk is called the β-risk
95%
Mean µx
Type I and II errors
• Type I - Deciding they are different when they are not
• Type II - Not detecting a difference when there is one
• More Later
Hypothesis Tests
For example
H1: µ1 < µ2
or The choice depends
H1: µ1 > µ2 upon the problem
Minitab gives the
or option to select
these
H1: µ1 ≠ µ2
3. Determine Tests
t-test
Paired t-test Regression
ANOVA
Y
(Proportions)
Discrete
Logistic
Chi-Square
regression
4. State level of Risk
• Minitab Rules!
8. Acceptance or Rejection
• Method 1
if the p-value is > or = to α - fail to reject H0
if the p-value is < α - reject H0 and accept H1
• Method 2
if “0” falls within the confidence interval - fail to reject H0
if “0” falls outside the confidence interval - reject H0 and
accept H1
1
Determine 1 Sample t - Test
YES
the Number
of Samples
Are the 2
Samples 2 Sample t - Test
normally
distributed 2 Paired t - Test
3+
One-way Anova
Transform the
NO Data
using Box-Cox
Compare
NO Median
Values
1 Sample t-test (1)
16.5
average invoice time
16
New process for the new process is
14 lower (quicker) than
12 the historical average
10
of 16.5
1 Sample t-test (3)
• A 1 Sample t-test can be used to test if the difference
between the averages is statistically significant.
The p-value for the Since the p-value for this test is less
1 sample t-test is than 0.05, we can be 95% confident
found in the session that there is a difference between the
window output. In average invoicing time of the new
this case, the p-value process versus the historical average.
is 0.040 We reject the Null Hypothesis
1 Sample t-tests (7)
Histogram of New Process Individual Value Plot of New Process
(with Ho and 95% t-confidence interval for the mean) (with Ho and 95% t-confidence interval for the mean)
3
Frequency
_
1 X
Ho
0 _
X
Ho
10 12 14 16 18 20 22 10 12 14 16 18 20 22
New Process New Process
1
Determine 1 Sample t - Test
YES
the Number
of Samples
Are the 2
Samples 2 Sample t - Test
normally
distributed 2 Paired t - Test
3+
One-way Anova
Transform the
NO Data
using Box-Cox
Compare
NO Median
Values
The concept of Two Sample t-tests
40.0
The Box Plot suggests
37.5
that the average cycle
time for the new
Time (days)
35.0
New Old
Process
2 Sample t-tests (3)
• A 2 Sample t-test can be used to test if the
difference between the average cycle times is
statistically significant.
• The hypotheses for the test would be:
• Ho: There is no difference between the average cycle
times for the new and old processes.
• Ha: The new cycle time is lower than the cycle times for
the old processes.
• Because our theory is that the new is lower, we
expect to reject the Null hypothesis.
2 Sample t-tests (4)
MINITAB: Stat > Basic Statistics > 2-Sample t
The p-value for the 2 sample Since the p-value for this test
t-test is found in the session is less than 0.05, we can be
window output. In this case, over 95% confident that there
the p-value is 0.015. is a difference between the
average cycle times.
2 Sample t-tests (7)
Boxplot of Time (days) by Process Individual Value Plot of Time (days) vs Process
42.5 42.5
40.0 40.0
37.5 37.5
Time (days)
Time (days)
35.0 35.0
32.5 32.5
30.0 30.0
27.5 27.5
25.0 25.0
1
Determine 1 Sample t - Test
YES
the Number
of Samples
Are the 2
Samples 2 Sample t - Test
normally
distributed 2 Paired t - Test
3+
One-way Anova
Transform the
NO Data
using Box-Cox
Compare
NO Median
Values