Agent Smith
Full Member
- Joined
- Oct 18, 2023
- Messages
- 465
The ticket-collector's problem: Assume there are n different tickets you can collect, these tickets are found in boxes of a product (some boxes maybe empty i.e. have no tickets in them). There are therefore n + 1 different possibilities. Each box has the same probability for these n + 1 possibilities i.e. each box contains either no ticket or 1 ticket (one of the n). What is the average number of boxes that have to be purchased to ensure you collect all tickets. If collect them all you win a prize, that's how it usually works.
How do we solve this problem?
The easiest and dumbest way to find the answer is to use a random number generator. Assign each ticket + no ticket a number from 1 to n + 1 and carry out a simulation. Conduct a (large) number of simulations and find the average of the number of attempts (purchases) that have to be made to acquire all n tickets.
Wikipedia has an article on this but I couldn't understand it.
Here's how I attacked the problem:
Let the number of tickets = n = 4
We have n + 1 possibilities (counting empty boxes) = 4 + 1 = 5
For 4 boxes, we see total number of permutations possible = 54=625
The number of ways we can collect all 4 tickets = 4C4×4P4=24
Probability of getting all tickets in just 4 tries = P(four) = 62524
For 5 boxes, we see that there are 55=3125 possibilities (repetitions are possible)
In how many ways can we "win" (get all 4 tickets)? 5C4×4P4×4P1=480
Probability of getting all tickets in just 5 tries = P(five) = 3125120
For 6 boxes, total possibilities = 56
Win possibilities = 6C4×4P4×4P2
Probability of getting all tickets in just 6 tries = P(six) = 566C4×4P4×4P2
In general, P(x)=5xxC4×4P4×xPx−4
Looks like I'm calculating the probability of getting all n tickets in exactly x attempts/purchases.
What do I do with these probabilities?
If random variable = X = the expected number of purchases to "win" then, ...
E(X)=P(four)×4+P(five)×5+P(six)×6+...+P(x)×x?
Help!
How do we solve this problem?
The easiest and dumbest way to find the answer is to use a random number generator. Assign each ticket + no ticket a number from 1 to n + 1 and carry out a simulation. Conduct a (large) number of simulations and find the average of the number of attempts (purchases) that have to be made to acquire all n tickets.
Wikipedia has an article on this but I couldn't understand it.
Here's how I attacked the problem:
Let the number of tickets = n = 4
We have n + 1 possibilities (counting empty boxes) = 4 + 1 = 5
For 4 boxes, we see total number of permutations possible = 54=625
The number of ways we can collect all 4 tickets = 4C4×4P4=24
Probability of getting all tickets in just 4 tries = P(four) = 62524
For 5 boxes, we see that there are 55=3125 possibilities (repetitions are possible)
In how many ways can we "win" (get all 4 tickets)? 5C4×4P4×4P1=480
Probability of getting all tickets in just 5 tries = P(five) = 3125120
For 6 boxes, total possibilities = 56
Win possibilities = 6C4×4P4×4P2
Probability of getting all tickets in just 6 tries = P(six) = 566C4×4P4×4P2
In general, P(x)=5xxC4×4P4×xPx−4
Looks like I'm calculating the probability of getting all n tickets in exactly x attempts/purchases.
What do I do with these probabilities?
If random variable = X = the expected number of purchases to "win" then, ...
E(X)=P(four)×4+P(five)×5+P(six)×6+...+P(x)×x?
Help!