# Probability of passenger getting off

1. Dec 13, 2012

### Jane_S

1. The problem statement, all variables and given/known data
Hi, I'm considering the following problem: there are x males and y females, each of whom gets on an elevator at the bottom floor. There are 2k floors above this one (so 2k total stops). Furthermore, men are twice as likely to get off at odd floors as compared to even ones, and women are twice as likely to get off at even floors as compared to odd ones. People get off independently. If we let W equal the number of stops the elevator makes, find E(W) and Var(W). I'm not too worried about actually finding the variance and the expected value, I just want to see if I'm correct about the probability that someone gets off.

2. Relevant equations
Definitely want to use indicator random variables, and also probably the binomial theorem.

3. The attempt at a solution
So I understand that if people didn't care about odd/even floors, probability that passenger i gets off at a given floor is 1/(2k). In order to find the probability that we have a stop at floor i, we would do 1-((x+y)choose 0) * (1/(2k))^0*(1-(1/(2k)))^(m+n),
just subtracting from one the chance that nobody gets off at floor i.
The problem I'm running into is taking into account the odd/even part. I know the chance that someone gets off on their preferred type of floor is 2/2k, and the chance they get off on their other one is 1/2k. Since the chance that any given floor is your preferred type is .5, i get .5(2/2k*1/2k), or 3/4k. Thus, the chance that the elevator stops at a floor is 1-(1-(3/4k))^(m+n) (since the other terms disappear because of the zero). I fear that this is incorrect, however, because it doesn't deal with men and women seperately; unfortunately, I have no idea how to take this into account!
Thanks for the help in advance :)

2. Dec 14, 2012

### Ray Vickson

I like to think of problems of this type in terms of tossing balls into bins. Here we have 2k bins, numbered 1,2,...,2k. We have x blue balls and y pink balls, which we toss randomly into the bins. A blue ball has probability 1/(3k) of going into an odd-numbered bin and has probability 2/(3k) of going into an even-numbered bin. The pink probabilities are just the reverse of the above. We want to know the distribution of the number of occupied bins W---or at least--- the mean and possibly the variance of W. It is equivalent to know Z, the number of _empty_ bins. Getting EZ is easy enough:
$$EZ = \sum_{i=1}^{2k} E Z_i,$$
where $Z_i = 1 \text{ if bin i is empty, and } Z_i = 0 \text{ otherwise}.$

In order to have Z_i = 0 we need two events to occur: {no blue ball in bin i} and {no pink ball in bin i}. What are the probabilities of these for i even? For i odd?

Last edited: Dec 14, 2012
3. Dec 18, 2012

### Jane_S

Hi Ray,
Thanks for the help! Sorry about the delayed response - some things came up.
It seems to me like the Pr{Nobody hits blue bucket i} would be:
(2/3k)^m*(1/3k)^w, where m is the number of men and w is the number of women (pink bucket is the same, with m and w swapped). Hence, Pr{Blue bucket is hit} =
1-Pr{Blue bucket is not hit} = 1-((2/3k)^m*(1/3k)^w) for each blue bucket.
So the expected value for blue buckets hit should be
k*(1-(2/3k)^m*(1/3k)^w), where k is the number of blue buckets. The same expression, with m and w swapped. So a total expected value would be:
2k-((2/3k)^m*(1/3k)^w+(1/3k)^m*(2/3k)^n)k.
This makes some sense to me (if there are no people, E(w)=1, if there are an infinite number of people on the elevator, E(w)=2k). But the expression seems kind of nasty - am I missing an easy simplification step? (Alternatively, I may just have the wrong ideal in general!)
If it is indeed correct, I think I might be a little confused as to how to compute the variance...
Thanks again!

4. Dec 18, 2012

### Ray Vickson

Var(W) = Var(Z), and
$$\text{Var}(Z) = E(Z^2) - (EZ)^2 = E(\sum_i Z_i)^2 - (EZ)^2 \\ = \sum_i E(Z_i)^2 + 2 \sum_{i,j\,: \, i < j} E(Z_i Z_j) - (EZ)^2.$$
We have $E(Z_i^2) = E(Z_i)$ because $Z_i = 0,1.$ We can look at $E(Z_i Z_j)$ for i, j both even, both odd, or for i even and j odd or i odd and j even. It is almost obvious that all these cases are the same as $E Z_1 Z_3$, $E Z_1 Z_2$ or $EZ_2 Z_4$; then we just need to figure out how many (i,j) pairs there are of each type.

5. Dec 18, 2012

### Jane_S

Alright, that makes sense to me. If instead of doing i<j we just take i=/=j, (forgoing the 2 in front of the summation), I believe there are k^2-k possibilities for i even j odd, k^2-k possibilities for i odd j even, and 2k^2 possibilities for j and i both odd/even. This leaves 4k^2-2k possibilities which makes sense.
I calculated what I believe to be the probabilities of each of these events:
i odd, j odd gives ((3k-2)/3k)^m((3k-1)/3k)^n*((3k-4)/(3k-2))^m((3k-2)/(3k-1))^n : the part before the asterix gives the chance nobody gets off on floor i, the part after the asterix gives the chance nobody gets off on floor j, taking into account that there is now one fewer floor to get off on (which will have a bigger effect if you prefer to get off on odd floors).
The expressions for the other 3 cases (i is odd, j is even, i is even j is odd, i is even j is even) are basically the same (with minor adjustments).
Do these seem correct? If so, I guess I just need to tackle the rather imposing algebra that stems from this!
One more question: You say that Var(Z)=Var(W), despite the fact that W records the number of bins with balls in them and Z records the number of balls without... does that make sense?
Thanks again for your help/patience, i really appreciate it!

Last edited: Dec 18, 2012
6. Dec 18, 2012

### Ray Vickson

Z = 2k - W, and 2k = constant, so Var(Z) = Var(W). Var(W) is a measure of "spread" in the distribution of W (centered at the mean), and the spread is the same whether we measure from left to right (Var (W)) or from right to left (Var(Z)). Alternatively, just use the formulas that define Var(W) and Var(Z), and see whether you end up with the same final answer.

7. Dec 19, 2012

### Aria1

I am having a little difficulty following your analogies...by "blue bucket" do you mean odd floor? Also, for your total expected value, you use the variable "n" which was never defined. I believe you mean "w" again, so I am going to work under that assumption.
I would have said the Pr{Blue bucket not being hit}= (1-2/3k)^m(1-1/3k)^w. This leads me to a total expected value of 2k-k((1-2/3k)^m*(1-1/3k)^w+(1-1/3k)^m*(1-2/3k)^w). I did this because it seems like the probability of a given man NOT getting off at an odd floor would be (1-2/3k), not 2/3k. Can you please clarify for me why you did what you did, because I don't really understand...

8. Dec 19, 2012

### Aria1

Even from there, I don't really understand how to compute variance. The formula I am familiar with is Var(X) = SUM(Var(Xi)) + SUM SUM E(XiXj)-E(Xi)E(Xj), but I don't really understand how to compute these values or how to, ultimately combine all the even/odd divisions into a single variance. Please help!

9. Dec 19, 2012

### Ray Vickson

No, you are now on your own. If you are having trouble, look at a couple of small examples, such as a 4-floor building, and write everything down in detail. That is how you will learn.