The Probability Mess – I get email

I wrote about some probability calculations that I’d done on a whim. LK (that’s Anant without the ‘h’) says, on email that he thinks my calculations were wrong. He sent me this figure to make his point:

You should be able to check that the probability from that figure is closer to a third than to a sixth. This is proof positive that I was wrong, and that LK’s answer in the comments on the last post was right (although there still is no (120-t) in any denominator).

I am usually willing to be shown wrong, and to accept it when I am. Here, though, I couldn’t stop myself – out of disbelief, mostly – from writing my own test on MatLab, and re-doing the expression for the probability; correctly, this time.

Here, first, is the expression for the probability, in terms of ‘m’, the time I spend in the mess, and ‘n’, the time Avani spends in the mess. The first line simplifies to the second

The MatLab code I wrote is here, so you can check the results for yourself.

I’d averaged the second terms in each bracket as (m/2) and (n/2) respectively, the last time. Obviously, that’s the wrong thing to do. The expression above gives an answer that is close to, but not exactly, what LK got. The MatLab simulations also give similar probabilities. I can’t explain what is causing the discrepancy between the expression and LK’s vastly more understandable graph. Maybe LK will help.

6 thoughts on “The Probability Mess – I get email”

1. Anant says:

I did not understand the expression, largely because there seems to be a conflict for the usage of the symbols ‘m’ and ‘n’ between the times of arrival (like you mentioned in writing) and the durations of lunch (which should be the only parameters that the probability should depend upon). But the expression seems right in that, it is 1/3 minus a very small number. The minute errors could be due to assuming that the arrivals are at the beginning of each minute, in which case the partitioning graph above would be a step curve.

-mutatis mutandis cheetos and cheerios

2. I corrected that. ‘m’ and ‘n’ are indeed the times spent at the mess.

3. The error’s bigger than that. It’s actually equal to

(m(m+1) + n(n+1))
(4.120.120)

Does that tell you what it is?

4. mickey says:

sry there was some typo in the previous reply..I guess lk missed the boundary effect. Let me explain with m=n=20. Probability that I enter mess at time t is 1/120. and probability that the other person can enter mess from time t-20 to t+20 is 40/120. so probability that times are overlapped is 120*40/(120*120). but if i enter at time t<20 the other person cant enter at t-20 (t=-10) but can enter at any time 0<t'<t. so actual probability is 100*40/(120*120) + 1/(120*120) integral(tdt){0,20}. so croor substitute m,n=20 in your expression u will get 7/24… ha ha ha

5. mickey says:

@ all…. even this is not exact measure of probability. Its only an approximation as we are discretizing the time in minutes. we will get a better estimation if we do in seconds. The major term that doesnt has boundary effects wont change though. But the other term has t^2 in it. It does depend on units.

6. Hey I wrote a MATLAB code for the problem (yeah jobless) and got 0.306944… This is a little different from the graphical value (11/36=0.3055…)

This, I guess, is a discretization error. For smoothly varying quantities like time (as shown in the graph) you cannot define probabilities at a fixed point (you can define in intervals though as done in the graphical solution). Only probability density makes sense for such cases.

But when you discretize the problem in minutes, you can define probability at each minute but the final answer is an approximation to the graphical solution.