enter image description here Hello everyone,
I've been learning about the $\chi²$-distribution and I was wondering ...
If I take a sample of size $n$ from a distribution defined by $N(\mu,\sigma^2)$ I know $(n-1)\frac{S^2}{\sigma^2} \sim \chi^2_{n-1}$. Now, on the Dutch wikipedia page on the chi-squared distribution, the following identity is shown: https://i.stack.imgur.com/pIWr1.png
I don't get the second identity. Why is $(X_{i}-\bar{X})^2=(X_{i}-\mu)^2-(\sqrt{n} (\bar{X}-\mu))^2$? I'd love to get this.
Thanks in advance!
Joshua
\begin{align} \sum_i (X_i - \mu)^2 &= \sum_i (X_i - \bar{X} + \bar{X} - \mu)^2 \\ &= \sum_i (X_i - \bar{X})^2 + 2(\bar{X} - \mu)\underbrace{\sum_i (X_i - \bar{X})}_{=0} + n (\bar{X} - \mu)^2. \end{align} Rearrange and divide by $\sigma^2$ to obtain your desired equality.