i tried to get a clearer understanding of the standard error by constructing a hypothetical population consisting of the following values: 1, 3, 5, 7. i calculated the sample means of all samples with a size = 2. as expected, the mean of all sample means was equal to the population mean (4). however, the standard deviation of the sample means (1.633)--also known as the standard error of the mean was not equal to the population standard deviation (2.58) divided by the square root of the sample size (square root of 2) which was 1.825. but, i discovered that the variance of the sample variances was 5.33 and the standard deviation of the samples variances was 2.31. dividing 2.31 by the square root of the sample size (square root of 2) yielded a value of 1.633 which is identical to the standard deviation of the sample means.

i am bit confused because the standard error according to most authors is the population standard deviation divided by the square root of the sample size. however, in this case the standard error is equal to the standard deviation of the sample variances divided by the square root of the sample size.

i would appreciate if you could help me on this matter.

thank you.

  • 1
    $\begingroup$ You are not computing variances correctly. The variance of $(1,3,5,7)$ is $5$ and the variance of the means of all its two-element samples (with replacement) is $5/2$, as expected. (This is the multiset $\{1^1,2^2,3^3,4^4,5^3,6^2,7^1\}$.) $\endgroup$
    – whuber
    Mar 1, 2013 at 22:07
  • $\begingroup$ @islander I know this is going to sound pedantic but I feel that you can never be too clear when dealing with these topics! As far as I am aware, you can't get the standard error of population parameters such as $\mu$ or $\sigma^2$, regardless of whether they are known or unknown. We can only get the standard error of their estimates, usually $\bar{X}$ or $s^2$. In these cases the standard error is the square root of the variance of these estimates (if I haven't described this correctly people should feel free to correct me). From the way the other respondents answered the question, it seems a $\endgroup$
    – EconStats
    Oct 14, 2013 at 23:05
  • $\begingroup$ EconStats - I think this is more of a comment than an answer. $\endgroup$
    – Glen_b
    Oct 14, 2013 at 23:32

1 Answer 1


I think you are running into problems here with "sample variance" and "population variance".

(remembering that s.d. is simply the square root of these)

The actual variance of a population is

$\sigma^2 = \frac{1}{N}\sum_{i=1}^N (x_i-\mu)^2$

while the sample estimate of the variance of a population is

$\hat{\sigma^2} = \frac{1}{N-1} \sum_{i=1}^N (x_i-\bar{x})^2$

Now in every day statistical life it is very rare that we actually have the full population to deal with, so most statistical packages give you the second definition by default. It would appear that you have given ${1,3,5,7}$ to a statistical package and asked for the sample standard deviation not the population standard deviation.

For example, in R:

> sd(c(1,3,5,7))
[1] 2.581989    #sample estimate

The actual figure you want is

> sqrt(sum((c(1,3,5,7)-4)^2)/4)
[1] 2.236068   # population standard deviation

Then for the standard deviation of your two sample means you need to do this:

> samples <- expand.grid(c(1,3,5,7),c(1,3,5,7))
> samples$m <- 0.5*(samples$Var1 + samples$Var2)
    > sd(samples$m)
[1] 1.632993
> sqrt(sum((samples$m-4)^2)/length(samples$m))
[1] 1.581139

And notice that

> 2.236068/sqrt(2)
[1] 1.581139

The key point to note here is that you have evaluated all possible sample means, and so again you have the population and must use the population variance calculation.

  • $\begingroup$ That was my best shot but there must be a better way to do that in R? I couldn't figure out how to take the mean across the data.frame? $\endgroup$
    – Corvus
    Mar 1, 2013 at 22:32
  • 2
    $\begingroup$ First, encapsulate the basic calculation, as in v <- function(x) mean(x^2) - mean(x)^2 for the population variance. Generate your data: a <- seq(1,7,2). Apply the variance to the data: v(a). Compare that to applying the variance to the set of means of samples: v(apply(expand.grid(a, a), 1, mean)). $\endgroup$
    – whuber
    Mar 1, 2013 at 23:05
  • $\begingroup$ thank you whuber and corone for the clear explanations. the errors in my calculations were in using n-1 as a divisor instead of n. so, when i divided the population sum of squares (20) by n (4) i got 5. taking the square root (2.2361) and dividing by the square root of the sample size (square root of 2) i got a standard error of 1.58. in the case of variance of all sample means, the total sum of squares (40) was divided by n (16) resulting in a quotient of 2.5, the square of which is 1.58. thus, the standard error in both calculations is 1.58. thank you, again. $\endgroup$
    – islander
    Mar 2, 2013 at 21:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.