If you keep drawing cards from a shuffled deck, what is the expected number of draws to complete at least one card from each suit?
The expected value is the average number of draws that it would take if you repeated the experiment many times.
(In reply to
End... by Eric)
Going along with the "brute force throw CPU cycles at it" and using quite a few more Monte Carlo runs (1M), I get 7.6757
*** MATLAB code ****
data = zeros(1,52);
nmax = 1000000;
for i=1:nmax,
deckstate = [13 13 13 13];
j = 0;
while max(deckstate-[12 12 12 12]) > 0,
j = j+1;
r = randperm(sum(deckstate));
cds = cumsum(deckstate);
if r(1) <= cds(1) && deckstate(1) > 0,
suit = 1;
elseif r(1) <= cds(2) && deckstate(2) > 0,
suit = 2;
elseif r(1) <= cds(3) && deckstate(3) > 0,
suit = 3;
else
suit = 4;
end
deckstate(suit) = deckstate(suit)-1;
end
data(j) = data(j)+1;
end
E = 0;
for i=1:52,
E = E+ i*data(i)/nmax;
end