# non-central chi-square distribution.

#### Jesmin

##### New Member
If $$X_i$$ is distributed as normal with mean $$\mu$$ and variance-covariance matrix $$D$$,where $$D$$ is the diagonal matrix, then show that $$X^TD^{-1}D$$ is distributed as noncentral $$\chi^2$$ with k degrees of freedom and noncentrality parameter $$\mu^TD^{-1}\mu=\lambda.$$

#### Jesmin

##### New Member
Not sure which definition of non-central $$\chi^2$$ you are using.
I am using the definition of wiki.
can you please explain the above problem .

#### BGM

##### TS Contributor
By independence (and as indicated by the question $$D$$ is a diagonal matrix),

$$D = \begin{bmatrix} \sigma_1^2 & 0 & \ldots & 0 \\ 0 & \sigma_2^2 & \ldots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \ldots & \sigma_k^2 \end{bmatrix}$$

and thus its inverse is

$$D^{-1} = \begin{bmatrix} \displaystyle \frac {1} {\sigma_1^2} & 0 & \ldots & 0 \\ 0 & \displaystyle \frac {1} {\sigma_2^2} & \ldots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \ldots & \displaystyle \frac {1} {\sigma_k^2} \end{bmatrix}$$

Now you merely need to use basic matrix multiplication to verify that

$$X^TD^{-1}X = \begin{bmatrix} X_1 & X_2 & \ldots & X_k \end{bmatrix} \begin{bmatrix} \displaystyle \frac {1} {\sigma_1^2} & 0 & \ldots & 0 \\ 0 & \displaystyle \frac {1} {\sigma_2^2} & \ldots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \ldots & \displaystyle \frac {1} {\sigma_k^2} \end{bmatrix} \begin{bmatrix} X_1 \\ X_2 \\ \vdots \\ X_k \end{bmatrix}$$ $$= \sum_{i=1}^k \left(\frac {X_i} {\sigma_i}\right)^2$$

which by definition follows a non-central $$\chi^2$$ distribution with $$k$$ degrees of freedom. The method to verify the non-centrality parameter $$\lambda$$ is similar.