# Distribution of sum of mean squared errors - weighted sum of chi squared distributed variables

Suppose $X,Y$ are independent chi-squared distributed random variables with $m,n$ degrees of freedom, $X \sim \chi^2(m)$ and $Y \sim \chi^2(n)$. What is the distribution of

$$Z = \frac{1}{m} X + \frac{1}{n} Y$$.

Is there a closed formula or an approximation? Is there a generalisation to a sum of more than two terms?

The Chi-squared distribution $\chi^2(\nu)$ is the the Gamma distribution ${\cal G}(\nu/2,1/2)$. Then $\frac{1}{m}X \sim {\cal G}(m/2,m/2)$ and $\frac{1}{n}Y \sim {\cal G}(n/2,n/2)$. These are Gamma distributions with different rate parameters (the second parameter) when $m \neq n$, and there is no closed-form formula (or formula in terms of elementary functions) for the convolution (sum of two independent) of these distributions.