2

Two dots are drown on the real numbers axis. Their distances from 0 are random variables S.T ~Normal(1, 0.25) for each dot.

Q: What's the expected value of the distance between the two dots.

Final Answer: $1/\sqrt{\pi}$


My Approach:

Let's assign $X_1$ to first dot's distance from 0 and $X_2$ to second dot's distance from 0.

if $X_1>X_2$, then:

$E(Distance)=E(X_1-X_2)=E(X_1)-E(X_2)=1-1=0$

else:

$E(Distance)=E(X_2-X_1)=E(X_2)-E(X_1)=1-1=0$

In both cases we got 0, What did I do wrong?

Side Note: ~Normals refers to normal distribution.

Algo
  • 49
  • 1
    You seem to be making the same kind of error as is discussed in this recent post. – Xander Henderson Jul 24 '23 at 22:58
  • Here is a similar case, hopefully should illustrate the issue with your analysis. Let $X,Y \sim \mathcal{N}(0,1)$; we need to find $\mathbb{E}[|X-Y|]$. Clearly $|X-Y| > 0$ almost everywhere, so $\mathbb{E}[|X-Y|] > 0$, but you are saying, if $X > Y$ then $\mathbb{E}[|X-Y|] = \mathbb{E}[X - Y] = 0$ since they are iid, and if $Y < X$ you get $|X-Y| = Y-X$ leading to the same result... – gt6989b Jul 24 '23 at 23:05
  • @XanderHenderson Hi, can you kindly simplify it I read it but I still don't understand how it's related. Plus why is approach wrong? all steps are legal.. – Algo Jul 24 '23 at 23:05
  • @gt6989b ok and why what you wrote is wrong? – Algo Jul 24 '23 at 23:06
  • @Algo redacted to try to explain the contradiction you reach with your approach, see the updated note – gt6989b Jul 24 '23 at 23:07
  • I don't see the contradiction you also proved it's a 0 as I did. – Algo Jul 24 '23 at 23:08
  • 2
    @Algo but don't you see that $|X-Y| > 0$ almost everywhere, so $\mathbb{E}[|X-Y|] > 0$? – gt6989b Jul 24 '23 at 23:10
  • 4
    The expected distance is obviously not $0$. The only way to get a distance of $0$ is if the two points coincide (a probability $0$ event) and otherwise, the distance between them must be positive (probability $1$). Keep in mind that the distance between $x,y$ is $|x-y|$ not $x-y$. – lulu Jul 24 '23 at 23:10
  • 2
    @Algo note that $\mathbb{E}[X-Y] = \mathbb{E}[X] - \mathbb{E}[Y] = 0$ since $X,Y$ are iid, but $\mathbb{E}[|X-Y|] \ne \mathbb{E}[X-Y]$ – gt6989b Jul 24 '23 at 23:12
  • 2
    The question you are supposed to be answering is "If we choose two random points, how far apart are they (on average)?" The question you have answered is something like "If we choose a random point, and then a second random point, what is the location of the second point relative to the first point?" In the case of the second question, the average location is "zero", in the sense that the second point is just as likely to be to the left or right of the original point. – Xander Henderson Jul 24 '23 at 23:12
  • @XanderHenderson but I don't get it from any of you... where is the mistake, which is the wrong step... – Algo Jul 24 '23 at 23:23
  • You applied linearity of expectation to a non-linear function. $|x-y|$ is not a linear function of $x,y$ so linearity of expectation is not applicable. – lulu Jul 24 '23 at 23:27
  • @lulu it's a bit less trivial than that - OP conditions on $X > Y$ first, which allows to get rid of the absolute value in the expectation – gt6989b Jul 24 '23 at 23:28
  • 4
    @gt6989b Well, linearity doesn't apply in the conditional case either. If we know that $X>Y$ then, clearly, $E(X-Y)>0$ – lulu Jul 24 '23 at 23:30
  • Just look at the simplest example. Say $X,Y$ are i.i.d fair Bernouilli variables (so both are $0$ or $1$ with equal chance). If you are told that $X>Y$ then you must have $X=1, Y=0$, so (conditioned on $X>Y$) $E(X-Y)=1$, not $0$. – lulu Jul 24 '23 at 23:41
  • 1
    Or, for another example, let $X$ be a standard normal variable. What is $E[|X|]$? Well, by your argument, it is $0$ since, if $X>0$, we have $|X|=X$ and $E[X]=0$, and similarly for $X<0$. But, of course, if we condition on $X>0$ we don't have $E[X]=0$ any more. – lulu Jul 25 '23 at 00:00

1 Answers1

1

We know that $X_1 - X_2 \sim \text{Normal}\left(0,\frac{1}{2}\right)$ (assuming the $0.25$ is a variance, not a standard deviation)

The distance between the points is $D:=|X_1-X_2|$ has a folded normal distribution with mean $\frac{1}{\sqrt{2}} \sqrt{\frac{2}{\pi}} = \frac{1}{\sqrt{\pi}}$.

Annika
  • 6,873
  • 1
  • 9
  • 20