Reduced Chi2 for model goodness of fit

56 Views Asked by At

I'm currently trying to understand how I could potentially use reduced chi square ($_r\chi^2$) as a goodness of fit measure for the following (simplified) scenario:

Scatterplot of data

Whereby I have data ($y_i$) that is normally distributed around three mean values:

  • $\mu_0 = 0$, $\mu_1 = 2$ and $\mu_2 = 3$
  • with associated standard deviations $\sigma_0 = \sigma_1 = 1$ and $\sigma_2 = 3$
  • there are $n_0 = 267$ values in the first case, $n_1 = 81$ in the second and $n_1 = 75$ in the third.

Say my first model estimates that there are two means:

  • $\mu^{model1}_0 = 1$ and $\mu^{model1}_1 = 2.5$ and assigns all $n_1$ and $n_2$ values to the latter
  • resulting in $\sigma^{model1}_0 = 1$ and $\sigma^{model1}_1 \approx 2.14$.

Would it be correct to say that:

$\chi^2 = \sum_0^{n_0}(y_i-\mu^{model1}_0)/{\sigma^{model1}_0}^2 + \sum_{n_0+1}^{n_1 + n_2}(y_i-\mu^{model1}_1)/{\sigma^{model1}_1}^2 \approx n_0 + n_1 + n_2 -2$

?

Or should I be dividing by the total variance? I subtract 2 as this is the number of means fitted. Appreciate any help if I'm making obvious errors in reasoning.