::<math>m_{y}(x) = \int_y p(x,y) \, dy = \int_y c(x|y) \, p(y) \, dy </math>
::<math>m_{y}(x) = \int_y p(x,y) \, dy = \int_y c(x|y) \, p(y) \, dy </math>
−
where ''p''(''x'',''y'') gives the [[joint probability density function]] of ''x'' and ''y'', and ''c''(''x''|''y'') gives the [[conditional probability density function]] for ''x'' given ''y''. The second integral was formulated by use of the [[Bayesian product rule]]. Note that the marginal distribution has the form of an [[expectation value]].
+
where ''p''(''x'',''y'') gives the [[joint probability density function]] of ''x'' and ''y'', and ''c''(''x''|''y'') gives the [[conditional probability density function]] for ''x'' given ''y''. The second integral was formulated by use of the [[Bayesian product rule]]. Note that the marginal distribution has the form of an [[expectation value]]. This marginalization procedure readily generalizes for an arbitrary number of variables or parameters.
For a discrete [[probability mass function]] (pmf), the marginal probability for x<sub>k</sub> can be written as ''p''<sub>''k''</sub> Such that
For a discrete [[probability mass function]] (pmf), the marginal probability for x<sub>k</sub> can be written as ''p''<sub>''k''</sub> Such that