Expected value of two continuous values when selecting the smallest value.

30 Views Asked by At

I have two random variables x and y randomly distributed in the range [0,0.5]. What is the expected distance from 0.5 if we always select the closest variable.

Distance is equal to 0.5 - x or 0.5 - y whichever is smaller.

Note: These variables are not normally distributed, rather uniformly. Each position is equally likely.

I'm taking a distributed computing class and I'm having trouble proving the above sub problem. I'm trying to solve my algorithms expected run time which is measured as distance moved and the above represents 1/3 the cases.

I've solved below but it's based on intuition and is likely incorrect.

If we ignore y for now and deal with placing x first

E(x) =|0-0.5|/2 = 0.25

Half the time x will be selected as closest and half the time it will not.

If it isn't selected I'm not sure how to solve it but I figured I could treat it as if it falls in the range [E(x),0.5] resulting in E(y)|E(x) = |0.25-0.5|/2 = 0.125.

This results in an expected distance of

E(x,y) = 0.125 * 0.5 + 0.5 * 0.25 = 0.1875

1

There are 1 best solutions below

2
On BEST ANSWER

To compute expected values, you generally need to take integrals. If we say that $0\leq y \leq x \leq \frac12$ and we want the expected value of $y$, we have $$4\int_0^{1/2}\int_y^{1/2}y\,\mathrm{d}x\mathrm{d}y$$ which comes out to $\frac{1}{12}$ if I haven't made any mistakes.

The $4$ comes from the fact that in each integral, the probability density is identically $2$.

EDIT

You can think of probability as length, area, volume, etc. depending on how many dimensions you're working in. Here we have two variable, so area is natural. We can think of the region being covered with fine sand, and we ask how much of the sand is in the region we're interested in, compared to the amount of sand in the total area. (This corresponds to the number of ways of success divided by the number of possibilities in discrete probability.) Just as in discrete probability this only works if all possibilities are equally likely, in continuous probability, the sand may be thicker in some places than in others. This is the density. We have to integrate the density function over a region to figure out how much sand the region contains.

The simplest case is when the probability is uniformly distributed. This is what you meant to say in your question when you said randomly distributed. In this case, the density is constant. The probability of the whole space has to be $1$ of course. Here we have a $\frac12\times\frac12$ square, so it's area is $\frac14$ and so the only possible uniform density is identically $4$.

Another way of looking at it is as the product of two one-dimensional probability spaces. Each is an interval of length $\frac12$ so we need a density of $2$. This is the point of view I took in the original answer. It comes out to the same thing, of course.