Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In this problem I'm doing it says

Suppose that $(X,Y)$ is uniformly distributed over the region {$(x,y):0\lt |y|\lt x\lt 1$}. Find the marginal densities $f_X(x)$ and $f_Y(y)$

Does the absolute value even matter here since it's all between $0$ and $1$ anyway? How is the answer $f_X(x)=2x$?

share|cite|improve this question
The absolute value definitely matters. It says the region includes, for example, $(2/3,-1/3)$, which it wouldn't do if the problem said $0\lt y\lt x\lt1$. For the main question, what do you know about computing marginal densities? How would you go about doing that? – Gerry Myerson Nov 18 '12 at 22:45
Draw a sketch of the region in the $x$-$y$ plane over which $(X,Y)$ is uniformly distributed. If you think of the joint density as a (right triangular) prism sitting on the plane, then $f_X(x)$ is the area of the cross-section of the prism at $x$. (hint: cross-section is a rectangle of height $1$ and base length? that you can read of from the sketch that you probably will not bother to draw.) – Dilip Sarwate Nov 18 '12 at 22:49
@GerryMyerson I see what you mean, thats a good point, thank you for the clairification. I would evaluate this integral: $2\int_0^1 f(x,y) dy$ for the marginal distribution of $X$, and f(x,y)=1 anyway. Which now makes $f_X(x)=2x$ clear. – TheHopefulActuary Nov 18 '12 at 22:51
@Kyle ...and $2\int_0^1f(x,y)dy$ is not what you need to evaluate to find $f_X(x)$, though in this instance, because of the symmetry it gives the right answer. You should evaluate $$f_X(x) = \int_{-\infty}^\infty f(x,y)\,\mathrm dy = \int_{-x}^x 1\,\mathrm dx = 2x ~ \text{for}~0 < x < 1.$$ – Dilip Sarwate Nov 18 '12 at 22:56
@Kyle ...and once again, brief consideration of the sketch that you did not bother to draw will reveal that $f_Y(y)$ is an even function of $Y$ and so $E[Y] = 0$ without it being necessary to integrate, or more sedately, that $f_Y(y)$ is nonzero for $y \in (-1,1)$ and so the integral must have limits $\pm 1$. – Dilip Sarwate Nov 19 '12 at 2:33
up vote 1 down vote accepted

In response to the OP's request

As Gerry Myerson pointed out, the absolute value sign does matter, and as Michael Hardy's answer clarifies in more detail, the joint density $f_{X,Y}(x,y)$ has nonzero constant value $c$ on the region $$\{(x,y) \colon -x < y < x, 0 < x < 1\},$$ that is, on the interior of a right triangle with vertices $(0,1), (1,1), (1,-1)$. As I suggested in my comments on the question, sketching the $x$-$y$ plane and marking this triangle on it is very helpful as an aid to thought, and in this particular problem, makes the computations very simple. In fact, it is even better if one can visualize the joint density as a solid sitting on the $x$-$y$ plane whose volume must necessarily equal $1$. In this instance, the solid is a right triangular prism of height $c$, and since the triangular base has area $1$, the height $c$ must also equal $1$.

For any fixed $x$, the marginal density $f_X(x)$ is given by $$f_X(x) = \int_{-\infty}^\infty f_{X,Y}(x,y)\,\mathrm dy$$ which is, of course, the area of the cross-section of the of the joint density solid if we were to slice the solid by a plane parallel to the $y$-$z$ plane and at distance $x$ from the $y$-$z$ plane. For $0 < x < 1$, the cross-section is a rectangle of height $1$ and base extending from $y=-x$ to $y = x$, and so the area is $2x$. For $x\leq 0$ or $x \geq 1$, the cross-section is $0$. Thus we get $$f_X(x) = \begin{cases}2x, &0 < x < 1,\\ 0, &\text{otherwise.}\end{cases}$$ A similar calculation can be done to obtain the marginal density $f_Y(y)$. Now, for $0 \leq y < 1$, the cross-section has base extending from $x = y$ to $1$, and hence the area is $1-y$, while for $-1 < y \leq 0$, the cross-section has base extending from $x = -y$ to $1$, and hence the area is $1+y$. Thus, we have $$f_Y(y) = \begin{cases}1-y, &0 \leq y < 1,\\ 1+y, &-1 < y < 0,\\ 0, &\text{otherwise.}\end{cases}$$ As a check on one's work, it is easy to sketch the density functions and verify that they are nonnegative functions and the "area under the curve" is $1$, that is, we have found valid density functions and thus have not made any glaringly obvious errors in computation.

Finally, to compute $E[Y]$, one can of course use the standard formula $$E[Y] = \int_{-\infty}^\infty y f_Y(y)\,\mathrm dy = \int_{-1}^0 y(1+y)\,\mathrm dy + \int_{0}^1 y(1-y)\,\mathrm dy$$ and work out that $E[Y]=0$, but it is also possible to avoid integration at all by considering that since $f_Y(y)$ is an even function, the integral of the odd function $yf_Y(y)$ over the finite interval $(-1,1)$ must necessarily be $0$. But be sure to remember that this argument must be used with care if the integral is over the entire real line. See, for example, this question and its answers.

share|cite|improve this answer

$$ 0<|y|<x<1 $$ is the same as $$ 0<x<1\text{ and for each value of $x$, }-x<y<x. $$ The absolute value is redundant in the inequality $0<|y|$ (we don't care whether it's "$<$" or "$\le$" since the probability of being exactly equal is $0$ either way). But the absolute value matters in the inequality $|y|<x$, and the "$0<$" is there in order to tell us that $0<x$.

As for your question about the marginal density: Let $f_X$ and $F_X$ be respectively the marginal density and the marginal cumulative distribution function. Then $$ f_X(x) = \frac{d}{dx} F_X(x) = \frac{d}{dx} \Pr(X\le x) = \frac{d}{dx} \frac{\text{area of one triangle}}{\text{area of another triangle}}. $$ Draw the two triangles and you'll see it.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.