The chi² distribution is the sum of n random standard normal variables. It's used for example to know if a distribution fits the uniform distribution by taking the sum of the squared difference between the observed frequency of a value and the expected frequency of a value divided by the expected frequency of a value. By doing this I assume that this is because the difference between the observed frequency and the expected frequency must be standard normally distributed. My question is: why is that difference standard normally distributed? And if it's not standard normally distributed why is the sum of the squared differences chi²-distributed?

Thank you very much for your attention to this matter.