[Math] Find the probability mass function of opening boxes

probability

There are five closed boxes on a table. Three of the boxes have
nice prizes inside. The other two do not. You open boxes one at a time until you
find a prize. Let X be the number of boxes you open.
a) Find the probability mass function of X.

I'm stuck on this question. Do I need to find the probability of all possible outcomes? Let E be empty and let F be a prize. Find P(F), P(EF), P(EEF)?

Best Answer

You have to look at the different combinations.

For X=1, you open one box and the prize is there. So P(X=1)=3/5.

For X=2, you open one box and there is no prize, you open a second and there is a prize. Then P(X=2)=(2/5)(3/4).

For X=3, you open the first two and find no prize but find a prize on the third. We have P(X=3)=(2/5)(1/4)(3/3).

Note that all 3 of these probabilities add up to 1. These make up your PMF.