Understanding chi squared minimization

141 Views Asked by At

I have a basic Chi squared:

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

I ask myself for which $\sigma$ and $\mu$ my function $X^2$ is minimal, so I suppose this is when the derivate of $X^2$ versus $\sigma$ and $\mu$ equals $0$.

$\frac{\partial(X^2)}{\partial \mu}=0$ and $\frac{\partial(X^2)}{\partial \sigma}=0$

So if I am not wrong: $$\frac{\partial(X^2)}{\partial \mu} = \sum_{i=1}^N\frac{-2(x_i-\mu)}{\sigma^2}=0$$

and $$\frac{\partial(X^2)}{\partial \sigma} = -\frac{2}{\sigma^3} \sum_{i=1}^N(x_i-\mu)^2=0$$

So for which value of mu and sigma $X^2$ is minimal ? I am a little bit lost in here (sorry I am not very good in statistics), Can you help me ? Because I found $\sigma=\infty$ and $\mu=\sum_{i=1}^N(x_i)/N$, but by definition $\sigma$ is not $\infty$ so I must be wrong somewhere...

Any help would be great, thanks in advance!