Given the following joint density:
for 10 < x < 20, x/2 < y < x.
To find the marginal density for X we do:
PDF[MarginalDistribution[ProbabilityDistribution[1/25 ((20 - x)/ x),
{x, 10, 20}, {y, x/2, x}], 1], x]
But this does nothing because the range of values for y
is dependent on x
and non-numeric.
But the marginal density w.r.t x
is just the value of the following integral:
Integrate[1/25 ((20 - x)/x ), {y, x/2, x}]
Which correctly gives
(20 - x)/50
If we now change the same for a different distribution with a numerical range:
PDF[MarginalDistribution[ProbabilityDistribution[2/3 (x + 2 y),
{x, 0, 1}, {y, 0, 1}], 1], x]
we get
Which is correct since:
Integrate[2/3 (x + 2 y), {y, 0, 1}]
gives:
2/3 + (2 x)/3
So my question is why doesn't the symbolic range work, if internally Mathematica is just doing the same integration I did above.?
1/25 ((20 - x)/(x y))
should be 1/25 ((20 - x)/(x)) ... though it does not change the substance of the issue you raise. $\endgroup$