*Bounty: 150*

*Bounty: 150*

Given a linear model where $Y=Xbeta+e$ and $esim N(0,Omega^{-1})sim N(0,sigma^2W^{-1})$, where $W_{ii}=w_i=frac{sigma^2}{sigma_i^2}$ and $Omega=frac{1}{sigma_i^2}$ .

Assume that, thanks to a lot of repeated measurements, we know the underlying measurement uncertainties $sigma_i$ of my response variable in the i-th measured point. We measure a total of $n$ points

Given Heteroskedasticity we use weigthed least squares.

The residual analysis yields good results, showing that the residuals are independent and normally distributed, and that the weights enable studentized residuals with constant variance.

Now what is the best way to assess the goodness of fit ?

1.) **Reduced chi-square**: $chi_{red}^2$ should be close to 1. (1) (2)

$$chi_{red}^2 = frac{chi^2}{nu} = frac{r’Omega r}{nu} = frac{1}{nu} cdot sum_i^nfrac{ r_i^2}{sigma_i^2} $$

N.B.: This corresponds to a comparison of the unbiased estimate of error variance $hat{sigma}^2$ and the known mean measurement uncertainty $sigma^2$.

$$ frac{hat{sigma}^2}{sigma^2} = frac{r’Wr}{nu} cdot frac{1}{sigma^2} = frac{ frac{1}{nu} sum_i^n r_i^2 cdot w_i}{sigma^2} = frac{ frac{1}{nu} sum_i^n r_i^2 cdot frac{sigma^2}{sigma_i^2}}{sigma^2} = frac{1}{nu} cdot sum_i^nfrac{ r_i^2}{sigma_i^2} $$

or

2.) Evaluation of the **variance of the standardized/studentized Residuals**, which should be close to 1. Note that the value for $sigma$ would be the one geven by the prior repeated measurements and not the MSE, where:

Standardized Residuals $sim mathcal{N}(0,,1)$, so $Var(r_{i,Stand}) approx 1$

$$r_{i,Stand} = frac{r_i}{sigma}$$

Internally studentized Residuals:

$$ r_{i,ExtStud} = frac

{r_i}{var(r_i)} = frac{r_i}{sqrt{sigma^2 (frac{1}{w_{i}} – H_{ii})}}$$

Externally studentized Residuals $sim t(nu)$, so $Var(r_{i,IntStud}) approx frac{nu}{nu-2}$

$$ r_{i,IntStud} = frac{r_i}{sqrt{sigma_{(i)}^2 (frac{1}{w_{i}} – H_{ii})}} $$

or another alternative ?