# two sample hypothesis testing

I am comparing the means of male and female blood sugar levels to see if males have lower blood sugar levels than females. My hypothesis is as follows:

H0 : µf - µm = 0 Ha : µf - µm >0

on a 5% significance level, H0 should be rejected, since p-value (Prob>|t|) = 0.001/2 < 0.05.

Is this correct? Because when I look at the output and compare the means the male mean is higher than the female mean.

• You didn't specify a one-sided test in your code. So the p-values refer to male blood glucose levels not equal to female blood glucose levels. Sep 30, 2017 at 20:38
• While containing potentially useful information, neither of the answers directly address the central point (that Michael clearly mentions in his comment) -- OP wants a one tailed test but has done a two-tailed test. This is why the p-value is low even though the samples are consistent with the OP's null. Without that particular piece of information I don't think the present answers are really addressing the question. Oct 1, 2017 at 1:29
• @Glen_b Yes this is a two-tailed test, that's why the p-value I used is divided by 2. Or do I understand this wrong? Oct 1, 2017 at 8:07
• No, your stated $H_a$ is clearly specifying one tail. Oct 1, 2017 at 8:16