Compute the marginal p.d.f. of X, Y and Z

independencemarginal-distributionprobabilityprobability distributionsuniform distribution

Suppose a fly gets trapped in your tent. Let the tent be represented by the polyhedron P with vertices (0, 0, 0), (0, 1, 0), (1, 1, 0), (1, 0, 0), (0, 1/2, 1), (1, 1/2, 1) and let the position of the fly be represented by the random vector (X, Y, Z). Assume that the position of the fly is uniformly randomly distributed within P.

  1. Compute the marginal p.d.f. of X
  2. Compute the marginal p.d.f. of Y
  3. Compute the marginal p.d.f. of Z
  4. Are X, Y, Z independent?
  5. Are X and Y independent?
  6. Are X and Z independent?
  7. Are Y and Z independent?

My attempt

In order to calculate the marginal p.d.f.s, we first need to calculate the joint p.d.f. Since it is uniformly distributed, we know that it is just $\frac{1}{volume}$. The volume of our polyhedron is $\frac{1}{2}$ so:
\begin{equation}
f_{X,Y,Z}(x,y,z)=
\begin{cases}
2 & \text{if } (x,y,z)\in D\\
0 & \text{otherwise}
\end{cases}
\end{equation}

For 1., to compute the marginal p.d.f. for X, we need to integrate in terms of $y,z$
so
$$f_X(x)=\int_0^{1/2}\int_0^{2y}2dzdy+\int_{1/2}^1\int_0^{-2y}2dzdy=-1$$

For 2., we integrate in terms of $x,z$ so
$$f_Y(y)=\int^1_0\int^1_02dxdz=2$$

For 3., we integrate in terms of $x,y$, so
$$f_Z(z)=\int^1_0\int^1_02dxdy=2$$

I am unsure about the bounds that I found for these, especially for number 1 becuse I got a negative number.

For independence, we just need to check if the joint p.d.f. is the product of the marginal p.d.f.s.

Best Answer

Please note the second integral in calculation of $f_X(x)$ is not correct.

It should instead be $\displaystyle \int_{1/2}^1 \int_0^{2-2y} 2 \ dz \ dy$.

Instead you can also calculate using single integral if you integrate with respect to $dy$ first.

$\displaystyle f_X(x) = \int_0^1 \int_{z/2}^{(2-z)/2} 2 \ dy \ dz = 1$

Also, there are mistakes in calculations of $f_Y(y)$ and $f_Z(z)$.

$\displaystyle f_Y(y) = \int_0^{(1-|1-2y|)}\int^1_0 2 \ dx \ dz = 2 - 2 |1-2y|$

$\displaystyle f_Z(z) = \int_{z/2}^{(2-z)/2}\int_0^1 2 \ dx \ dy = 2 - 2z$

Related Question