0% found this document useful (0 votes)
23 views26 pages

Unit 4B - 2 - STUDENTS - Hypotheses Testing For Two Populations

The document discusses hypothesis testing for comparing two populations. It covers tests for the difference between two population means for independent and dependent samples, as well as tests for the difference between two population proportions and the ratio between two variances. Several examples are provided to demonstrate how to perform the hypothesis tests.

Uploaded by

Edward Mocheko
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views26 pages

Unit 4B - 2 - STUDENTS - Hypotheses Testing For Two Populations

The document discusses hypothesis testing for comparing two populations. It covers tests for the difference between two population means for independent and dependent samples, as well as tests for the difference between two population proportions and the ratio between two variances. Several examples are provided to demonstrate how to perform the hypothesis tests.

Uploaded by

Edward Mocheko
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Hypothesis Testing for the

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:

• to describe hypotheses tests concerning difference


between two population means, two population
proportions;
• to describe hypotheses tests concerning the ratio
between two population variances
• to describe when two samples are independently
drawn and when they are taken from a matched
pairs (related samples).

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

Testing H0: μ1 = μ2 for n1 ≥ 30 and n2 ≥ 30


Alternative Decision rule:
Test statistic
hypothesis Reject H0 if
H1: μ1 ≠ μ2 x1 − x2 |z| ≥ Z1- α/2
z=
H1: μ1 > μ2 s12 s22 z ≥ Z1- α
+
H1: μ1 < μ2 n1 n2 z ≤ -Z1- α
5
Use σ1 and σ2 if known
2 2
Difference between two Population Means, independent
samples, n1 < 30 and n2 < 30
Testing H0: μ1 = μ2 for n1 < 30 and n2 < 30
Alternative Test statistic Decision rule: Reject
hypothesis H0 if
x1 − x2
H1: μ1 ≠ μ2 t= with |t| ≥ tn1 + n2 – 2 ; 1- α/2
1 1
sp +
H1: μ1 > μ2 n1 n2 t ≥ tn1 + n2 – 2 ; 1- α

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 3: Test Statistic

Step 4: Critical value

Step 5: Decision

Step 6: Conclusion: ________________________________________


___________________________________________________
8
Example
An analyst carries out 10 analyses on equal masses of a substance
which is found to contain a mean of 48.80g of a metal, with a
standard deviation of 0.41g. A trainee operator carries out 12
analyses on equal masses of the same substance which is found to
contain a mean of 49.30g, with a standard deviation of 0.32g. At a
1% level of significance, is the mean of substances produced by the
analyst lower than the mean of substances produced by the trainee
operator?
Group 1 n1 = 10 x1 = 48.8 s1 = 0.41
Group 2 n2 = 12 x2 = 49.3 s2 = 0.32
Step 1: H0: µ1 ≥ µ2
H1: µ1 < µ2
Step 2: α = 0.01 Step 3: Test Statistic 9
Hypothesis Testing
Step 1: Step 2: α = 0.01

Step 3: Test statistic:

Sp =

t=

Step 4: Critical value:


Step 5: Decision: Reject H0 if t ≤ -tn1 + n2 – 2 ;1- α. Since t = -3.24 < -2.528, reject H0.
Step 6: Conclusion: At a 1% level of significance, there is evidence to infer that
the mean of substances produced by the analyst is lower than the
mean of substances produced by the trainee operator

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: α = _____

Step 3: Test statistic:

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 4: Critical value:

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.

Student Masango Ajiboye Boshoff Zhakata


Test 1 85 73 83 75
Test 2 65 59 62 60
d

15
Step 1: Step 2: α = _______

Step 3: Test Statistic

Step 4: Critical value

Step 5: Decision

Step 6: Conclusion: ________________________________________


___________________________________________________
16
Difference between two Population Proportions, large
independent samples

Testing H0: π1 = π2 for n1 ≥ 30 and n2 ≥ 30


Alternative Decision rule:
Test Statistics
hypothesis Reject H0 if
p1 − p2
H1: π1 ≠ π2 Z = |z| ≥ Z1- α/2
1 1
pˆ (1 − pˆ )  + 
H1: π1 > π2  n1 n2  z ≥ Z1- α
n1 p1 + n2 p2 x1 + x2
H1: π1 < π2 where p =
ˆ =
n1 + n2 n1 + n2 z ≤ -Z1- α 17
• Example
A clothing manufacturer introduced two new swim suite ranges on the
market. Of the 266 clients asked if they will wear range A, 85 indicated
they will. Of the 192 clients asked if they will wear range B, 50
indicated they will. Can we conclude that the population proportion of
clients who liked Range A is higher than the population proportion of
clients who liked Range B? Use α = 0.01.

A nA = 266 xA = 85 pA = 85/266 = 0.32


B nB = 192 xB = 50 pB = 50/192 = 0.26

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 4: _____ = _____ = ________

Step 5: Reject H0 if Z  Z1− . Since Z = ____ < ____, do not reject H0.

Step 6: At a 1% level of significance, there is evidence to infer that the population


proportion of clients who liked Range A is not higher than the population proportion
of clients who liked Range B. 19
Hypothesis tests concerning the difference between two population variances

• Hypothesis studied to date involved means and proportions;


• It is also necessary to study whether two populations have the same (equal)
variability, that is, to test whether they have equal variances;
• The procedures for hypothesis testing are similar, but not identical.

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 ; α

H1: σ21 < σ22 F ≤ Fn1-1 ; n2-1 ;1 - α21


Example:
An educational statistician wants to compare the scholastic aptitude
test (SAT) scores achieved by children living in cities and those
achieved by children living in the suburbs. A random sample of 21
SAT of city children yielded a variance of 10 and a random sample of
31 SAT of suburban children produced a variance of 21. Assume that
the population of SAT scores is normally distributed. Test at a 5%
level of significance whether it is possible that the population
variances are the same.

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 4: Critical value

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 3: Test statistic:

Step 4: Critical value

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.

2. John Bird. 2017. Higher Engineering Mathematics.

2. Trevor Wegner. 2006. Applied and Business


Statistics: Methods and Applications.
26

You might also like