CHAPTER 8 :
HYPOTHESIS TESTING
NOTE : TWO SAMPLE TEST
Hypothesis Test
1 Sample 2 Samples
Z-Table T-Table Independent Dependent
(n< 30 or more)
Equal Variance Nonequal Variance
HYPOTHESIS TESTS ABOUT μ: σ KNOWN
HYPOTHESIS TESTS ABOUT μ: σ NOT KNOWN
What are the Assumptions?
Six Steps of Write the distribution, if any.
Hypothesis State the
Ho and Ha
testing
Identify: 1 or 2 tailed test
[Link]
α=?
Get the value from the table
[Link]
Calculate the Statistical Test
Show all the values in the Normal
curve
Make Decision:
Reject or Accept H0
Signs in H0 and H1 and Tails of a Test
Example1
At Canon Food Corporation, it used to take an average of 90 minutes for new
workers to learn a food processing job. Recently the company installed a new
food processing machine. The supervisor at the company wants to find if the
mean time taken by new workers to learn the food processing procedure on this
new machine is different from 90 minutes. A sample of 20 workers showed that
it took, on average, 85 minutes for them to learn the food processing procedure
on the new machine. It is known that the learning times for all new workers are
normally distributed with a population standard deviation of 7 minutes. Find the
p–value for the test that the mean learning time for the food processing
procedure on the new machine is different from 90 minutes. What will your
conclusion be if α = 0.01?
Solution: H0: μ = 90 H1: μ ≠ 90 (2 tail test)
7
x = = = 1.56524758 min utes
n 20
x − 85 − 90
z= = = −3.19
x 1.56524758
p-value = 2(.0007) = 0.0014
Because α = 0.01 is
greater than the p-value
of 0.0014, we reject the
null hypothesis at this
significance level.
Therefore, we conclude
that the mean time for
learning the food
processing procedure on
the new machine is
different from 90 minutes.
Example 2
The management of Priority Health Club claims that its
members lose an average of 10 pounds or more within the
first month after joining the club. A consumer agency that
wanted to check this claim took a random sample of 36
members of this health club and found that they lost an
average of 9.2 pounds within the first month of membership
with a standard deviation of 2.4 pounds. Find the p–value for
this test. What will you decision be if α = .01? What if α =
0.05?
▪Step 1: The population standard deviation σ is
known, the sample size is large (n > 30). Due to
the Central Limit Theorem, we will use the
normal distribution to find the p–value and
perform the test.
▪Step 2: H0: μ ≥ 10 H1: μ < 10
▪Step 3: 2.4
x = = = .40
n 36
x − 9.2 − 10
z= = = −2.00 p-value = 0.0228
x .40
What is Independent and
Dependent Sample??
Independent Samples
Suppose we want to estimate the difference between
the mean salaries of all male and all female
executives. To do so, we draw two samples, one from
the population of male executives and another from
the population of female executives.
Dependent/ matched/ paired samples
Suppose we want to estimate the difference between
the mean weights of all participants before and after a
weight loss program. To accomplish this, suppose we
take a sample of 28 participants and measure their
weights before and after the completion of this program.
Note that these two samples include the same 28
participants.
Method Determine Equal
Variance
𝑠 2 𝑙𝑎𝑟𝑔𝑒𝑟 𝑉𝑎𝑙𝑢𝑒
➢F-Table : < 𝐹 𝑇𝑎𝑏𝑙𝑒 than
𝑠 2 𝑠𝑚𝑎𝑙𝑙𝑒𝑟 𝑣𝑎𝑙𝑢𝑒
equal variance
➢Levene’s Test: if greater than 𝛼, equal variance
Hypothesis:
Levene's test t-test 2 Independent
2 2 H0 :𝜇1 = 𝜇2
H0 :𝜇1 = 𝜇2
2 2
Ha:𝜇1 ≠ 𝜇2 Ha: 𝜇1 ≠ 𝜇2
17
Check the Equality of Variances
[Link] Levene’s Test
[Link] to be tested:
H0: Variance 1 = Variance 2
Ha: Variance 1 ≠ Variance 2
or
H0: 𝜎12 = 𝜎22
Ha: 𝜎12 ≠ 𝜎22
Look for the significant value (sig. val)
3. If the [Link] < α (e. 0.05), then Reject H0.
Inferences About The Difference Between Two Population
Means For Large And Independent Sample
Interval estimation
An interval that constructed around the point
estimate which is likely to contain the
corresponding population parameter.
Interval estimation of µ1– µ2
The (1 – α) 100% confidence interval for µ1– µ2
is
2 Independent Sample Distribution T-Test
𝒏𝟏 − 𝟏 𝒔𝟏 𝟐 + 𝒏𝟐 − 𝟏 𝒔𝟐 𝟐
𝑺𝒑 =
𝒏𝟏 + 𝒏𝟐 − 𝟐
Item Equal Standard Deviation Unequal Standard
Deviation
T-Test 𝑥1ҧ − 𝑥ҧ2 − 𝜇1 − 𝜇2 𝑥1ҧ − 𝑥ҧ2 − 𝜇1 − 𝜇2
𝑡= 𝑡=
1 1
𝑠𝑝2 + 𝑠12 𝑠22
𝑛1 𝑛2 +
𝑛1 𝑛2
Two-Sample t-Test for the Difference Between Means -
Independent Samples (1 or 2 unknown)
In Words In Symbols
1. State the claim mathematically. Identify the State H0 and Ha.
null and alternative hypotheses.
2. Specify the level of significance. Identify .
3. Identify the degrees of freedom and sketch d.f. = n1+ n2 – 2 or
the sampling distribution. d.f. = smaller of n1 – 1 or n2 – 1.
4. Determine the critical value(s). Use Table 5 in Appendix B.
5. Determine the rejection region(s).
t=
( x1 − x2) − (1 − 2)
6. Find the standardized test statistic. x −x
1 2
7. Make a decision to reject or fail to reject If t is in the rejection region,
the null hypothesis and interpret the reject H0. Otherwise, fail to
decision in the context of the original claim reject H0.
2 SAMPLE EQUAL
VARIANCE INDEPENDENT
SAMPLE
A manufacturer claims that the calling range (in feet) of its 2.4-GHz cordless telephone is greater
than that of its leading competitor. You perform a study using 14 randomly selected phones from
the manufacturer and 16 randomly selected similar phones from its competitor. The results are
shown below. At α = 0.05, can you support the manufacturer’s claim? Assume the populations
are normally distributed and the population variances are equal.
H 0 = μ1 ≤ μ2 Manufacturer (1) Competition (2)
Ha = μ1 > μ2 (Claim)
= .05 x1 = 1275ft x2 = 1250ft
d.f. = 14 + 16 – 2 = 28 s1 = 45 ft s2 = 30 ft
n1 = 14 n2 = 16
0.05 𝑆𝑝 ⋅
1
+
1
=
𝑛1 − 1 𝑠1 2 + 𝑛2 − 1 𝑠2 2
⋅
1
+
1
𝑛1 𝑛2 𝑛1 + 𝑛2 − 2 𝑛1 𝑛2
1.701 t 14 − 1 45 2 + 16 − 1 30 2 1 1
0 =
14 + 16 − 2
⋅ +
14 16
≈ 13.8018
Decision: Reject H0
At 5% level of significance there is enough ( x1 − x2 ) − ( 1 − 2 ) (1275 − 1250 ) − 0
t= = 1.811
evidence to support the manufacturer’s claim. x −x
1 2
13.8018
EXERCISE
2 SAMPLE NON EQUAL
VARIANCE INDEPENDENT
SAMPLE
The braking distances of 8 Volkswagen GTIs and 10 Ford Focuses were
tested when traveling at 60 miles per hour on dry pavement. The results are
shown below. Can you conclude that there is a difference in the mean braking
distances of the two types of cars? Use α = 0.01. Assume the populations are
normally distributed and the population variances are not equal. (Consumer
Reports)
GTI (1) Focus (2) • H0: μ1 = μ2
x1 = 134ft x2 = 143ft • Ha: μ1 ≠ μ2 0.005 0.005
s1 = 6.9 ft s2 = 2.6 ft • = 0.01
t
• d.f. = 9 (see next page) -3.250 0 3.250
n1 = 8 n2 = 10
• Decision:
(134 − 143) − 0
t= = −3.496 At the 1% level of significance, there is enough
2 2
6.9 2.6 evidence to conclude that the mean braking distances
+ of the cars are different. Reject H0
8 10
2 2 2
𝑠1 𝑠2 2 2 2
+ 6.9 2.6
𝑛1 𝑛2 + 5.95125+0.676 2
8 10
𝑑𝑓 = 2 2 2 2 = 2 2 = 5.95125 2 0.676 2
𝑠1 𝑠2 6.92 2.62 +
𝑛1 𝑛2 8 10 8−1 10−1
+ +
8−1 10−1
𝑛1 −1 𝑛2 −1
43.9204426
= = 8.59432523 ≈ 9
5.05962523 + 0.0507751111
2 SAMPLE
DEPENDENT SAMPLE
t-Test for the Difference Between Means
(Paired Data/Dependent Samples)
To perform a two-sample hypothesis test with dependent samples, the difference between each data
pair is first found:
◦ d = x1 – x2 Difference between entries for a data pair
• The test statistic is the mean d of these differences.
▪ d = d Mean of the differences between paired data
n
entries in the dependent samples
Three conditions are required to conduct the test.
1. The samples must be randomly selected.
2. The samples must be dependent (paired). -t0 μd t0
d
3. Both populations must be normally distributed.
If these conditions are met, then the sampling distribution for is
approximated by a t-distribution with n – 1 degrees of freedom, where n is
the number of data pairs.
Symbols used for the t-Test for μd
t-Test for the Difference Between Means
(Dependent Samples)
In Words In Symbols
1. State the claim mathematically.
Identify the null and alternative hypotheses. State H0 and Ha.
2. Specify the level of significance. Identify .
3. Identify the degrees of freedom and sketch the d.f. = n – 1
sampling distribution.
Use t-Table
4. Determine critical value(s) & rejection region If n > 29 use the last row (∞) .
(d )
2
5. Calculate d and sd . Use a table. d −
d = d
2
(d − d )
2
sd = = n
n n −1 n −1
d − d
6. Find the standardized test statistic. t=
sd n
7. Make a decision to reject or fail to reject the If t is in the rejection region, reject
null hypothesis and interpret the decision in H0. Otherwise, fail to reject H0.
the context of the original claim.
A golf club manufacturer claims that golfers can lower their scores by using the manufacturer’s newly
designed golf clubs. Eight golfers are randomly selected, and each is asked to give his or her most recent
score. After using the new clubs for one month, the golfers are again asked to give their most recent score.
The scores for each golfer are shown in the table. Assuming the golf scores are normally distributed, is
there enough evidence to support the manufacturer’s claim at α = 0.10?
Golfer 1 2 3 4 5 6 7 8
Score (old) 89 84 96 82 74 92 85 91
Score (new) 83 83 92 84 76 91 80 91
d = (old score) – (new score) d − d 1.625 − 0
t= 1.498
• H0: μd ≤ 0 sd n 3.0677 8
Decision: Reject H0
• Ha: μd > 0
At the 10% level of significance, the results of
• = 0.10 Rejection
Region this test indicate that after the golfers used the
• d.f. = 8 – 1 = 7 new clubs, their scores were significantly lower.
0.10
0 1.415 t
Larson/Farber 4th ed d & Sd calculations on next slide
d = (old score) – (new score)
d = d = 13 = 1.625
Old New d d2
89 83 6 36 n 8
84 83 1 1
2 (d )
96 92 4 16 2
d −
82 84 –2 4 sd = n
74 76 –2 4
n −1
2
92 91 1 1 (13)
87 −
85 80 5 25 = 8
8 −1
91 91 0 0
3.0677
Σ = 13 Σ = 87
2 Dependent Sample Distribution T-Test
➢Mean :d = d and d = d
n
sd
➢Standard Deviation of paired differences: sd =
n
➢Confidence Interval : d ts
d
➢df = n-1
Hypothesis:
t-test 2 Independent
Levene's test H0 :𝜇1 = 𝜇2 and Ha: 𝜇1 ≠ 𝜇2
2 2 or
H0 :𝜇1 = 𝜇2 H0 :𝜇1 ≤ 𝜇2 and Ha: 𝜇1 > 𝜇2
2 2 or
Ha:𝜇1 ≠ 𝜇2 H0 :𝜇1 ≥ 𝜇2 and Ha: 𝜇1 < 𝜇2
Example 2
A medical researcher wanted to investigate whether a new
drug is effective in reducing blood pressure (bp).
Before 70 80 72 76 76 76 72 78 82 64 74 92 74 68 84
After 68 72 62 70 58 66 68 52 64 72 74 60 74 72 74
Is there sufficient evidence to support the claim that the
new drug is effective in lowering blood pressure? Use a 0.05
significance level.
Example 3:
Quick weight loss center claim that their diet plan can help to
reduce 5 to 10 kilograms in 12 weeks. Seven dieters were
randomly selected from the diet program and their weight
before and after the program were as follows:
a. Construct a 95% confidence interval
b. Using the 1% of significance level, was there a significant
change as the weight centre claimed?
Solution :
d=
d
=
35
= 5.00
n 7
d 2
−
( d ) 2
873 −
(35) 2
sd = n = 7 = 10.78579312
n −1 7 −1
sd 10.78579312
sd = = = 4.07664661
n 7
Area in each tail = /2 = .5 − (.95 / 2) = .025
df = n − 1 = 7 − 1 = 6
t = 2.447
d tsd = 5.00 2.447(4.07664661) = 5.00 9.98
= −4.98 to 14.98