# Distribution sum of correlated normal variables squared

I'm trying to deduce which distribution my data follows and how to estimate the parameters. I have four random variables $$X_i \sim N(\mu_i,\sigma_i^2)$$ where the means and variances are all different. The covariance of each possible pair of variables is not zero so this makes them not independent. Now I want to figure out what is the distribution of the variable f with f being:

$$f = \sum_{i=1}^4 (\frac{1}{4}-X_i)^2$$

So does anyone know the kind of distribution it follows and it's parameters? I think it will be a Gamma distribution but I have no idea how to estimate the parameters based on the means and variances of the $$X_i$$ variables. Thanks in advance!

• It's nasty--the distribution is the convolution of one non-central chi-squared distribution with the convolution of three (most likely) different gamma distributions. See stats.stackexchange.com/questions/72479 for the gammas to appreciate what goes on. You ought to consider procedures that don't require you to know the full distribution of $f.$ – whuber Mar 7 '20 at 13:50

This is essentially the same question as (sum of noncentral Chi-square random variables) when you change $$X'_i \sim N(\frac{1}{4} - \mu_i, \sigma_i^2)$$ and then $$f=\sum_i {X'}_i^2$$.
Compared to that question there is a complication of having the $$X'_i$$ as not independent of each other.
• Almost, but not quite: the complication is that the variances of the $X_i^\prime$ likely differ, whereas the answers in your first link apply only to the case where the variances are the same. It's unclear what you mean by "generalized chi-squared distribution" because your link goes to a non-article. – whuber Mar 7 '20 at 14:09