The mixture distribution in general is defined as following:

Suppose that we have \(k\) distributions with respective pdfs \(f_1(x), f_2(x), . . . , f_k(x)\),with supports \(\mathcal{S_1, S_2, . . . , S_k}\), means \(\mu_1, \mu_2, . . . , \mu_k\), and variances \(\sigma_1^2, \sigma_2^2,...,\sigma_k^2\), with positive mixing probabilities \(p_1, p_2, . . . , p_k\), where \(p_1 + p_2 + · · · + p_k = 1\). Let \(\mathcal{S} = \bigcup_{i=1}^k \mathcal{S_i}\), the function

\[f(x)=p_1f_1(x)+p_2f_2(x)+...+p_kf_k(x)=\sum_{i=1}^kp_if_i(x), x\in\mathcal{S}\] can be a pdf for a random variable \(X\), since we can see

\[\int_{-\infty}^{\infty}f(x)dx=p_1\int_{-\infty}^\infty f_1(x)dx+p_2\int_{-\infty}^\infty f_2(x)dx+...+p_k\int_{-\infty}^\infty f_k(x)dx=p_1+p_2+...+p_k=1\] Note, the mixture distribution is mixed with different \(pdf\)s i.e. \(f_i(x)\), it has nothing to do with linear combination of random variables i.e \(\sum a_iX_i\)

The \(cdf\) of \(X\) is:

\[F(x)=\sum_{i=1}^kp_iF_i(x), x\in\mathcal{S}\] The mean of \(X\) is:

\[E(X)=\int_{-\infty}^{\infty}x\sum_{i=1}^kp_if_i(x)dx=\sum_{i=1}^kp_i\left [\int_{-\infty}^{\infty}xf_i(x)dx\right]=\sum_{i=1}^k p_i\mu_i=\bar{u} \tag{1}\] The variance of \(X\) is:

\[Var(X)=E\left[(X-\bar{\mu})^2\right]=\int_{-\infty}^\infty (x-\bar{u})^2\sum_{i=1}^kp_if_i(x)dx=\sum_{i=1}^k \left[ p_i\int_{-\infty}^\infty(x-\bar{u})^2f_i(x)dx\right]\\=\sum_{i=1}^k \left[ p_i\int_{-\infty}^\infty(x-\mu_i+\mu_i-\bar{u})^2f_i(x)dx\right]=\sum_{i=1}^k \left[ p_i\int_{-\infty}^\infty \left [(x-\mu_i)^2+2(x-\mu_i)(\mu_i-\bar{\mu})+(\mu_i-\bar{u})^2\right ]f_i(x)dx\right]\\=\sum_{i=1}^k p_i\int_{-\infty}^\infty (x-\mu_i)^2dx+\sum_{i=1}^k p_i\int_{-\infty}^{\infty}(\mu_i-\bar{u})^2f_i(x)dx+2\sum_{i=1}^k p_i\int_{-\infty}^\infty(x-\mu_i)(\mu_i-\bar{\mu})f_i(x)dx \tag{2}\] Note, the integral of cross produce term at the last step of \((1)\) is zero, since

\[\int_{-\infty}^\infty(x-\mu_i)(\mu_i-\bar{\mu})f_i(x)dx=(\mu_i-\bar{\mu})\left [\int_{-\infty}^\infty xf_i(x)dx -u_i\int_{-\infty}^\infty f_i(x)dx\right]=(\mu_i-\bar{\mu})(\mu_i-\mu_i)=0\] Therefore, \[Var(X)=\sum_{i=1}^k p_i\int_{-\infty}^\infty (x-\mu_i)^2dx+\sum_{i=1}^k p_i\int_{-\infty}^{\infty}(\mu_i-\bar{u})^2f_i(x)dx=\sum_{i=1}^kp_i\sigma_i^2+\sum_{i=1}^k p_i(\mu_i-\bar{\mu})^2\]

The mixture of distributions is sometimes called compounding. Moreover, it does not need to be restricted to a finite number of distributions. A continuous weighting function, which is of course a pdf,can replace \(p_1, p_2, . . . , p_k\); i.e., integration replaces summation. we can think of the original distribution of \(X\) as being a conditional distribution given \(\theta\), whose \(pdf\) is denoted by \(f(x|θ)\). Then the weighting function is treated as a \(pdf\) for \(\theta\), say \(g(\theta)\). Accordingly, the joint pdf is \(f(x|\theta)g(\theta)\), and the compound pdf can be thought of as the marginal (unconditional) \(pdf\) of \(X\), \[h(x) =\int_\theta g(θ)f(x|θ) dθ\], where a summation replaces integration in case \(\theta\) has a discrete distribution.

An example, suppose, that \(X_1\) is \(\log\Gamma(\alpha_1,\beta_1)\), \(X_2\) is \(\Gamma(\alpha_2,\beta_2)\), and the mixing probabilities are \(p\) and \((1-p)\). Then the pdf of the mixture distribution is.

\[f(x)=\begin{cases} \frac{1-p}{\beta_2^{\alpha_2}\Gamma(\alpha_2)}x^{\alpha_2-1}e^{-x/\beta_2}, & \text{0<x<1} \\ \frac{p}{\beta_1^{\alpha_1}\Gamma(\alpha_1)}(\log x)^{\alpha_1-1}x^{-(\beta_1+1)/\beta_1} +\frac{1-p}{\beta_2^{\alpha_2}\Gamma(\alpha_2)}x^{\alpha_2-1}e^{-x/\beta_2}, & \text{1<x} \\ 0 & \text{elsewhere} \end{cases}\]

From \((1)\) we get

\[\begin{align} E(X)&=\sum_{i=1}^kp_i\int_{-\infty}^\infty xf_i(x)dx \\ &=\int_0^1 \frac{1-p}{\beta_2^{\alpha_2}\Gamma(\alpha_2)}x^{\alpha_2-1}e^{-x/\beta_2}xdx+\int_1^\infty\frac{p}{\beta_1^{\alpha_1}\Gamma(\alpha_1)}(\log x)^{\alpha_1-1}x^{-(\beta_1+1)/\beta_1}xdx +\int_1^\infty\frac{1-p}{\beta_2^{\alpha_2}\Gamma(\alpha_2)}x^{\alpha_2-1}e^{-x/\beta_2}xdx\\ &=\int_0^1 \frac{1-p}{\beta_2^{\alpha_2}\Gamma(\alpha_2)}x^{\alpha_2-1}e^{-x/\beta_2}xdx +\int_1^\infty\frac{1-p}{\beta_2^{\alpha_2}\Gamma(\alpha_2)}x^{\alpha_2-1}e^{-x/\beta_2}xdx+\int_1^\infty\frac{p}{\beta_1^{\alpha_1}\Gamma(\alpha_1)}(\log x)^{\alpha_1-1}x^{-(\beta_1+1)/\beta_1}xdx\\ &=\int_0^\infty \frac{1-p}{\beta_2^{\alpha_2}\Gamma(\alpha_2)}x^{\alpha_2-1}e^{-x/\beta_2}xdx +\int_1^\infty\frac{p}{\beta_1^{\alpha_1}\Gamma(\alpha_1)}(\log x)^{\alpha_1-1}x^{-(\beta_1+1)/\beta_1}xdx\\ &=(1-p)\alpha_2\beta_2+p(1-\beta_1)^{-\alpha_1} \end{align}\]

The second part the last step can be found from here.1 The variance the mixture distribution can be calculated by the last step of \((2)\) and reference 1.


  1. https://rpubs.com/enwuliu/986431↩︎