Multiple Random Variable for a uniform distribution

76 Views Asked by At

A random point $(X,Y)$ is distributed uniformly on the square with vertices $(1,1)$, $(1,-1)$, $(-1,1)$, and $(-1,-1)$. That is, the joint pdf is $f(x,y)=\frac{1}{4}$ on the square. Determine the probability of $P(|X+Y|<2)$.

My attempt: $$\int_{-1}^1\int_{-1}^{2-x} \frac{1}{4}\,dy\,dx$$ Did I set up the double integral right?

2

There are 2 best solutions below

0
On

Comment: @herbsteinberg is correct that the problem as stated is pointless, because the answer is obviously $1.$ The integral would be $\int_{-1}^1 \int_{-1}^1 \frac 1 4\, dy\,dx.$

The plot below shows the region of the square corresponding to $P(|X+Y|<1).$ Because the joint distribution of $(X,Y)$ on the square is uniform it seems clear that $P(|X+Y|<1) = 3/4.$

If you want to use integral calculus, it is probably best to break the integral into two parts, perhaps to the left and right of the vertical green line.

enter image description here

Note: I used simulation (in R statistical software) as an easy way to make the plot. But the same simulation also provides a way to approximate the result $P(|X+Y|<1) = 3/4,$ correct to two places. [A larger number of points, such as m = 10^6, would give a much closer approximation, but an ugly plot.]

set.seed(1112);  m = 50000
x = runif(m, -1,1);  y = runif(m, -1,1)
plot(x,y, pch=".")
cond = (abs(x+y)<1)
points(x[cond],y[cond], pch=".", col="blue")
abline(h=0, col="green2", lwd=2);  abline(v=0, col="green2", lwd=2)
mean(cond)
[1] 0.7519  # aprx P(|X + Y| < 1) = 3/4
0
On

Note thet: $$P(|X+Y|<2)=P(-2<X+Y<2)=P(Y>-X-2 \ \text{or} \ Y<-X+2)=\\ P(Y>-X-2\ge -1 \ \text{or} \ Y<-X+2\le 1)=\int_{-1}^1 \int_{-1}^1 \frac14dydx=1.$$ See the graph: enter image description here

If the question is to find $P(|X+Y|<1)$, then: $$P(|X+Y|<1)=P(-1<X+Y<1)=P(-X-1<Y \ \text{or} \ Y<-X+1)=\\ \int_{-1}^0 \int_{-x-1}^1 \frac14dydx+\int_0^1 \int_{-1}^{-x+1}dydx=\frac38+\frac38=\frac34.$$

See the graph: enter image description here