When do I use N for the variance of x-bar instead of n-1

248 Views Asked by At

if the $X_i$'s are all normally distributed

always

if the $X_i$'s are independent of each other

if the $X_i$'s are identical distributed

1

There are 1 best solutions below

0
On BEST ANSWER

In the simulation below (using R), we have $X_1 = \sqrt{12}\,U,$ where $U\sim\mathsf{Unif}(0,1);$ $X_2 \sim \mathsf{Norm}(0,1);$ $X_3\sim\mathsf{Exp}(1),$ the exponential distribution with rate $1.$ That is, the $X_i$ are independent and $Var(X_1) = Var(X_2) = Var(X_3) = \sigma^2 = 1.$ The simulation illustrates that $$Var(\bar X) = Var\left[\frac 13(X_1+X_2+X_3)\right] = \frac 19 Var[X_1+X_2+X_3]\\ = \frac 19 [\sigma^2+\sigma^2+\sigma^2] =\frac{\sigma^2}{3} = \frac 13,$$ where independence is used to get from the first line above to the second. [Note that $Var(X+Y) = Var(X)+Var(Y),$ if $X$ and $Y$ are independent.]

The $X_i$ are not all normally distributed, are not identically distributed, and are independent. Also, the equation in your Question is true for my random variables. So what do you think?

set.seed(2020)
m = 10^6
x1 = runif(m)*sqrt(12)
x2 = rnorm(m)
x3 = rexp(m)
a = (x1 + x2 + x3)/3  # sample mean
var(a)
[1] 0.3328322         # aprx Var(A) = 1/3