Given a multi-variate distribution $P(\mathbf{x},\mathbf{y})$, I would like to obtain the marginal distribution
$$P_m(\mathbf{x})=\sum\int_{\mathbf{y}}P(\mathbf{x},\mathbf{y})W(\mathbf{y})$$
In my specific application $P$ depends on three variables (and is discrete) and $W$ only on one (and is a continuous Gauss-distribution with given mean and variance).
Mathematica comes with the built-in
MarginalDistribution[dist,{k1,k2,…}]
which seems to do this for $W(y)=1$. Is there any other function which does what I need or a compact way to implement this as a module?