# Check my reasoning on two "expected value" problems?

Question $$1$$

There are $$20$$ rooms at the Finite Hilton Hotel. $$9$$ rooms are occupied by $$2$$ people each; $$7$$ rooms are each occupied by a single person; and $$4$$ rooms are vacant.

If you talk to a random guest of the hotel at breakfast, then, assuming that person is equally likely to be any of the guests at the hotel, what is the expected number of people staying in that person's room (including him- or herself)?

This is how I did the problem: $${(9/20)} \times{2} + {(7/20)} \times {1} + {(4/20)} \times {0} = 25/20 = 1.25$$, so the expected value is $$1.25$$. Is this correct?

Question $$2$$

Matt flips $$100$$ coins. Those that land heads, he sets aside. He then reflips the coins that landed tails, and again sets aside all those that land heads. Finally, he flips a third time the coins that landed tails twice, and again sets aside all those that land heads.

What is the expected number of coins Matt sets aside?

This is how I did the problem: $${1/2}\times{1/2}\times{1/2} = 1/8$$.

$${1/8} \times {100} = 12.5$$, so the expected value is $$12.5$$. Is this correct?

• First part is correct. Nov 28, 2014 at 19:05

## 2 Answers

The first one is wrong. What you computed is the expected number of occupants of a room picked uniformly from the 20 rooms. But the question says that you pick a random person, with each person equally likely to be picked. There are $18+7=25$ people total. 18 of them stay in a room with two occupants and 7 stay in a room with zero occupants. So the expected number of people in a random person's room are: $$2*\frac{18}{25} + 1 * \frac{7}{25} = \frac{43}{25} = 1.72$$

The second one is also wrong. It is useful to think of the probability a coin is not set aside. This is in fact what you computed: it is 1/8. Then the probability that a coin is set aside is $1 - 1/8 = 7/8$. So the expected number of coins set aside is $(7/8)*100 = 87.5$

• I think you mean $7/8 \cdot 100 = 87.5$. Nov 28, 2014 at 19:17
• @NickH I did, thanks :) Nov 28, 2014 at 19:19

## Finite Hotel

I might find it more reasonable to base the probabiities on people rather on ratios of the rooms as you have done. So, instead of $$(9/20) \cdot 2$$ to compute the expected value based on people from the double rooms, I would take the percent of people...

$$(9 \cdot 2) + (7 \cdot 1) + (4 \cdot 0) = 25$$, so there are 25 people you might end up interviewing about rooms. I'd compute the expected value as

$$(18/25) \cdot 2 + (7/25) = 43/25 = 1.72$$.

Basically there is an $$18/25 = .72 = 72\%$$ chance that the person you interview is staying in a double. Leaving a $$28\%$$ chance that the person is in a single room. So the expected value should be 1.72.

## Coin Tosses

The probability you compute is the probability of three independent events, each with a likelihood of $$1/2$$ happening. In the context of this problem, I think that would be like tossing heads, then heads, then heads for a given coin. But this is not really relevant. It might be easier to compute the probability of never tossing heads... which is identical to the calculation you provided, but results in a different answer. Think of 12.5 as the expected number of coins that flipped the same value on each of three tosses. Now this could be all heads or it could be all tails. So, since a coin flipped heads on the first toss does not get re-flipped, it does not make sense to state 12.5 as the expected number of heads.

Instead, out of the 100 coins, we expect 12.5 of them to have resulted in tails on each of the three flips and thus not be set aside. The remainder, $$100-12.5 = 87.5$$ are the number of coins that he will have set aside in total.