1
$\begingroup$

Consider the joint density function:

$$f(x,y) = \begin{cases} 2 & & \text{for } 0 \leq x \leq1 \text{ and } 0 \leq y \leq 1-x, \\[6pt] 0 & & \text{otherwise}. \end{cases}$$

From this joint density I figured out the following marginal densities:

$$f_X(x) = 2(1-x),\\ f_Y(y) = 2.$$

The marginal density $f_Y$ is supposedly wrong, as the solutions provided to me say to calculate $\int^{1-y}_0 2 \, dx$. I don't see why I need to integrate over $[0, 1-y]$ and not over $[0,1]$. I thought the range for $x$ does not depend on $y$, or does it?

$\endgroup$
  • $\begingroup$ If this is homework, please add the self-study(stats.stackexchange.com/tags/self-study/info) tag. $\endgroup$ – StubbornAtom Dec 18 '18 at 20:29
  • 4
    $\begingroup$ Please: draw a picture showing where $f(x,y)$ is nonzero. That will easily answer your questions. $\endgroup$ – whuber Dec 18 '18 at 20:50
  • $\begingroup$ @StubbornAtom no it is not homework. this is just a practice exercise, I choose to do myself. $\endgroup$ – thebilly Dec 18 '18 at 21:34
  • $\begingroup$ @whuber I get a line with the equation y = -x+1 right? When $x = 1$ $y = 1-(x=1) = 0$ I don't quite get yet, how this answers my question. Could you please give me another hint? $\endgroup$ – thebilly Dec 18 '18 at 21:37
  • $\begingroup$ How did you integrate to find f(x)? What does 0 $\le$ y $\le$ (1-x) imply in terms of the random variable X and not Y? By integrating over [0,1] you are not integrating over the region specified in the question for the joint density but the region for the marginal density of Y. $\endgroup$ – aranglol Dec 18 '18 at 22:01
1
$\begingroup$

Comment: I simulated the joint distribution as an easy way to make the plot suggested in a previous comment. Before beginning to set limits on double integrals it is usually a good idea to sketch such a picture as a guide. I have shown R code for the first of the three plots.

set.seed(1218); m = 10^5
x1 = runif(m);  y1 = runif(m)
cond = (y1 <= 1 - x1)
x = x1[cond];  y = y1[cond]
plot(x, y, pch=".")

enter image description here

The simulation and plots are for orientation, and are not an exact solution to your problem. For exact solutions, maybe the first thing to do is to try to integrate the joint density $f(x,y) = 2$ over the triangular region to make sure the integral is $1,$ as required for a density function.

Then try integrating over $x$ to find the marginal density of $Y,$ which is suggested by the red line superimposed on the histogram in the third plot.

$\endgroup$
0
$\begingroup$

You wrote: $$ \text{for } 0 \leq x \leq1 \text{ and } 0 \leq y \leq 1-x $$ That tells you the region over which you integrate.

You want to integrate out $x$ with $y$ fixed.

So you need those values of $x$ for which $0\le x\le1$ and $0\le y \le 1-x.$ Notice that $y\le 1-x$ is equivalent to $x \le 1-y.$

$\endgroup$
  • $\begingroup$ Okay. So whenever I have this sort of relationship between x and y regarding the domain I need to have this relationship in both integration intervals? $\endgroup$ – thebilly Dec 19 '18 at 9:08
  • $\begingroup$ When doing single integration, limits on integral sign need to show $x$-interval over which integration extends. For double integral, limits on two integral signs need to show $(x,y)$ region over which integration extends. $\endgroup$ – BruceET Dec 24 '18 at 1:41
  • $\begingroup$ @thebilly : This is probably clearer if the constraint on $x$ and $y$ is not symmetric in the two variables. Suppose you have $0\le x \le 1$ and for each value of $x$ in that interval you have $0\le y \le 3(1-x).$ Then$\,\ldots\qquad$ $\endgroup$ – Michael Hardy Dec 25 '18 at 19:26
  • $\begingroup$ $\ldots\,\,$you have $$ \begin{align} & \int_0^1\left( \int_0^{3(1-x)} \cdots\cdots \, dy \right) \, dx \\ \\ = {} & \iint\limits_{\left\{ (x,y) \,:\, \begin{smallmatrix} 0 \, \le \, x \,\le\, 1 \\ \&\ 0\,\le\,y\,\le\, 3(1-x) \end{smallmatrix} \right\}} \quad \cdots\cdots \, d(x,y) \\ \\ = {} & \iint\limits_{\left\{ (x,y) \,:\, 0\,\le\, x\,\le\, \frac{3-y} 3 \,\le\, 1 \right\}} \quad \cdots\cdots \, d(x,y) \\ \\ = {} & \int_0^3 \left( \int_0^{(3-y)/3} \cdots\cdots \, dx \right) \, dy. \end{align} $$ $\endgroup$ – Michael Hardy Dec 25 '18 at 19:32
  • $\begingroup$ In other words, if you have $x$ going from $0$ to $1$ and then for any fixed value of $x$ you have $y$ going from $0$ to $3(1-x),$ and that's the same as saying $y$ is between $0$ and $3,$ and for each fixed value of $y$ between $0$ and $3$ you have $x$ going from $0$ to $(3-y)/3. \qquad$ $\endgroup$ – Michael Hardy Dec 25 '18 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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