gwnn, on 2014-May-19, 02:12, said:
kenberg, I suspect the problem with your reasoning is that there will almost always be intervals with different lengths. The expected length of the four lengths in order of lengths is probably something like 20-16-14-10 or something like that (I guess there is an analytic formula for this but I'm too lazy to look it up). He will be more likely to get in the longest interval than the shortest one and I don't see how you accounted for that. In the case that I outline here, the average length of the interval he gets there is 15.87 minutes (sum(x_i^2)/sum(x_i) where sum(x_i) is 60 here).
First a note to mike:This will continue to be math heavy. The problem has a vagueness to it that math can eliminate, but this does come at a cost to non-mathematicians.. I will try another version later that might be clearer.
My first thought was to look up trhe expected value of the lengths by instead I computed them, at first for n=3 and then for general n. Let's do n=3. After this I will give the argument, simpler but more abstract, for general n. First we have to be clear about just which intervals we are speaking of. Let's go with n=3. I will measire time from the top of the hour sp at a quarter after 2 I will say the time is 0.25.
I let A1, A2, A3 be the arrival times, X1,X2,X3 be these same three numbers listed in increasing order. So if the arrival tiems are 0.86,0.23, 0.57 then X1= 0.23, X2= 0.57 and X3=0.86.
The intervals I am speaking of are [0,X1], {X1.X2], [X2,X3] , {X3,1]. I am claiming that the expecte values of X1-0, of X2-Xq, of X3-X2, and of [1-X2] are each 1/4.
First some symmetry: The expected value of X1-0 is the same as the expected value of 1-X2 since the minimum of A1, A2,A3 is as likely to be close to 0 as the maximum is to be clost to 1. Similarly, the expected value of X2-X1 is the same as the expected value of X2-X1 since in one case we are subtracting second largest from largest, in the other case we are subtracting smallest from second smallest.
Also, the lengths add to one, so the expected values add to 1. So I I show that the expected value of the length of the left most interval is 1/4 I am done since then so is the rightmmost, and ttwo middle ones split what's left.
Now I computed the expected value of X1 a few posts back and got 1/4. Here is how: For any random variable X, the expected value of X (if it exists, for some rvs it doesn't) is given by integrating x dF(x) where F is the cumulative distribution function F*x) -Prob (X<x) and the integral is Riemann Stieltjes. The function f will be continuous whenever, as here, Prob(X=x)=0 ofr all x (The probability of arriving exactly at x=.5 as contrasted with , say, between 0.4999999 and 0.5000001 is 0). Usually, and it happens here, the integral of x dF(x) can be replaced by the integral of xf(x) dx where f is the derivative of f.
Sorry for all that, the short version is that we have to compute F(x), differentiate it to get f, and then integrate xf(x) to get teh expected value of X.
Here calculating F directly is easy. P(X1<x) = 1- P(A1,A2, A3 are all >x) since X1 is not less than X if and only if all of A1, A2, A3 are greater than X. Well. greater or equal but in a continuous variable it doesn't matter since the probability of exact equality is 0.
Thus, F(x) =1-(1-x)^3, f(x)=3(1-x))^2 and E(X1), the expected value of X1, is the integral of 3x(1-x)^2 from 0 to 1. We can just do this, or more easily we can observe that thjis is the same as the integral from 0 to 1 of 3x^2(1-x). Since this expression is 3(x^2-x^3) the integral from 0 to 1 is 3(1/3 -1/4) which comes to 3/12=14.
So, for n=3, all the intervals of interest have an expected length of 1/4.
For general n, the same reasoning applied to the first integral leads us to integrating n(x^(n-1)-(x^n)) from 0 to 1 and we get n((1/(n+1))-(1.n))=1/(n+1).
But for n larger than 3 we need a different approach to see that the other intervals also have the same expected length. A probabilistic approach efficiently (more efficiently than the above) does this. I'll come back to that later. The above is the way I first calculated this, it has the advantege of being a direct calculation for the definitions and so is probably actually right. So is, I think, may general approach for n, but that's another post.
incidentally, it is also possible to get to the answer as follows. For each t in [01] calculate the expected waitng time assuming the passenger arrives at time t, and the integrate this quantity from 0 to 1. I am hopeful that I get the same answer when I do this, I think that I will.
First, some coffee.