Let
A : the lost card is a spade,
B : all the n cards drawn from the remaining 51 cards are spades.
We are given P(A∣B)=5011 and we have to find n.
First write Bayes’ theorem:
P(A∣B)=P(B∣A)P(A)+P(B∣A)P(A)P(B∣A)P(A)−(1)
Initial probabilities before any card is lost:
Total spades in a full pack = 13 out of 52.
Hence P(A)=5213=41 and P(A)=5239=43.
Case 1 (event A happens): the lost card itself is a spade.
Spades left in the remaining 51 cards = 12.
So
P(B∣A)=51Cn12Cn−(2)
Case 2 (event A happens): the lost card is not a spade.
Spades left in the remaining 51 cards = 13.
So
P(B∣A)=51Cn13Cn−(3)
Substitute (2) and (3) into (1):
P(A∣B)=51Cn12Cn⋅41+51Cn13Cn⋅4351Cn12Cn⋅41
Cancel the common factor 51Cn and multiply numerator and denominator by 4 to simplify:
P(A∣B)=12Cn+313Cn12Cn−(4)
The question tells us that (4)=5011, therefore
12Cn+313Cn12Cn=5011
Cross-multiply:
5012Cn=11(12Cn+313Cn)
5012Cn=1112Cn+3313Cn
Subtract 1112Cn from both sides:
3912Cn=3313Cn
Divide by 3:
1312Cn=1113Cn−(5)
Use the identity relating the two combinations:
13Cn=13−n1312Cn
Substitute this into (5):
1312Cn=11(13−n1312Cn)
Cancel the common factor 12Cn:
13=13−n143
Multiply both sides by (13−n):
13(13−n)=143
169−13n=143
13n=169−143=26
n=2
Hence the number of cards drawn that turned out to be spades is n=2.