Conditional expectation of length of path

46 Views Asked by At

We have $n$ houses, $n\geq 2$, that are set in a straight line, such that the distance between any two neighboring houses is $a\in (0, \infty)$. A resident from a randomly chosen house goes on a visit to some other house from the neighborhood (so he can't go to his own house). What is the expected length of the path he takes?

Firstly I defined a random variable X for tracking the probability of a given length and also an event $A_i$: we begin in the "i-th" house. Obviously the probability of $A_i$ is $\frac{1}{n}, \forall i\in\{1, \dots ,n\}$. Then I decided to split the problem into two cases, one where $n$ is even and when $n$ is odd.

Beggining with the option of $n$ being even, I firstly looked at $X\vert A_1$ and $X\vert A_n$. Length of path ranges from $a$ all the way to $(n-1)a$, with every option having a probability of $\frac{1}{n-1}$. The excpected value of these two respectively being $\frac{an}{2}$. Then I went onto $X\vert A_2$ (where length $a$ has a probability of $\frac{2}{n-1}$, others stay the same) and so on, but couldn't find any good patterns for $E(X\vert A_j), j\in\{2,\dots , n-2\}$.

So this is where I am stuck and thats only case where $n$ is even.

As a side note, theres a hint given to use the formula $\sum_{i=1}^n i^2=\frac{n(n+1)(2 n+1)}{6}$, but I don't know where it comes into play. Any help is greatly appriciated!

1

There are 1 best solutions below

0
On BEST ANSWER

This is a two-dimensional problem so let us represent it by matrix and all will be clear. Say the number of houses is $n=5$. We mark the distance between each house and count the possible distances to march, not knowing either the house where you start from or the house you want to get to.

$$\begin{bmatrix} 0 & a & 2a & 3a & 4a\\ a & 0 & a & 2a & 3a\\ 2a & a & 0 & a & 2a\\ 3a & 2a & a & 0 & a\\ 4a & 3a & 2a & a & 0 \end{bmatrix}$$

Now you have $n^2-n$ possible travels since you do not visit your own house. The total distance is (count two diagonals of each $a,2a,3a,4a$). I will write a general formula since the case is the same for any $n$, not just 5. So the average case is

$$\overline{d_n}=\frac1{n(n-1)}2 \left ( a\sum_{k=1}^{n-1}k(n-k) \right )=\frac1{n(n-1)}2a\frac1{6}(n-1)n(n+1)$$

$$\overline{d_n}=\frac{n+1}{3}a$$

(Notice that your mentioned formula for the sum of squares hides in $\sum\limits_{k=1}^{n-1}k(n-k)$)

Smoke check: $n=2$

$$\overline{d_2}=\frac{2+1}{3}a=a$$

as expected.