Is sum of squares of normally distributed Random variables follow Chi square distribution?

Actually standardized variable z of x(which has a normal distrbution) is (x - E(x))/squareroot(E(x-E(x)) ^ 2)

In chi-square distribution we have that sum of squares of unit normal distribution variables follows a chi-square distribution.

z1^2 + z2^2 + z3^2 + .... +zn^2 ~ chi-square distribution.

So regarding the doubt I have.. Sample variance S^2 = 1/n-1 * [(x1 - xbar)^2 + (x2 - xbar)^2 +(x3 - xbar)^2 + .... + (xn - xbar)^2] ---------> (1)

Xbar => sample mean

=> (n-1)*S^2 = [(x1 - xbar)^2 + (x2 - xbar)^2 +(x3 - xbar)^2 + .... + (xn - xbar)^2] ---------> (2)

Dividing with sigma^2(population variance) on both sides...

=>[(n-1)*S^2]/sigma^2 = [(x1 - xbar)^2/sigma^2 + (x2 - xbar)^2/sigma^2 +(x3 - xbar)^2/sigma^2 + .... + (xn - xbar)^2/sigma^2]---------> (3)

=>*[(n-1)S^2]/sigma^2 = [((x1 - xbar)/sigma)^2 + ((x2 - xbar)/sigma)^2 +((x3 - xbar)/sigma)^2 + .... + ((xn - xbar)/sigma)^2]---------> (4)

since.. (xi - xbar)/sigma) = zi

*[(n-1)S^2]/sigma^2 = [(z1)^2 + (z2)^2 +(z3)^2 + .... + (zn)^2]---------> (5)

In this line I have the doubt.. actually z is (x - population mean)/population standard deviation but in the above step 4 the value was (xi - xbar)/population standard deviation but xbar is the sample mean not the population mean which is E(xi) then also it was considered as z in step 5

How is this possible if we replace the population mean with sample mean then also it gives a z-variable?

• Hi: If $x_n$ is normal and $\sigma$ is known, then, if $n$ is large enough, then the standardized variable using $\bar{x}$ is the standardized normal because of slutsky's theorem. This is because $\bar{x}$ will converge to $\mu$. If $n$ is not large enough, then $\mu$ needs to be known and used because slutsky's theorem can't be applied because convergence doesn't hold. Jul 7 '21 at 7:59
• Note that, even when $n$ is large, the degrees of freedom decreases by 1 ( it's $n$-1 ) when using $\bar{x}$ in the calculation of say the sample variance, $S^2$. Jul 7 '21 at 14:11