Deriving standard deviation from p-value and t-statistics I have the results of a t-test for two groups, where the mean of one group is
3.4 units and the mean of the second group is 3.8. From the paired t-test, I know that t$_{17}$ = 2.8 and p = 0.013.
Is it possible to derive the spread of the distributions based on these values?
 A: Assuming that both sample have equal sample size and equal standard deviation I would say that this is possible. The problem is that the sample sizes can't be equal since df= n1 + n2 - 2 in an independent t-test and you have df=17 and thus a sample size of 19 in two groups, meaning the groups are not equal. Anyway, I will proceed as if the sample sizes were equal.
I usually use R so I show you it with R. Basically, it is going back the calculation of a t-test.
# choose any standard deviation
sd_choose <- 17
# genarate two random variables with the stadnard deviation you have choosed
set.seed(1)
a <- rnorm(1000000, mean= 0, sd= sd_choose)
b <- rnorm(1000000, mean= 0, sd= sd_choose)
# saving the results of the t-test
res <- t.test(a,b, paired = FALSE, var.equal = TRUE)
# determining t-value, n and the difference between the means
diff_mean <- diff(res$estimate)
n <- res$parameter + 2
tval <- res$statistic
# calculate the sd
sqrt((diff_mean/ tval)**2 / 2) * sqrt(n/2)
17.0072 # which is pretty much the sd we choosed

This would be in your case:
diff_mean <- 3.8 - 3.4
n <- 17 + 2
tval <- 2.8
sqrt((diff_mean/ tval)**2 / 2) * sqrt(n/2)
0.3113499

You can read this to see the formulas. Using this sd in an online t-test calculation gives me results close to those you provided. Again, the sample size is not the same, so I used mean1= 3.8, sd1= 0.3113499, n1= 10 and mean2= 3.4, sd2= 0.3113499 and n2= 9, which gave me t(17)= 2.7961 and p= 0.0124.
A: No. For many reasons. To your general question (the subject of the post):
In the simplest case, when you have a one sample test using a Wald statistic, where the form of the stat is $T = \bar{X} / \sqrt{\sigma^2/n}$,  it should be pretty obvious that $T$ is the same for any proportional constant $a\bar{X}$ and $a\sigma$. In other words, I can't tell if my door manufacturing plant is off by one centimeter plus or minus 2 centimeters, or 1 meter, plus or minus 2 meters. It's the same test of hypothesis against the null that by door is perfectly cut. At best you can recover the degrees of freedom, at consequently the $n$ comparing the $p$-value to $T$.
In your specific example you are still out of luck. The two-sample T-test typically uses the Satterthwaite degrees of freedom approximation to the Welch's test statistic $T = (\bar{X} - \bar{Y} ) / \sqrt{\sigma_X^2/n_x + \sigma_Y^2/n_y}$. Satterthwaites approximation incorporates the sample size of both samples as well as the respective standard deviations. I would have to write down the expression to be completely sure. But for now, it's not so trivial as you might expect, and likely there are many permutations that are irrecoverable in terms of the exact sample properties of either random variable.
A: The statistical model underlying the paired t-test is:
\begin{align}
& \text{Group 1:} \quad X_j = \mu_j + \sigma\varepsilon_{1j}, \\
& \text{Group 2:} \quad Y_j = \mu_j + \eta + \sigma\varepsilon_{2j}, j = 1, \ldots, n, 
\end{align}
where $\varepsilon_{11}, \ldots, \varepsilon_{1n}, \varepsilon_{21}, \ldots, 
\varepsilon_{2n} \text{ i.i.d.}\sim N(0, 1)$.
If by "derive the spread of the distributions", you meant deriving an estimate of $\sigma$, you can do it even without using the $p$-value information.  By $t_{17} = 2.8$, it can be inferred that:

*

*$n = 17 + 1 = 18$.

*Since the test statistic is defined as
\begin{align}
T = \frac{\sqrt{n}(\bar{Y} - \bar{X})}{\sqrt{2}\hat{\sigma}}, 
\end{align}
plug in the given conditions, we have
\begin{align}
2.8 = \frac{\sqrt{18} \times (3.8 - 3.4)}{\sqrt{2}\hat{\sigma}},
\end{align}
from which you can get $\hat{\sigma} = 0.4286$.

