# How to obtain the standard deviation from means or confidence interval of the mean difference?

I am trying to calculate the sample size for a new study based on a previous one. The previous study compared means using a t test.

I have: the means, the t test result, the confidence interval of the mean difference, and the effect size.

However, the calculator that I am using to get the sample size requires the standard deviation.
How can I obtain the standard deviation from what I have?

-
Do you have the sample size for the previous study too? Degrees of freedom for the t test would also work. Also, which effect size? Cohen's d, Hedges' g, Glass' $\Delta$, OR, RR...? – Nick Stauner Jul 24 '14 at 20:10
Yes, I have sample size and Cohen's d – Marcela Jul 24 '14 at 20:36

2. Otherwise, you do need the sample size also. If it is $n$ observations per group, then the SD is $($(diff of means)$/t)\times\sqrt{n/2}$
Now that you have the SD, forget you ever saw any of those past results. The goal is to power your future study to meet its scientific objectives, not to replicate the old one. So examine (and discuss with others) the scientific goals of the study: How big a difference would be considered important, from a scientific perspective? Use that as the target value for $\mu_1-\mu_2$ in your sample-size calculator. (Your calculator asks for both means, so put in two values that differ by this amount).
These will give you the pooled $s$, which seems to be what you need. Converting $d$ looks easiest.$$\ \text{Cohen's }d=\frac{\bar x_1-\bar x_2}s,\quad\text{ hence }s=\frac{\bar x_1-\bar x_2}d\\\quad\quad\quad\quad t=\frac{\bar x_1-\bar x_2}{s\cdot\sqrt\frac 2 n},\quad\text{ hence }s=\frac{\bar x_1-\bar x_2}{t\cdot\sqrt\frac 2 n}\\\quad\quad\quad\ CI_\alpha=\bar x_1-\bar x_2\pm t_{(df,\alpha)}\cdot s\sqrt\frac2 n,\ \ \ \text{ hence }s=\frac{|CI_\text{upper bound}+\bar x_2-\bar x_1|}{t_{(df,\alpha)}\cdot \sqrt\frac2 n}$$