# Sum of N two-component mixture variates

I have a list of random variables, $X_1$, $X_2$, ..., $X_N$, associated with binary random variables $A_i$ such that $P(A_i) = \pi$ is known. I also know that, for all $i$ $$X_i|A_i\sim f(x)\\ X_i|\bar A_i\sim g(x)$$ where $f$ and $g$ are known, and thus the distribution of the $X_i$ is a mixture given by $$p(x) = \pi\cdot f(x) + (1-\pi)\cdot g(x)$$ Is there a general expression for the distribution of $Y=\sum_{i=1}^N X_i$?

If you denote by $$g^m\ast f^k$$ the convolution of $m$ $g$'s and $k$ $f$'s, meaning the density of the distribution of the sum of $m$ realisations of $X\sim g(x)$ and $k$ realisations of $X\sim f(x)$, with for instance $$g^0\ast f^1=f\,,\quad g^1\ast f^0=g\,,$$ \begin{align*}(g^m\ast f^k)(x)&=\int (g^{m-1}\ast f^k)(x-y)g(y)\,\text{d}y\\&=\int (g^{m}\ast f^{k-1})(x-y)f(y)\,\text{d}y\,,\end{align*}the density of the sum of $n$ variables from the mixture with density$$\pi g(x) + (1-\pi) f(x)$$is
$$\sum_{m=0}^n {n \choose m}\pi^m(1-\pi)^{n-m} (g^m\ast f^{n-m})(x)$$
For instance, if $g$ is the density of a N$(0,1)$ distribution and $f$ the density of a N$(\mu,\sigma^2)$ distribution, we have that $(g^m\ast f^{n-m})$ is the density of a $$\text{N}\{(n-m)\mu,(n-m)\sigma^2+m\}$$ distribution, hence the above sum has for distribution $$\sum_{m=0}^n {n \choose m}\pi^m(1-\pi)^{n-m} \text{N}\{(n-m)\mu,(n-m)\sigma^2+m\}$$