Standard Deviation – How to Find Sample Size Given a Mean and Standard Deviation?

meanstandard deviation

Given a mean of $5.60$ and a standard deviation of $0.13$ is there a way of finding out how many individual values produced this mean and what those values were?

Best Answer

If you know there are two values, then you can figure out what they are.

$$ \bar x = \dfrac{1}{n}\sum_{i=1}^nx_i = \dfrac{1}{2}\big(x_1 + x_2\big)\\ s^2 = \dfrac{1}{n-1}\sum_{i = 1}^n\big(x_i - \bar x\big)^2 = (x_1 - \bar x)^2 + (x_2 - \bar x)^2 $$

Solve the system of equations. Wolfram Alpha gives two solutions, but the way of interpreting them is that the calculation does not know which value is $x_1$ (x) and which value is $x_2$ (y), and it is true that you do not know which value is which.

$$ x_1 = \dfrac{1}{2}\bigg( 2\bar x - \sqrt{2s^2} \bigg)\\ x_2 = \dfrac{1}{2}\bigg( 2\bar x + \sqrt{2s^2} \bigg)\\ $$

Let's do a quick check in software.

x1 <- 4
x2 <- 6
x <- sort(c(x1, x2))
xbar <- mean(c(x1, x2))
s2 <- var(c(x1, x2))
x1_solved <- (1/2) * (2*xbar - sqrt(2*s2))
x2_solved <- (1/2) * (2*xbar + sqrt(2*s2))
x_solved <- sort(c(x1_solved, x2_solved))
x == x_solved

This should reveal why it is problematic to figure out the original values from just the mean, standard deviation, and sample size, however. You wind up with two equations but more then two unknowns, so there are multiple solutions.

If you have two points where $\bar x = 5.6$ and $s = 0.13$, then you can apply my code to solve that the points are $5.50807611844575$ and $5.69192388155425$.

Related Question