# Is it better to present the result of a $\textit{t}$-test as mean$\pm$SD or mean$\pm$SEM?

Is it better to present the result of a $$\textit{t}$$-test as mean$$\pm$$SD or mean$$\pm$$SEM (where SD is the standard deviation and SEM is the standard error of the mean)

Let's say we have a sample of 2 different population: $$X_1$$: vegetable diet and $$X_2$$: high cholesterol and high sugar diet. $$x_1$$ and $$x_2$$ are the sample, the values represent the body mass index (BMI)

x1 = c(25, 28, 27, 30, 25, 26, 25, 28, 29, 32, 21, 22, 19, 23)
x2 = c(28, 30, 30, 33, 36, 34, 35, 43, 25, 29, 30, 33)
t.test(x1, x2, conf.level = 0.05)

Welch Two Sample t-test

data:  x1 and x2
t = -3.8985, df = 20.7, p-value = 0.0008461
alternative hypothesis: true difference in means is not equal to 0
5 percent confidence interval:
-6.557431 -6.347331
sample estimates:
mean of x mean of y
25.71429  32.16667


We can see that they are different with a 95% certainty because $$p < 0.05$$. The respective means of those 2 samples are the following

mean(x1)
mean(x2)

[1] 25.71429
[1] 32.16667


The $$\textbf{Standard deviation}$$ is given by the function $$\texttt{sd()}$$

sd(x1)
sd(x2)

[1] 3.625308
[1] 4.648232


The Standard mean of error can be calculated as such $$SEM_x = \frac{sd_{x}}{\sqrt{n_x}}$$

where $$sd_x$$ is the standard deviation of the sample $$x$$ and $$n$$ is the number of observation in the sample $$x$$

(SEMx1 = sd(x1)/sqrt(length(x1)))
(SEMx2 = sd(x1)/sqrt(length(x2)))

[1] 0.9689043
[1] 1.046536


When reporting the result of a t-test in a scientific paper, shall we write: mean$$\pm$$SD or mean$$\pm$$SEM. Concretely:

1. There is a statistic difference between those 2 groups (25.71$$\pm$$3.63 vs 32.17$$\pm$$4.65, $$p$$ < 0.05)

or

1. There is a statistic difference between those 2 groups (25.71$$\pm$$0.97 vs 32.17$$\pm$$1.05, $$p$$ < 0.05)
• Why not present a confidence interval for the difference instead? – mdewey Jun 30 at 15:55

Confidence Interval for Difference. As part of the output to your Welch 2-sample t test, you already have a 95% confidence interval for the difference in the two population means, as suggested by @mdewey and @user40845:

95 percent confidence interval:
-9.897347 -3.007415


By reversing the order in which the variables are entered in t.test you could present this as $$(3.01, 9.90).$$ This is my preference also because it gives an idea of how large the difference between the two diets may be, based on your data.

Boxplots: Another possibility is to present boxplots of your data:

boxplot(x1,x2, col="skyblue2", pch=19, names=c("V", "C/S")


Intervals based on SD or SD: However, if presenting one of the intervals (with SDs or SEs) you mention is standard (or essentially mandatory) in your field, then I would prefer using the standard error because it reflects that one sample is slightly larger than the other. You should stress in the accompanying text, that these are not confidence intervals, but that the amounts $$\pm$$ are indications of variability.

Individual Bonferroni Confidence Intervals: From a statistical point of view, I would prefer two individual confidence intervals at the 97.5% level, to the showing either SDs or SEs. (There will be an inevitable urge to see if the two CIs overlap, and the 97.5% CIs may provide a fairer comparison. The level 97.5% instead of 95% follows the 'Bonferroni method of comparisons', which you can google.)

Such confidence intervals are easily obtained from individual one-sample t.test procedures:

t.test(x1, conf.lev=.975)$$conf.int [1] 23.26040 28.16817 attr(,"conf.level") [1] 0.975 t.test(x2, conf.lev=.75)$$conf.int
[1] 30.53707 33.79626
attr(,"conf.level")
[1] 0.75


So the intervals would be $$(23.26, 28.17)$$ for vegetable diet and $$(30.54, 33.80)$$ for high cholesterol/sugar.

• Thank you very much for your answer @BruceET. So if I understand you well, you would prefer use the notation mean$\pm$SE, but you are saying it is not fundamentally false to use mean$\pm$SD. It essentially depends of what is the habit of the scientific literature of the field. Correct? – ecjb Jun 30 at 17:18
• Almost saying that. If this is for a government agency or for a publication in a particular journal, then (statistically correct or not) one of those indications of error might be required. That doesn't relieve any of us from showing our best work, so you might show the CI for the difference in addition to whatever might be required. – BruceET Jun 30 at 17:31

I was just going to link you to the wikipedia but it surprisingly doesn't include the answer... In general, the confidence intervals will always be constructed out of the standard error since our confidence is based on how many samples we have of the estimated distribution.

In this case, the standard deviation of the means would be give by

$$s_{\bar X_1 - \bar X_2} = \left( \frac{(n_1-1)s_1^2 + (n_2-1)s_2^2)}{n_1 + n_2 - 2} \right)^{\frac12} = \sqrt{s_1^2 + s_2^2}\,,$$

Welch's $$t$$-test constructs the confidence interval using the standard error

$$SE_{\bar X_1 - \bar X_2} = \sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}\,.$$

For a pretty good explanation of the two sample $$t$$-test you can look at NCSS's documentation:

https://ncss-wpengine.netdna-ssl.com/wp-content/themes/ncss/pdf/Procedures/NCSS/Two-Sample_T-Test.pdf

• @mdewey's answer above is more correct btw. – user40845 Jun 30 at 16:24
• thank you for your answer @user40845. You're right I forgot to take into account the 2 groups in my definition of SEM. Now given all that information, how would you report the results in a sentence (in the form mean$\pm$SD or mean$\pm$SEM? – ecjb Jun 30 at 16:24