A game of GoFish is played with a deck of 52 cards (4 suits, 13 ranks in each suit).
2 to 6 players play. With 2 players each player is dealt 7 cards. With 3 or more players each player is dealt 5 cards.
Players take turns asking each other for a rank. If the asked player has cards of that rank they give them all to the asking player. If not, the asking player draws a single card from the deck.
Whenever a player has 4 cards of the same rank, those cards are discarded.
The turn proceeds to the next player in clockwise order. The game ends when one a players hand is empty or the deck is depleted.
For simplicity purposes you could just assume a single player, drawing from the deck one at a time, whenever getting 4 cards of the same rank, discarding them.
Given either the normal rules or the simple version, what are the odds of having X number of cards in your hand?
For example what are the odds of reaching a hand of 30 cards? 31 cards? 32 cards?
Best Answer
This is for the one player game and a initial hand of five cards. I will consider that you have a hand with $k$ cards if after throwing away all groups of four cards of the same value, you have $k$ cards in your hand. For instance, if your initial hand is $\{2,3,3,3,3\}$ I will consider it a one card hand, not a five card hand.
Let $P(k)$ be the probability that at some moment in the game you have a $k$ card hand. The following values are easy: $P(0)=1$ (at the end of the game you have no cards in your hand) and $P(40)=P(41)=\dots=P(52)=0$ (if you have $40$ cards, there must be a group of four cards of the same value). A little thought gives $$ P(39)=\frac{4^{13}}{\dbinom{52}{13}}=0.000105681 $$
For the rest of the values I have run a simulation in Mathematica of $10^7$ games. These are the results:
For each $k$, $H(k)$ is the number of games in which a hand of $k$ cards has been held before reaching the end of the deck. Observe that the value of $H(39)$ is in accordance with the exact value of $P(39)$. A graph of the results:
It is surprising (at least to me) that for certain values of $k$, like $k=5$, a hand of $k$ cards was held in all $10^7$ games, even if a deck like
will give only hands of $1$, $2$, $3$ and $4$ cards.