3

$X$ and $Y$ are uniformly distributed on the unit disk. Thus, $f_{X,Y}(x,y) = \begin{cases} \frac{1}{\pi}, & \text{if} ~ x^2+y^2 \leq 1,\\ 0, &\text{otherwise.}\end{cases}$

If $Z=X+Y$, find the pdf of $Z$.

mugen
  • 1,479
Someone
  • 55
  • 2
    Hint: draw a line representing $x+y=z$ overlaying the unit disk. Rotate the diagram by $\pi/4$ radians (in either direction) and see if you can write down the answer without doing any computations at all. – Dilip Sarwate Apr 20 '14 at 18:45
  • I don't understand you Dilip Sarwate. Can you explain a little more. – Someone Apr 20 '14 at 19:37
  • 1
    @mugen Adding the self-study link is not recommended. See this link for the policy in these matters. – Dilip Sarwate Apr 20 '14 at 19:38
  • @DilipSarwate Do you want to explain your hint to my question. How can I find the answer without any computations? – Someone Apr 20 '14 at 19:43
  • I draw the line x+y=z and tried to find the area under the line and above the circle. But I could not find. I don't understand what you mean by rotating. What do I have to do when I rotate the disk and the line. @DilipSarwate – Someone Apr 20 '14 at 19:56
  • 1
    Draw the picture of what @Dilip is describing before and after. After rotation from $(x,y)$ to $(x',y')$, what do the new axes represent in terms of the original problem? What, then is the density at $x+y$? It's a beautiful hint, really. Failing that, how do you work out the density of a sum of random variables? You'll have been shown how to do it, so how is it done? – Glen_b Apr 20 '14 at 22:21
  • Tut tut Off-topic!?! - The intent of the OP is mostly irrelevant; the question is nice, and the answer is nicer. I cannot see any gain in placing this on hold. – wolfies Apr 21 '14 at 17:56
  • @Wolfies Before tutting further, please reread the explanation in the "put on hold" box. Although it does refer in passing to the possible intent ("seek to understand"), the real reason for closing is the "demand a solution" part (which is perhaps the most blatant aspect of this question). How we treat such questions helps us maintain a distinction between being the kind of carefully curated encyclopedic resource we aim at and being a mere [homework] question answering site. – whuber Apr 21 '14 at 18:03
  • @whuber I read it all before I posted --- Plainly, the cat is already out the bag ... so what purpose is served by deleting the nice answers now? And if those are the concerns, then why would Dilip post the answer, and simultaneously vote to delete the question? - makes no sense. [BTW, I would be very surprised if this is a homework question.] – wolfies Apr 21 '14 at 18:07
  • @Wolfies: I don't see any deleted answers: closing a question works differently than deleting it. Closed questions remain searchable and visible to people, who can still vote, improve, and answer them. I won't speculate whether any question is homework; that's not the point. This one is routine, not explicitly related to a practical problem anybody faces, and is solved in a manner already clearly illustrated in several hundred related questions about sums of independent random variables. Those are the aspects that factored into the closing votes. – whuber Apr 21 '14 at 18:21
  • @Zen the presence of a noteworthy answer certainly is good reason to vote to re-open a question. (I believe you have the rep to do that. The threshold is 3000. :-) – whuber Apr 21 '14 at 18:24
  • Bill: done! Dilip's solution is really neat. – Zen Apr 21 '14 at 18:26
  • @whuber wrote: "This one is routine, not explicitly related to a practical problem anybody faces, and is solved in a manner already clearly illustrated in several hundred related questions about sums of independent random variables" /// I would not agree with this characterisation at all. (i) I don't agree it is routine; (ii) whether or not it has practical application does not detract in any way from its theoretical interest; (iii) quite the contrary, the standard methods you refer to yield messy complicated solutions here ... which makes Dilip's solution all the more of interest. – wolfies Apr 21 '14 at 18:54
  • @Wolfies I agree with your (implicit) point that "routine" may be in the eye of the beholder. That's why it takes five votes to close a question and why a closed question is easily re-opened. Note that a routine question can have non-routine answers (which can be a good reason to reopen a closed question). In this case, identifying quantities related to functions of uniformly distributed $(X,Y)$ with easily-computed areas of suitable geometric regions is a method that has been invoked explicitly in several other threads (such as http://stats.stackexchange.com/questions/46991). – whuber Apr 21 '14 at 19:11
  • @whuber I do not think my answer to this question is particularly noteworthy; my comments (hint to OP and comment on Zen's answer) might be more useful results. But the point really is not that $(X,Y)$ is uniform but that the joint pdf has circular symmetry. All joint pdfs with circular symmetry give $$F_{X+Y}(z) = F_X\left(\frac{z}{\sqrt{2}}\right); \quad f_{X+Y}(z) = \frac{1}{\sqrt{2}}f_X\left(\frac{z}{\sqrt{2}}\right),$$ and it is just that in this case $f_X(\cdot)$ is particularly easy to compute because the joint pdf is uniform in addition to being circularly symmetric. – Dilip Sarwate Apr 22 '14 at 03:33

2 Answers2

6

Since my hint seems to have not been very useful to you, here is a step by step procedure. It is different from things involving Jacobians and simulations using R and such stuff that will appear in other answers to your question.

The key idea is that we will find $F_Z(z)$, the cumulative probability distribution function (CDF) of $Z = X+Y$. The CDF is, of course, a probability: specifically, for any real number $z$.

$$F_Z(z) = P\{Z \leq z\}.$$ Once we have found the CDF for all values of $z$, we can take the derivative of the CDF with respect to $z$ to find the probability density function $f_Z(z)$. I will leave the computation of the derivative to you.

The probability that $(X,Y)$ lies in any region $A$ of the plane is the integral of the joint pdf of $X$ and $Y$ over the region $A \cap D$ where $D$ is the unit disc. In this instance, since the joint pdf has constant value on $D$, the calculation is much simpler: we merely need to find the area of the region $A \cap D$ and divide by the area of $D$, which you know is just $\pi$. The trick in this problem is to understand that in some cases, it is not necessary to evaluate an integral to find an area if we can find the area using mensuration formulas such as $\frac 12 \times~$ base $\times~$ altitude from middle school or high school.

So, draw the line $x+y = 0$ (overlaying it on the unit disc) and consider the question: what is the probability that $(X,Y)$ lies on or below this line? Note that we are asking for $$P\{X+Y \leq 0\} = P\{Z \leq 0\} = F_Z(0).$$ Can you figure this out just by looking at the picture you have drawn? If you cannot, set up a double integral and evaluate it: conversion to polar coordinates will be helpful. After you get the answer (it is same as the answer to your chances of winning the lottery based on the idea that there are only two outcomes: win or lose and so it is a 50-50 chance that you win), look at the picture again and try and figure out a way to get to the end result without integrating.

Let's try a slightly harder one. Draw the line $x+y = 1$ and figure out $$P\{X+Y \leq 1\} = P\{Z \leq 1\} = F_Z(1).$$ You might find it easier to look at the first quadrant separately from the other three quadrants.

More generally, for any fixed number $z \in [0,\sqrt{2}]$,

  • draw the line $x+y=z$,

  • find the points $(a,b)$ and $(c,d)$ where the line intersects the unit circle,

  • draw radius vectors from $(0,0)$ to $(a,b)$ and $(c,d)$

This divides the region of interest into a sector of the unit disc and a triangle whose areas you should be able to compute using formulas such as $\frac 12 r^2\theta$ where $\theta$ is the angle subtended by an arc at the center etc.

Next, you need to do all this for $z \in [-\sqrt{2},0]$ but if you look at your pictures, you will find, I hope, that a lot of work is already done if you can think of symmetry and the notion that $P(B^c) = 1-P(B)$.

Finally, you need to find $F_Z(z)$ for $z > \sqrt{2}$ and for $z < -\sqrt{2}$ but these should be easy. This gives you $F_Z(z)$ for all $z$. Differentiate, and you are done.

Dilip Sarwate
  • 46,658
  • Dilip's end result $f(z) = \frac{1}{\pi}\sqrt{2-z^2}$ is known as the semi-circle distribution with domain of support on $(-\sqrt2, \sqrt2)$. Neat! – wolfies Apr 21 '14 at 17:34
3

Following Dilip's hint, the geometry of the circular segment gives $$ F_Z(z) = \begin{cases} 0 & \text{if} \quad -\infty< z\leq -\sqrt{2} \\ \frac{1}{\pi} \left(\cos^{-1}\left(-\frac{z\sqrt{2}}{2}\right) + \frac{z\sqrt{2}}{2} \sqrt{1-\frac{z^2}{2}}\right) & \text{if} \quad-\sqrt{2}<z\leq 0 \\ 1 - \frac{1}{\pi} \left(\cos^{-1}\left(\frac{z\sqrt{2}}{2}\right) - \frac{z\sqrt{2}}{2} \sqrt{1-\frac{z^2}{2}}\right) & \text{if} \quad 0<z<\sqrt{2} \\ 1 & \text{if} \quad \sqrt{2}\leq z<\infty\quad \end{cases} $$ which can be checked by this Monte Carlo simulation coded in R.

N <- 10^5
u <- runif(N, min = -1, max = 1)
v <- runif(N, min = -1, max = 1)
inside <- (u^2 + v^2 <= 1)
x <- u[inside]
y <- v[inside]
accepted <- sum(inside)
plot(x, y, xlim = c(-1, 1), ylim = c(-1, 1), pch = ".")
z = -0.9
sum(x + y <= z) / accepted
(acos(-z*sqrt(2)/2) + (z*sqrt(2)/2) * sqrt(1 - z^2/2)) / pi
z = 1.2
sum(x + y <= z) / accepted
1 - (acos(z*sqrt(2)/2) - (z*sqrt(2)/2) * sqrt(1 - z^2/2)) / pi

P.S. As Dilip's comment below show, it is much easier to work directly with the pdfs, because $$ f_Z(z)=\frac{\sqrt{2}}{2}f_X\left(\frac{z\sqrt{2}}{2}\right) \, , $$ and $$ f_X(x)=\frac{2}{\pi}\sqrt{1-x^2}\;I_{[-1,1]}(x) \, . $$ To adjust the indicator, notice that $-1\leq z\sqrt{2}/2\leq 1$ if and only if $-\sqrt{2}\leq z\leq \sqrt{2}$. Hence, $I_{[-1,1]}(z\sqrt{2}/2)=I_{[-\sqrt{2},\sqrt{2}]}(z)$.

Zen
  • 24,121
  • 4
    Zen, your answer is way too complicated. My idea was to note that $x+y=z$ is at distance $z/\sqrt{2}$ from the origin, and so after rotation we have that $$F_Z(z) = P{Z \leq z} = P{X \leq z/\sqrt{2}} = F_X(z/\sqrt{2}).$$ Thus, $$f_Z(z) = \frac{1}{\sqrt{2}}f_X\left(\frac{z}{\sqrt{2}}\right)$$ where $f_X(x)$ is easy to determine by inspection: it is the cross-sectional area of the joint pdf solid at $x$, which area (being that of a rectangle of height $\frac{1}{\pi}$ and width $2\sqrt{1-x^2}$) is easily calculated. So I say, "Look, Ma! It's easy! No integration needed!" – Dilip Sarwate Apr 21 '14 at 13:32
  • 1
    @Someone (I thought my nick was weird...): in your future questions try to show us your attempts, failures, progresses, etc. – Zen Apr 21 '14 at 18:31