Unit 4B - 2 - STUDENTS - Hypotheses Testing For Two Populations
Unit 4B - 2 - STUDENTS - Hypotheses Testing For Two Populations
difference between
two population parameters:
Unit 4B-2
SECTION K: Chapter 65 of John Bird textbook
T MOTSIMA : 2023
PowePoint slides from Lombard C, van der Merwe L, Kele T & Mouton A also used
1
At the end of the chapter you will be able:
2
• Hypothesis tests for comparing two
Populations
1. Difference between two population means
• Independent samples
– Large samples
– Small samples
• Dependent, related or paired samples
2. Difference between two proportions
3. Ratio between two variances
3
Difference between two Population Means,
independent samples, n1 ≥ 30 and n2 ≥ 30
Two samples are independent if the selection of sample data from one
population is completely unrelated to the selection of sample data from
the other population
In medical experiments, a sample of subjects is randomly divided into
two groups. One group is given a specific treatment and the other
group is given a placebo.
Independent samples - subjects randomly assigned
Group A : receives treatment
Group B: receives a placebo
4
A placebo is a medically ineffectual treatment for a disease, it contains no medication.
Difference between two Population Means,
independent samples, n1 ≥ 30 and n2 ≥ 30
sp =
( n1 − 1) s12 + ( n2 − 1) s22
H1: μ1 < μ2 t ≤ -tn1 + n2 – 2 ;1- α
n1 + n2 − 2 6
Example
A market researcher wants to study the difference in mean monthly
income for members of two groups. For a random sample of 52
members of group A the mean monthly income was R37 300 with
the standard deviation of R15 000. For a random sample of 70
members of group B, the mean monthly income was 34 900 with the
standard deviation of R12 000.
Test at a 5% level of significance whether there is a significant
difference between the mean monthly incomes of these two groups.
7
Step 1: Step 2: α = _______
Step 5: Decision
Sp =
t=
10
Difference between two Population Means, dependent
samples – paired observations, matched observations
Observation
1 2 3 ---------- n
Sample 1 X11 X12 X13 - - - - - - - - - - X1n
Sample 2 X21 X22 X23 - - - - - - - - - - X2n
d1 d2 d3 ---- dn
Difference (d)
(X11 - X21) (X12 - X22) (X13 – X23) (X1n - X2n)
d ( d )
2
1
2
− 1
d = d and sd = n
n n −1 11
Difference between two Population Means, dependent,
related or paired samples
Testing H0: μ1 = μ2
Alternative Test statistic Decision rule:
hypothesis Reject H0 if
H1: μ1 ≠ μ2 d |t| ≥ tn – 1 ; 1- α/2
t=
H1: μ1 > μ2 sd t ≥ tn – 1 ; 1- α
n
H1: μ1 < μ2 t ≤ -tn – 1 ;1- α
12
Example
A manager wishes to determine if there has been any alteration in the
ability of her trainees after they have been on a course. She gave each an
aptitude test before they started the course and an equivalent one after
they have completed the course. The scores are recorded in the table
below. Has any change taken place at a 5% level of significance?
Trainee A B C D E F G H I
Score before 74 69 45 67 67 42 54 67 76
Score after 69 76 56 59 78 63 54 76 75
13
Example
Step 1: Step 2: α = _____
d2 −
1
( ) −5
2 d
d t= = = −1.63
d=
d = −45 = −5 sd = n = = 9.21 sd 9.21
n 9 n −1 n 9
Step 5: Decision: Reject H0 if t tn −1;1− . Since t = −1.63 = 1.63 2.306, do not reject H0.
2
Step 6: Conclusion: At a 5% level of significance, there is evidence to infer that a change has
not taken place after the employees attended the course.
14
Hypothesis Testing
A statistics professor claims that the performance of students for Test 1
is better than their performance for Test 2. Test the claim at a 10% level
of significance.
15
Step 1: Step 2: α = _______
Step 5: Decision
H0: ______
H1: ______
18
Example:
Step 1: H0: πA ≤ πB vs H1: πA > πB Step 2: α = 0.01
Step 3:
n1 p1 + n2 p2 266(0.32) + 192(0.26)
pˆ = = = ____
n1 + n2 266 + 192
p A − pB 0.32 − 0.26
Z = = = ____
ˆ (1 − p
p
1
ˆ) +
1
0.29(1 − 0.29) ( 1
266
+ 1
192 )
1
n n2
Step 5: Reject H0 if Z Z1− . Since Z = ____ < ____, do not reject H0.
The F Distribution
• Statistics that have an F distribution are ratios of quantities, such as the ratio of
two sample variances;
• The F distribution has two values for the degrees of freedom (df): one associated
with the numerator and another one associated with the denominator;
• The degrees of freedom are shown with the subscript under the letter F. e.g F2;10.
It denotes the F distribution with 2 df for the numerator and 10 df for the
denominator.
NB: The group with large variance should be assigned as Group 1.
20
Difference between two Population Variances, large
independent samples
Testing H0: σ21 = σ22
Alternative Test statistic Decision rule:
hypothesis Reject H0 if
H1: σ21 ≠ σ22 2 F ≥ Fn1-1 ; n2-1 ; α/2
s
F= 1
2
H1: σ21 > σ22 s2
F ≥ Fn1-1 ; n2-1 ; α
City n2 = 21 s22 = 10
Suburban n1 = 31 s21 = 21
22
Example:
Step 1: H 0 : 12 = 22
H1 : 12 22
Step 2: α = 0.05
Step 3: Test statistic:
Step 5: Decision
Reject H0 if F ≥ F( n −1);( n −1);2 . Since F = 2.1 < 2.35, do not reject H0.
1 2
Step 6: Conclusion:
At a 5% level of significance, there is evidence to infer that the population variances
are the same. 23
Example
An important measure to determine service delivery in the banking sector is
the variability in the service times. An experiment was conducted to compare
the service times of two bank tellers. The results from the experiment:
• Teller A: nA = 18 and s2A = 4,03
• Teller B: nB = 26 and s2B = 9,49
Can we say that the variance in service time of teller A is less than that
variance of teller B on a 5% level of significance.
NB: Group 1 is then for Teller because it has the larger variance.
24
Exercise
Step 1: Step 2: α = 0.05
Step 5: Decision
Reject H0 if F ≥ F( n1 −1);( n2 −1); .
Since F = ____ > ______, reject H0.
Step 6: Conclusion:
25
1.Lombard C, van der Merwe L, Kele T and Mouton S.
2012. Elementary Statistics for Business and
Economics.