Professor X smokes a pipe. He carries two identical matchboxes, originally containing 20 matches each. When he lights his pipe, he chooses a matchbox at random and lights his pipe with one match and discards the used match.
There will eventually arise an occasion when he first selects a matchbox with only one match in it. At this point, what is the expected number of matches in the other box?
The event which stops the process is the occurrence of a single match in either box, while in the other one remain N matches ( N being between 2 and 20). The number of drawn matches, of the 40 existing ones, is therefore: 40-(N+1)=(39-N).
AN=The number of possible different sequences of drawn matches from the 2 boxes, given the number of drawn matches from box A or box B, is 19, and the total group of drawn matches is (39-N).
The probability of the occurrence of a specific N will therefore be :
(1) Pan = AN / (summation over N=2 to N=20 of AN)
AN will equal the number of combinations of choosing 19 entities out of a group of (39-N), which is :
The factor 2 takes care of the possibility that the box with one match may be either box A or box B.
Substituting eq.(2) into eq.(1) gives Pan as function of N, and allows the computation of the requested expectance E as :<o:p></o:p>
E=summation over N=2 to N=20 of(Pan*N)
A simple Matlab program computing this gives the result :
E = 2.8571