Thanks for the careful explanation of your question. You do need a one-sided test.
If you happen to have computer output for a two-sided test and the sample means are in the proper relationship, you can conclude that a one-sided test will have half the P-value of the two-sided test.
Fictitious data for illustration (sampled using R):
set.seed(2021)
x.a = rnorm(70, 50, 4)
summary(x.a)
Min. 1st Qu. Median Mean 3rd Qu. Max.
40.98 46.18 49.76 49.64 52.16 58.48
x.b = rnorm(70, 52, 4)
summary(x.b)
Min. 1st Qu. Median Mean 3rd Qu. Max.
41.20 48.75 51.46 51.22 53.94 61.81
boxplot(x.a, x.b, col="skyblue2", horizontal=T)
Two-sided test: $H_0: \mu_a = \mu_b$ against $H_a: \mu_a \ne \mu_b.$
Reject with P-value $0.03 < 0.05 = 5\%.$
t.test(x.a, x.b)
Welch Two Sample t-test
data: x.a and x.b
t = -2.2045, df = 137.96, p-value = 0.02915
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-3.0078510 -0.1633819
sample estimates:
mean of x mean of y
49.63691 51.22252
The P-value can be found in R, where pt
is the CDF of Student's t
distribution. The Welch test can use fractional degrees of freedom,
which some software rounds to integers.
L = pt(-2.2045, 137.96) # actual left tail probability
R = 1-pt(2.2045, 137.96) # just as extreme in right tail
L+R
[1] 0.02914627
In the figure bwlow, the P-value is the sum of the areas under
the density curve in the two tails beyond the vertical red lines.
curve(dt(x,127.96), -4, 4, ylab="PDF", xlab="t", lwd=2)
abline(h=0, col="green2"); abline(v=0, col="green2")
abline(v =-2.2045, col="red", lwd=2)
abline(v = 2.2045, col="red", lwd=2, lty="dotted")
One-sided test: $H_0: \mu_a \ge \mu_b$ against $H_a: \mu_a < \mu_b.$
Reject with P-value $0.015 < 0.02 = 2\%.$
t.test(x.a, x.b, alt="less")
Welch Two Sample t-test
data: x.a and x.b
t = -2.2045, df = 137.96, p-value = 0.01457
alternative hypothesis: true difference in means is less than 0
95 percent confidence interval:
-Inf -0.3945112
sample estimates:
mean of x mean of y
49.63691 51.22252
The P-value is found as follows, using R.
pt(-2.2045, 137.96)
[1] 0.01457313