# Finding the density.

1. Mar 4, 2014

### semidevil

These are 2 problems that I can solve, but I don't know how to tell the difference between these 2 when it comes to finding the densities. I just need to know how to tell whichmethod to use to find the density. I do not need the solution.
1. The problem statement, all variables and given/known data

A)
Suppose that (X; Y ) is uniformly chosen from the set given by 0 < X < 3 and x < y < root(3x). Find the marginal density fy (y) of Y.

B)
If X is uniformly distributed on [0, 2], and given that X = x, Y is uniformly distributed on [x 2x], what is P[Y <2]?

2. The attempt at a solution
For A), to find the joint density, I integrate 1 dy dx of the shape to get the area. the joint density is then 1/area. This makes sense to me.
For B), integrating 1 dydx doesn't seem to work and instead, it is just simply combining f(x) and f(y). 1/2 * 1/x to get the density.

I understand the uniform shortcuts so I know where 1/2 and 1/x came from, but how do I know when to use which method? I,e. how do I know that I need to integrate 1, rather then just multiply f(x)*f(y).
both tell us that x, y are uniformly distributed; I understand that the difference is that one involves a conditional distribution, so is that the determining factor?

3. Relevant equations
if f(x) is uniform on (a,b), the area is b-a. the density would then be 1/(b-a).
f(x)*f(y) = f(x,y) if independent.

2. Mar 4, 2014

### Ray Vickson

Neither of your X and Y are independent, so that last equation is useless.

Think of what density really means:
$$P(x < X < x + \Delta x, y < Y < y + \Delta y) \doteq f(x,y) \Delta x \, \Delta y$$
(neglecting smaller-order terms like $(\Delta x)^2,$ etc).
This implies
$$P(y < Y < y+\Delta y | X=x) \equiv \lim_{\Delta x \to 0} P(y < Y < y+\Delta y|x < X < x + \Delta x),$$
and this last conditional probability is
$$P(y < Y < y+\Delta y|x < X < x + \Delta x) = \frac{P(x < X < x + \Delta x, y < Y < y + \Delta y)}{P(x <X < x + \Delta x)}$$
In other words, for small $\Delta x, \, \Delta y$ we have
$$P(x < X < x + \Delta x, y < Y < y + \Delta y) \doteq P(y < Y < y+\Delta y | X=x) \cdot P(x <X < x + \Delta x)$$
You can take it from here.