$(X,Y)$ distributed uniformly on a triangle which its vertices are: $(-1,0), (0,1), (1,0) $
Let $x$ be a constant number, and assume $ x \in (-1,1)$ Calculate:
- $\mathbb{P}(Y \geq 0.5 | X=x)$
- $\mathbb{P}(Y < 0.5 | X=x)$
- $\mathbb{E}(Y| X=x)$
My try:
- $X \sim U(-1,1)$ and $Y \sim U(0, 1)$ and so $\mathbb{P}(Y \geq 0.5 | X=x) = \frac{\mathbb{P}(Y \geq 0.5 \cap X=x)}{\mathbb{P}(X=x)}$ but they are not independent from each-other so I am stuck... (because the height decreases as we get closer to $x=1$ and also when $x = -1$ (similar to normal distribution)
I don't know how to continue from here, I would appreciate your help!
Let the region enclosed by the triangle be $A$.
Then it is clear from a picture of $A$ that $X\in(-1,1)$ and $Y\in(0,1)$ with probability $1$. It is given that $(X,Y)$ is uniform on $A$. This however does not mean that marginal distributions of $X$ and $Y$ are uniform on their respective support. Also note that $\mathbb P(X=x)=0$ for every $x$ as $X$ is continuous, so your argument does not work. You need the conditional distribution of $Y$ given $X$.
The picture should also enable you to see that the region $A$ can be expressed as $$A=\{(x,y)\in\mathbb R^2: y<1-x,y<1+x,y>0\}$$
Or simply, $$A=\{(x,y)\in\mathbb R^2: 0<y<1-|x|\}$$
Since $(X,Y)$ is uniformly distributed on $A$, its joint density is of the form
$$f_{X,Y}(x,y)=\begin{cases}c&,\text{ if }(x,y)\in A \\ 0 &,\text{ otherwise }\end{cases}\,,$$
where the constant $c(>0)$ is determined from $$\iint f_{X,Y}(x,y)\,\mathrm dx\,\mathrm dy=1\quad\text{ or },\quad c\times \text{area}(A)=1$$
As you say the area of $A$ is $1$, so $c=1$.
Using indicator functions, the joint density is more concisely written as
$$f_{X,Y}(x,y)=\mathbf1_{A}(x,y)$$
Or simply, $$f_{X,Y}(x,y)=\mathbf1_{0<y<1-|x|}$$
At this point, it is possible to recognize the conditional distribution of $Y$ given $X$ immediately. This is because the joint density factors as
$$f_{X,Y}(x,y)=\underbrace{\frac1{1-|x|}\mathbf1_{0<y<1-|x|}}_{f_{Y\mid X}(y\mid x)}\cdot \underbrace{(1-|x|) \mathbf1_{|x|<1}}_{f_X(x)}$$
So $Y$ given $X=x$ is uniform on $(0,1-|x|)$ for $|x|<1$.
You can of course verify this directly by finding the marginal density of $X$ from $$f_X(x)=\int f_{X,Y}(x,y)\,\mathrm dy$$ and hence the conditional density from $$f_{Y\mid X}(y\mid x)=\frac{f_{X,Y}(x,y)}{f_X(x)}$$
Using this conditional density you can probably answer the questions now.