Hypothesis Testing: Comparing Two
Independent Groups
Jonecis A. Dayap
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Objectives:
I Determine when to use the Independent Samples t-test.
II Understand the assumptions underlying the Independent Samples
t-test.
III Explore applications of the Independent Samples t-test
IV Utilize JASP to perform the Independent Samples t-test
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Research Question: Is there a significant difference in the determinants of
taxpayers’ behaviour between male and female taxpayers.
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
The results show that there is no statistically significant difference in tax
knowledge, enforcement level, fairness of the tax system, and tax rates.
The results further revealed that there is a statistically significant mean
difference between male and female taxpayers in their perception of
government spending, and the roles of the tax authority.
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
When can we use Independent Samples t-test
The independent samples t-test is used to compare the means of
two unrelated groups.
Example Research Questions:
Is there a significant difference in average sales performance
between two regional sales teams?
Do customers who receive personalized email promotions spend
more than those who receive standard promotions?
Does a new digital marketing strategy lead to higher customer
engagement compared to traditional advertising?
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Assumptions
The independent variable must be dichotomous and categorical.
The dependent variable must be continuous (i.e., measured on a
ratio or interval scale).
The groups should be independent of each other.
The dependent variable should be approximately normally
distributed. If not, consider using the non-parametric
Mann-Whitney U Test.
There should be no significant outliers in the data.
There should be homogeneity of variance between the groups (as
assessed by Levene’s Test); otherwise, the p-value for the student’s
t-statistic may not be reliable. If this assumption is violated, the
Welch’s t-test should be used.
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Choosing the Appropriate Test for Two Unrelated Groups
Student’s t-test (Independent Samples t-test)
Assumes normality of the dependent variable in both groups.
Assumes equal variances between groups (assessed by Levene’s
Test).
The dependent variable must be continuous (interval or ratio
scale).
Welch’s t-test
Assumes normality of the dependent variable in both groups.
Used when comparing the means of two independent groups,
but variances are unequal.
The dependent variable must be continuous (interval or ratio
scale).
Mann-Whitney U Test
Used when the data does not meet the normality assumption
required for t-tests.
Suitable for ordinal data or continuous data that is not
normally distributed.
Less sensitive to outliers and skewed distributions.
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Recall: Shapiro-Wilk Test
α = 0.05
H0 : The data follows a normal distribution.
H1 : The data does not follow a normal distribution.
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Recall: Shapiro-Wilk Test
α = 0.05
H0 : The data follows a normal distribution.
H1 : The data does not follow a normal distribution.
Decision Rule:
p-value ≥ α: Fail to reject H0 , data follows a normal distribution.
p-value < α: Reject H0 , data does not follow a normal distribution.
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Recall: Levene’s Test
α = 0.05
H0 : Variances are equal across groups.
H1 : Variances are not equal across groups (at least one group’s
variance is different).
Decision Rule:
p-value ≥ α: Fail to reject H0 , variances are equal across groups.
p-value < α: Reject H0 , variances are not equal across groups.
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Hypotheses: Comparing Two Independent Groups
Null hypothesis H0 : There is no significant difference between the means
of two population.
Mathematically, this is represented as:
(H0 : µ1 = µ2 )
Alternative Hypothesis H1 : There is a significant difference between the
means of two population.
Mathematically, this is represented as:
(H1 : µ1 6= µ2 )
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Case 1: Equal Variances
The formula for the test statistic in an independent samples t-test, when
the variances of the two groups are unknown and assumed to be
equal, is as follows (Student’s t-test):
x1 − x2
t= q
Sp n11 + n12
Where:
x1 = mean of the first group
x2 = mean of the second group
Sp = pooled standard deviation, calculated as:
s
(n1 − 1)s12 + (n2 − 1)s22
Sp =
n1 + n2 − 2
s1 = standard deviation of the first group
s2 = standard deviation of the second group
n1 = sample size of the first group
n2 = sample size of the second group
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Steps in Hypothesis Testing Using Critical Value Approach
1 Set up the hypothesis.
H0 : µ1 = µ2
H1 : µ1 6=, <, > µ2
2 Set the level of significance
3 Determine the critical value of t.
Degrees of Freedom = n1 + n2 − 2
4 Calculate the value of independent samples t-test.
5 Make a statistical decision:
If |tcomputed | ≤ |tcritical | , do not reject Ho.
If |tcomputed | > |tcritical | , reject Ho.
6 State the conclusion.
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Example
A researcher wishes to determine whether the monthly salary of
professional elementary teachers in private schools differs from that of
elementary teachers in public schools. He selects a sample of elementary
teachers from each type of school and calculates the means and standard
deviations of their salaries. At α = 0.01, can he conclude that private
school teachers do not receive the same salary as public school teachers?
Assume that the populations are approximately normally distributed and
have equal variances.
Private Public
x̄1 = 16400 x̄2 = 15170
s1 = 700 s2 = 800
n1 = 15 n2 = 9
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Solution: Using Critical Value Approach
1 Set up the hypothesis.
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Solution: Using Critical Value Approach
1 Set up the hypothesis.
H0 : µ1 = µ2
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Solution: Using Critical Value Approach
1 Set up the hypothesis.
H0 : µ1 = µ2
H1 : µ1 6= µ2
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Solution: Using Critical Value Approach
1 Set up the hypothesis.
H0 : µ1 = µ2
H1 : µ1 6= µ2
2 Set the level of significance.
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Solution: Using Critical Value Approach
1 Set up the hypothesis.
H0 : µ1 = µ2
H1 : µ1 6= µ2
2 Set the level of significance.
The level of significance is given as 0.01.
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Solution: Using Critical Value Approach
1 Set up the hypothesis.
H0 : µ1 = µ2
H1 : µ1 6= µ2
2 Set the level of significance.
The level of significance is given as 0.01.
3 Determine the critical value of t.
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Solution: Using Critical Value Approach
1 Set up the hypothesis.
H0 : µ1 = µ2
H1 : µ1 6= µ2
2 Set the level of significance.
The level of significance is given as 0.01.
3 Determine the critical value of t.
The critical value for α = 0.01 (two-tailed) is ±2.819.
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Solution: Using Critical Value Approach
1 Set up the hypothesis.
H0 : µ1 = µ2
H1 : µ1 6= µ2
2 Set the level of significance.
The level of significance is given as 0.01.
3 Determine the critical value of t.
The critical value for α = 0.01 (two-tailed) is ±2.819.
4 Calculate the value of two independent samples t-test.
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Solution: Using Critical Value Approach
1 Set up the hypothesis.
H0 : µ1 = µ2
H1 : µ1 6= µ2
2 Set the level of significance.
The level of significance is given as 0.01.
3 Determine the critical value of t.
The critical value for α = 0.01 (two-tailed) is ±2.819.
4 Calculate the value of two independent samples t-test.
tcomputed = 3.95
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Solution: Using Critical Value Approach
1 Set up the hypothesis.
H0 : µ1 = µ2
H1 : µ1 6= µ2
2 Set the level of significance.
The level of significance is given as 0.01.
3 Determine the critical value of t.
The critical value for α = 0.01 (two-tailed) is ±2.819.
4 Calculate the value of two independent samples t-test.
tcomputed = 3.95
5 Make a statistical decision:
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Solution: Using Critical Value Approach
1 Set up the hypothesis.
H0 : µ1 = µ2
H1 : µ1 6= µ2
2 Set the level of significance.
The level of significance is given as 0.01.
3 Determine the critical value of t.
The critical value for α = 0.01 (two-tailed) is ±2.819.
4 Calculate the value of two independent samples t-test.
tcomputed = 3.95
5 Make a statistical decision:
Reject the null hypothesis.
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Solution: Using Critical Value Approach
1 Set up the hypothesis.
H0 : µ1 = µ2
H1 : µ1 6= µ2
2 Set the level of significance.
The level of significance is given as 0.01.
3 Determine the critical value of t.
The critical value for α = 0.01 (two-tailed) is ±2.819.
4 Calculate the value of two independent samples t-test.
tcomputed = 3.95
5 Make a statistical decision:
Reject the null hypothesis.
6 State the conclusion.
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Solution: Using Critical Value Approach
1 Set up the hypothesis.
H0 : µ1 = µ2
H1 : µ1 6= µ2
2 Set the level of significance.
The level of significance is given as 0.01.
3 Determine the critical value of t.
The critical value for α = 0.01 (two-tailed) is ±2.819.
4 Calculate the value of two independent samples t-test.
tcomputed = 3.95
5 Make a statistical decision:
Reject the null hypothesis.
6 State the conclusion.
At α = 0.01 significance level, there is sufficient evidence to
conclude that the mean salaries of private and public school
elementary teachers are significantly different.
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Case 2: Unequal Variances
The formula for the test statistic in an independent samples t-test, when
the population variances of the two groups are unknown but assumed
to be unequal, is as follows (Welch’s t-test):
x1 − x2
t=q 2
s1 s22
n1 + n2
Where:
x 1 = mean of the first group
x 2 = mean of the second group
s1 = standard deviation of the first group
s2 = standard deviation of the second group
n1 = sample size of the first group
n2 = sample size of the second group
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Degrees of Freedom for Case 2
2
s12 s22
n1 + n2
df = 2 2 2
s s2
1 2
n1 n2
n1 −1 + n2 −1
Where:
s1 = standard deviation of the first group
s2 = standard deviation of the second group
n1 = sample size of the first group
n2 = sample size of the second group
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Running the Independent Samples t-test using JASP
Go to Data Library − > T-Tests − > Directed Reading Activities
In the analysis window tick the following options:
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Understanding the Output
Table 1. Descriptive Statistics
Table 2. Test of Normality
Table 3. Test of Equality of Variances
Table 4. Independent Samples T-test
Jonecis A. Dayap
Decision: Since the assumptions Hypothesisand
of normality Testing: Comparing
equality ofTwo Independent Groups
variances
Reporting the Results
A Levene’s test indicated that the assumption of homogeneity of variance
was met: F(1, 42) = 2.362, p = .132. A Shapiro-Wilk test showed that
both groups had normally distributed data: Control (W = 0.97, p = .73)
and Treatment (W = 0.97, p = .65). Therefore, an independent samples
Student’s t-test assuming equal variances was conducted. The results
revealed that the treatment group had significantly higher reading
performance (M = 51.48, SD = 11.01) compared to the control group
(M = 41.52, SD = 17.15): t(42) = 2.27, p = .03. Cohen’s d = 0.68
indicates a moderate effect size.
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
MANN-WITNEY U TEST
Table 1. Descriptive Statistics
Table 2. Mann-Witney U test
Reporting the result:
A Mann-Whitney U test showed that Ice therapy significantly reduces
pain scores (Mdn = 3) compared to the control group (Mdn = 7):
W = 207, p < .001. The rB = 0.84 suggests that this is a large effect
size.
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Cohen’s d Effect Size
Cohen’s d Value Effect Size Interpretation Explanation
d < 0.2 Negligible Very small or no
meaningful difference.
0.2 ≤ d < 0.5 Small Small difference
between groups.
0.5 ≤ d < 0.8 Medium Moderate effect,
noticeable difference.
d ≥ 0.8 Large Strong effect, large
difference between
groups.
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
Activity 4. Hypothesis Testing: Comparing Two
Independent Groups
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups
References
Berenson, M. L., Levine, D. M., Szabat, K. A., & Stephan, D. F.
(2020). Basic business statistics: Concepts and applications.
Pearson.
Black, K. (2023). Business statistics: for contemporary decision
making. John Wiley & Sons.
Kumar, S., & Singh, D. (2024). BUSINESS STATISTICS &
ANALYTICS: e-Book for MBA 1st Semester of AKTU, UP. Thakur
Publication Private Limited.
Wegner, T. (2010). Applied business statistics: Methods and
Excel-based applications. Juta and Company ltd.
Jonecis A. Dayap Hypothesis Testing: Comparing Two Independent Groups