Could someone explain intervals for density functions?

55 Views Asked by At

For example, given this question:

Let $X$ and $Y$ have joint density

$$f_{X, Y} (x, y) =\begin{cases} 6xy& 0 \leq y \leq x \leq 1\\ 0 & \text{otherwise }\\ \end{cases} $$

Find $E(X)$


Why is the integral

$$\int_{0}^{1} \int_{y}^{1} x f_{X, Y}(x, y) dx dy$$

and if it were $0 \leq x \leq y \leq 1$

would it be $$\int_{0}^{1} \int_{0}^{x} x f_{X, Y}(x, y) dx dy \text{ [not sure about this]}$$

and if it were:

$0 \leq x \leq y, 0 \leq y \leq5$

$$\int_{0}^{5} \int_{0}^{y} x f_{X, Y}(x, y) dx dy \text{ [Not sure about this either] }$$

Having a hard time envisioning these

3

There are 3 best solutions below

0
On BEST ANSWER

Instead of thinking about double integrals, it's easier to think about a single integral with respect to area. Say $A$ is a random point in the plane with density function $f_A$. Let $g$ be some real-valued function. Then we have:

$$E(g(A))=\int_{\mathbb R^2} g(a) f(a)da$$

In your case, $A=(X, Y)$, $g(x, y)=x$, then . This formula is quite intuitive because it's just a continuous version of the discrete formula: multiply each possible value by the probability of taking on that value, and sum. If $f(a)$ is zero outside of a certain region $U$ (meaning $A$ is in $U$ with probability $1$), then the integral gets a little simpler, but the intuition is still the same, we multiply every possible value by its probability, and sum:

$$E(g(A))=\int_{U} g(a) f(a)da$$

Now, as it turns out, one way to calculate a plane integral like this is to break it up into a double integral, one variable at a time. If we just write the integrand $g(a)f(a)$ as $h(a)$, we're just integrating $h$ over the whole plane. And in general, for any function $h$, we have:

$$\int_{\mathbb R^2} h(a)da=\int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty}h(x, y)dxdy$$

In discrete terms, to sum over all the values of a table, first sum each column one at a time, and then add up the sums of the columns. Note that technically this formula is not quite true "for any $h$", it's true for positive or bounded $h$, see Fubini's theorem. But nevertheless this is the intuition for where these double integrals are coming from: it's nothing specific to calculating expected values, it's just a standard formula for calculating multivariable integrals.

In your case, we're applying a variant of this formula due to the fact that we're integrating over a triangular shaped region. We're integrating the function $h(x,y)=xf(x, y)$ over the triangle $T=\{(x,y)|0\leq y\leq x \leq 1\}$, and I think you can probably visualize why this formula allows to do that:

$$\int_T h(a) da=\int_{0}^{1} \int_{y}^{1} h(x, y) dx dy$$

In the two variants on the problem that you propose, you're simply integrating over different regions. You just have to draw a picture of the region and look at whether your double integral really corresponds to integrating over that shape.

The key point is to remember that an expected value is just integrating over a certain region. To calculate that integral, you (1) identify the region, drawing a picture, and then (2), write down a double integral corresponds to that region. It seems to me like you're getting confused because you're basically skipping step (1).

0
On

For the first term,$$\int_{0}^{1} \int_{y}^{1} x f_{X, Y}(x, y) dx dy$$

$y$ takes value from $0$ to $1$, and upon fixing $y$, $x$ takes value from $y$ to $1$ in the domain.

If it were $0 \leq x \leq y \leq 1$

$$\int_{0}^{1} \int_{0}^{x} x f_{X, Y}(x, y) dx dy $$

is not correct since $y$ takes value from $0$ to $1$, and upon fixing $y$, $x$ takes value from $0$ to $y$.

That is the correct expression is $$\int_{0}^{1} \int_{0}^{\color{red}y} x f_{X, Y}(x, y) dx dy $$

The last expression is correct. It is the same reasoning, we just change the domain from $0\le x \le y \le 1$ to $0\le x \le y \le 5.$

0
On

Basically, the support of $\{(x,y):0\leq y\leq x\leq 1\}$ means that you integrate $x$ from $y$ to $1$ in the inner integral, and $y$ from $0$ to $1$ in the outer integral.   The inner integral is bounded over the interval on which $x$ is supported for any particular value of $y$, while the outer integral is bounded by the entire support for $y$.

$$\begin{align}\iint_{\Bbb R^2} xf_{X,Y}(x,y)~\mathsf d (x,y) &= \iint_{0\leq y\leq x\leq 1} x\cdot 6xy~\mathsf d(x,y) &&= \mathsf E(X)\\[1ex]&= \int_{0\leq y\leq 1}\int_{y\leq x\leq 1} 6x^2y~\mathsf d x~\mathsf dy&&=\mathsf E(\mathsf E(X\mid Y))\end{align}$$

Of course, you may do it the other way:

$$\begin{align}\iint_{\Bbb R^2} xf_{X,Y}(x,y)~\mathsf d (x,y) &= \int_{0\leq x\leq 1}\int_{0\leq y\leq x} 6x^2y~\mathsf d x~\mathsf dy&&=\mathsf E(\mathsf E(X\mid X))\end{align}$$