Professional Documents
Culture Documents
Contents
Engage 1
Introduction 1
Objectives 2
Explore 2
Extend 20
Activity 1 20
Activity 2 22
Evaluate 24
Wrap Up 26
Bibliography 27
Unit 7.2: Testing the Difference of Two Means
Engage
Introduction
How do you compare two objects? You might initially use your senses to compare both
objects. You might take a look at both objects and tell that one has a different color or size
than the other. You might also use tools to be more accurate in comparing their differences.
For example, a balancing scale may be used to find out whether one object weighs more
than the other.
In statistics, we can use specific statistical analyses to test the difference between groups.
These tests whether there is a significant difference between groups, specifically two mean
scores. How can we ensure that the differences between groups are tested accurately? What
statistical tests can be used to test their differences? In this lesson, we will discuss various
statistical analyses to calculate the groups’ differences.
1
Unit 7.2: Testing the Difference of Two Means
Objectives
In this lesson, you should be able to do the following:
● Identify the different parametric and nonparametric tests in comparing the
difference between two means.
● Compare different groups by using appropriate statistical tests.
DepEd Competency
Use statistical techniques to analyze data—study of differences and relationships limited for
bivariate analysis. (CS_RS12-IId-g-3)
Explore
10 minutes
Find a partner in answering this activity. Analyze the data given below from five students
with their average number of minutes spent on social media during weekdays and
weekends.
1 60 minutes 90 minutes
4 90 minutes 90 minutes
5 60 minutes 60 minutes
2
Unit 7.2: Testing the Difference of Two Means
Guide Questions
1. Which condition has a higher average number of minutes spent on social media? Justify
your answer.
3. Why is it important to know if there is a significant difference between the two sets of
data?
3
Unit 7.2: Testing the Difference of Two Means
There are different statistical analyses to explore the differences between two means, such
as the t-test, Mann-Whitney U-test, and Wilcoxon test. The t-test is considered as a
parametric test, whereas the Mann-Whitney U-test and Wilcoxon test are the nonparametric
test counterparts.
Generally, parametric tests are used when the data is non-categorical (i.e., interval) and
assumed to be normally distributed. On the other hand, nonparametric tests are used
when the data is categorical (i.e., nominal and ordinal), and when the data is skewed
(Langdridge, and Hagger-Johnson 2013).
Introduction to t-test
The t-test is a parametric test that aims to test whether the differences between the means
of two groups (i.e., t-test for independent groups) are statistically significant or to examine
the differences between the same group subjected under two different conditions (i.e., t-test
for dependent groups) (Cohen, Manion, and Morrison 2018).
According to Cohen, Manion, and Morrison (2018), the following are the assumptions of
t-test to ensure that it is the appropriate statistical test to use:
● parametric continuous data with the dependent variable at an interval or ratio level
4
Unit 7.2: Testing the Difference of Two Means
● random sampling
● normal distribution of the data (can be overcome by large samples)
If the abovementioned conditions are not met, the researchers are recommended to use
the nonparametric counterparts of the t-test, which are the Mann-Whitney U-test and
Wilcoxon test.
Eq. 1.
Where:
𝑋𝐴 = the mean of scores in group A
2
Σ𝑋𝐴 = each score in group A squared and then added up
2
Σ𝑋𝐵 = each score in group B squared and then added up
5
Unit 7.2: Testing the Difference of Two Means
Tip
Some formulas may look tedious at first, but the key to answering
problems involving long formulas is to break them down into smaller
pieces.
Example:
Martina is an agriculturist who wants to find out whether the growth of okra plants sprayed
with biopesticides is significantly different from okra plants that are sprayed with
conventional pesticides. She took a total of 16 random samples of plants, with eight samples
for each group, and measured the length of the plants. The data is summarized in the table
below.
3.0 2.5
4.5 1.5
5.0 3.0
5.2 3.2
3.5 2.0
4.0 2.9
2.8 1.9
4.7 1.6
Let us solve the problem using a step-by-step procedure as proposed by Tokunaga (2016):
6
Unit 7.2: Testing the Difference of Two Means
problem is that the average length of okra plants sprayed with biopesticides is the same
as the okra plants sprayed with conventional pesticides.
In contrast, the alternative hypothesis (H1) states that there is a change or difference
between groups. Thus, the alternative hypothesis (H1) in the problem is that the average
length of okra plants sprayed with biopesticides is significantly different from okra plants
sprayed with conventional pesticides. This can be expressed as follows:
𝐻1: µ𝑏𝑖𝑜𝑝𝑒𝑠𝑡𝑖𝑐𝑖𝑑𝑒𝑠 ≠ µ𝑐𝑜𝑛𝑣𝑒𝑛𝑡𝑖𝑜𝑛𝑎𝑙
In the given problem, the number of sample plants per group is equal to eight.
Thus, the degrees of freedom are calculated as follows:
𝑑𝑓 = (𝑁1 − 1) + (𝑁2 − 1)
= (8 − 1) + (8 − 1) = 7 + 7
= 14
7
Unit 7.2: Testing the Difference of Two Means
The total degrees of freedom is 14 (df = 14) after combining the degrees of freedom
for the two samples.
2.b Set alpha level (α), identify the critical values, and state a decision rule.
The researcher is the one who decides which alpha level will be set in a study. The
standard alpha level value is .05. However, researchers can also use more
stringent alpha levels such as .01. In this problem, we will be using the .05 alpha
level. Since the problem did not indicate any direction, the alpha may be expressed
as:
α =. 05 (𝑡𝑤𝑜 − 𝑡𝑎𝑖𝑙𝑒𝑑)
The next process is to identify the critical values. We refer to the table of t-test
critical values, which you can refer to using this link:
Refer to the t-test critical value table. We must first identify three bits of
information, which are the degrees of freedom (df), the alpha (α), and the
directionality (one-tailed or two-tailed). In the given problem above, the pieces
of information are df = 14, α= 0.05, and two-tailed. Using these, we now obtain a
t-critical value of ±2.145.
8
Unit 7.2: Testing the Difference of Two Means
3.0 2.5
4.5 1.5
5.0 3.0
5.2 3.2
3.5 2.0
4.0 2.9
2.8 1.9
4.7 1.6
2
Σ𝑋𝐴 = 139.47 (each score in group A squared and then added up)
9
Unit 7.2: Testing the Difference of Two Means
2
Σ𝑋𝐵 = 46.32 (each score in group B squared and then added up)
Use a calculator to obtain the t value. The t value should be t = 4.43 (rounded off to
two decimal places).
10
Unit 7.2: Testing the Difference of Two Means
The formula for calculating a dependent groups t-test is as follows (Howell 2014):
Eq. 2.
Where:
Σ𝑑 = sum of all the differences in scores between conditions A and B
2
(Σ𝑑) = the sum of all differences squared
2
Σ𝑑 = differences are squared first and then added up
𝑁 = the number of pairs of scores in your data set
Example:
Maureen wants to know if the average daily intake of water during the month of March is
significantly different from the average daily intake of water during the month of December.
She has 10 participants for the study and recorded their average daily intake of water during
the month of February and March. The data is summarized in the table below.
8.00 7.00
8.50 6.50
9.00 8.00
11
Unit 7.2: Testing the Difference of Two Means
10.00 6.00
9.50 8.50
9.25 8.25
8.75 7.75
11.00 8.00
10.80 6.80
12.25 8.25
Alternative hypothesis: There is a significant difference between the average daily intake
of water during the month of March and the month of December.
𝐻1: µ𝑀𝑎𝑟𝑐ℎ ≠ µ𝐷𝑒𝑐𝑒𝑚𝑏𝑒𝑟
2.b Set alpha level (α), identify the critical values, and state a decision rule.
Alpha level: α=.05 (two-tailed)
We will be using the standard alpha level, 0.05. There is no specific direction stated
in the problem. Thus, the directionality is two-tailed.
12
Unit 7.2: Testing the Difference of Two Means
8.00 7.00
8.50 6.50
9.00 8.00
10.00 6.00
9.50 8.50
9.25 8.25
8.75 7.75
11.00 8.00
10.80 6.80
12.25 8.25
13
Unit 7.2: Testing the Difference of Two Means
Use a calculator to obtain the t value. The t value should be t = 4.97 (rounded off to
two decimal places).
Tip
Nonparametric tests are recommended to use when the sample size
is small, and when there is an issue with the data set’s symmetry.
14
Unit 7.2: Testing the Difference of Two Means
Mann-Whitney U-test
The Mann–Whitney U-test is used if you want to examine differences between
independent groups. It is the nonparametric counterpart of the independent groups’ t-test
and is used when the data obtained is based on ranks (Langdridge, and Hagger-Johnson
2013). According to Mayers (2013), the formula for the Mann-Whitney U-test is:
Example:
Ariel is a student researcher who wants to know whether the stress levels of female college
students are significantly different than that of male college students. To measure the stress
level of the students, she administered the University Students Stress Scale (USSS) to 20
participants (10 male and 10 female). The questionnaire can be scored from 0–100 (higher
scores represent higher stress levels). The scores of the students are presented below:
Female Male
79 47
41 76
57 60
88 51
82 57
66 57
82 44
79 47
57 38
69 28
15
Unit 7.2: Testing the Difference of Two Means
there are two scores of 47 tied for the 5th and 6th ranks. Thus, both scores will be
assigned a rank of 5.5. The ranks for the data set are presented below:
79 16.5 47 5.5
41 3 76 15
57 9.5 60 12
88 20 51 7
82 18.5 57 9.5
66 13 57 9.5
82 18.5 44 4
79 16.5 47 5.5
57 9.5 38 2
69 14 28 1
𝑁1 = 𝑠𝑎𝑚𝑝𝑙𝑒 𝑠𝑖𝑧𝑒 𝑜𝑓 𝑔𝑟𝑜𝑢𝑝 1 (10); 𝑁2 = 𝑠𝑎𝑚𝑝𝑙𝑒 𝑠𝑖𝑧𝑒 𝑓𝑜𝑟 𝑔𝑟𝑜𝑢𝑝 2 (10); 𝑅1 = 𝑙𝑎𝑟𝑔𝑒𝑟 𝑟𝑎𝑛𝑘 𝑠𝑢𝑚 (139)
16
Unit 7.2: Testing the Difference of Two Means
Wilcoxon Test
The Wilcoxon test is used when you want to examine differences between related sets of
data. It is the nonparametric counterpart of the dependent group t-test and is also used
when the data obtained is based on ranks (Langdridge, and Hagger-Johnson 2013).
Example:
Anna wants to find out if there is a significant difference between the weight of people
before and after taking a new diet pill called Slimming Z. Anna had six participants in the
study and recorded their weight (in kg) before and after taking Slimming Z for three months.
48 45
60 60
50 52
53 52
72 73
58 58
17
Unit 7.2: Testing the Difference of Two Means
48 45 3 5
60 61 1 1
50 52 -2 4
53 52 1 1
72 73 -1 1
58 54 4 6
2. Find the value of T, which is the sum of the ranks for the differences with the less
frequent sign:
𝑇=4+1 =5
In this problem, there are only two negative signs which have ranks 4 and 1.
3. Find the critical value of T on the Wilcoxon table which can be referred to from the
link below:
In the critical value table, when N = 6 then T = 0 for a two-tailed test. The obtained T
value is above this. Note that the obtained value must be less than the critical
value to be considered significant. This suggests that there is no significant
difference between the set of scores.
18
Unit 7.2: Testing the Difference of Two Means
4. Report your findings: “There is no significant difference between the weight of the
participants before and after taking the Slimming Z (Wilcoxon T = 3, two-tailed p <
0.05).“
Remember
It is important to note that the t used for t-tests is in lowercase;
whereas, the T used in the Wilcoxon test is in uppercase.
Extend
Activity 1
Ria wants to know if there is a significant difference between the average monthly hair
growth using Shampoo A vs Shampoo B. She recruited eight participants and compared
their average monthly hair growth (in centimeters) using the two different brands. Her data
is assumed to be normally distributed which produced the following values:
Shampoo A Shampoo B
0.50 1.00
1.00 1.25
1.50 2.00
1.70 2.00
0.75 1.50
0.60 1.00
1.25 1.50
1.25 1.75
Choose the appropriate test statistic and make a conclusion about the problem. Show your
output below in a step-by-step manner:
19
Unit 7.2: Testing the Difference of Two Means
Guide
Since the two groups are conditions that are matched for the same group of people,
the t-test for dependent groups must be used in this problem. The correct t-value is
t=-7.22. Take note that the problem is nondirectional, which makes it two-tailed. The
obtained t-value is greater than (ignoring the sign) the critical value of 2.145. This
suggests that there is a significant difference between the average monthly hair
growth using Shampoo A vs. Shampoo B.
20
Unit 7.2: Testing the Difference of Two Means
Activity 2
Ms. Mendoza wants to know if there is a significant difference between the pretest and
posttest exams of students for their calculus class. She administered an 8-item test to 8
students and recorded their scores on the pretest and posttest exams. Ms. Mendoza
observed that her data is positively skewed. The raw scores of the students are summarized
in the table below:
Pretest Posttest
3 5
2 4
5 5
8 10
1 5
7 10
4 7
2 8
Use the appropriate test statistic and determine if there is a significant difference between
the two groups.
21
Unit 7.2: Testing the Difference of Two Means
Guide
The problem entails using a nonparametric test, specifically the Wilcoxon test
because the two groups are related and assumed to have asymmetrical data. After
subjecting the data to the statistical test, it will result in T = 0. This obtained value is
lower than the critical value of T = 4 from the critical values table. This means that
there is a significant difference between the scores in the pretest and posttest calculus
exams of Ms. Mendoza’s students.
22
Unit 7.2: Testing the Difference of Two Means
Evaluate
1. Calculate the degrees of freedom (df) and identify the critical value of t for the following
set of data for an independent groups t-test: N1=11, N2=11, H1: μ1 >μ2. Assume that
α=0.05.
2. State the null and alternative hypotheses (H0 and H1) for the following research
question: “Do children from high socioeconomic status families have higher self-esteem
than children from low socioeconomic status families?”
3. Jessica used Mann-Whitney U-test to examine differences between the two groups in
her study. She obtained a value of U =20. After looking at the critical values table, she
found out that the critical value is 37. What can be concluded in the study?
23
Unit 7.2: Testing the Difference of Two Means
1. A group of patients diagnosed with diabetes is given two different types of drugs, at
different times, to examine if their condition will improve. Their blood sugar levels were
recorded and compared using the two different types of drugs.
2. A group of senior high school students from Metro Manila is compared with those from
the province to see if there is a significant difference between the number of hours they
spend on using social media.
24
Unit 7.2: Testing the Difference of Two Means
Wrap Up
___________________________________________________________________________________________
● The t-test is a parametric test that aims to test whether the differences between
the means of two groups or conditions are statistically significant.
● The independent group t-test is used when the two sets of data have come from two
independent sources or two different groups.
● The dependent group t-test is used when two sets of data come from the same
group of people.
● The Mann–Whitney U-test is a nonparametric test used when you want to examine
differences between independent groups.
● The Wilcoxon test is the nonparametric counterpart of the dependent groups t-test
and is also used when the data obtained is based on ranks.
___________________________________________________________________________________________
25
Unit 7.2: Testing the Difference of Two Means
Bibliography
Cohen, Louis, Lawrence Manion, and Keith Morrison. Research Methods in Education. 8th ed.
New York: Routledge, 2018.
Coolican, Hugh. Research Methods and Statistics in Psychology. 6th ed. New York: Psychology
Press, 2014.
Howell, David. C. Fundamental Statistics for the Behavioral Sciences. 8th ed. California:
Wadsworth, Cengage Learning, 2014.
Langdridge, Darren, and Gareth Hagger-Johnson. Introduction to Research Methods and Data
Analysis in Psychology. 3rd ed. England: Pearson, 2013.
Mayers, Andrew. Introduction to Statistics and SPSS in Psychology. UK: Pearson, 2013.
Tokunaga, Howard T. Fundamental Statistics for the Social and Behavioral Sciences. California:
Sage Publications, 2016.
26