Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Probability Question
#1
In Mabi, there's this "Wish Upon a star" or something event.
Simplifying it a little, you get a box, open it, and get a candy. To get the prize, you need all 12 types of candy.
Assuming each candy is equally likely to be in a box, what is the expected number of boxes which need to be opened before all 12 candies are obtained?
If that doesn't work for one reason or another, how would you graph the probability distribution of how likely you are to have all 12 after n boxes?
Reply
#2
Probability of 1st candy: 12/12
2nd: 11/12 (everything but the first candy found)
...
12th: 1/12

So the expected amount for the first would be 1, second would be 12/11, etc.

Total expected amount should be: 37.239ish

I think that's right. D:
Reply
#3
I'm afraid I don't follow.
Where did 37.239 come from?

The odds that you get a new candy on the first try are 12/12, 2nd box is 11/12, etc... but what if you get the same candy over and over again, then box 3 could have a 11/12 chance of a new candy...

:x
Reply
#4
Never mind. As usual, I fail.
Reply
#5
Hazzy Wrote:I'm afraid I don't follow.
Where did 37.239 come from?

The odds that you get a new candy on the first try are 12/12, 2nd box is 11/12, etc... but what if you get the same candy over and over again, then box 3 could have a 11/12 chance of a new candy...

:x

Sorry, I didn't feel like I had to explain since I was lazy.

The probability of getting the first candy is 12/12. After you get the first one, the probability of the 2nd candy (one of the 11 kinds that isn't the first) is 11/12. The third would be 10/12, fourth would be 9/12, etc, until the last one which is 1/12.

So, to find the expected amount, you take the inverse of the probability. For example, if you roll a dice, the expected amount to roll a 1 would be 6 rolls, which is the inverse of 1/6.

*makes a table*


Candy #ProbabilityExpected #
1st12/1212/12
2nd11/1212/11
3rd10/1212/10
4th9/1212/9
5th8/1212/8
6th7/1212/7
7th6/1212/6
8th5/1212/5
9th4/1212/4
10th3/1212/3
11th2/1212/2
12th1/1212/1


So to get the expected amount of attempts you would need to make, you have to get the sum of each one, so you add up the entire last column. (If you don't sum all of it, but instead the first two, that would be the expected amount of finding 2 unique candies.)

Make more sense?
Reply
#6
Oh, that makes sense.

So how would you go about making a distribution graph of probability of having all 12 types at box x?
Reply
#7
Hazzy Wrote:In Mabi, there's this "Wish Upon a star" or something event.
Simplifying it a little, you get a box, open it, and get a candy. To get the prize, you need all 12 types of candy.
Assuming each candy is equally likely to be in a box, what is the expected number of boxes which need to be opened before all 12 candies are obtained?
If that doesn't work for one reason or another, how would you graph the probability distribution of how likely you are to have all 12 after n boxes?

Assume equal distribution and that the probabilities are constant. That is the same as placing 12 candies within a box, and pick up one. Then you place it back again, and after that scramble the box, and pick up another one at random. How many picks on average do you need in order to have picked up all?

First of all, the probability of getting a new candy when you have 0, 1, 2 ... different candies is the following:
[Image: yktu5ql.png]
(So for P(12), or when you have 12 new candies to obtain, you have 100% chance of getting a new candy. That's obvious!)

Now, if you've picked the first candy, there's [Image: yh2kfwd.png] chance of getting a new candy on next attempt. That also means that there's [Image: ykpsc3b.png] chance of not obtaining a new candy. And what happens if you don't obtain a new candy? You have to try until you get one!

The estimate for candy number n will then be:
[Image: yfkr8r2.png]

If you get a new candy, then then the remaining amount of boxes to open will be E(n - 1). Because we've opened a new box right now however, we need to add 1 to our calculation. This happens with P(n) probability. If not, we don't get a new candy: Then we've used one box, and the average amount of boxes to left open is E(n). In total, (1 + E(n)). This is multiplied by the probability of not opening a new box.

By substituting P:
[Image: ykqmhmo.png]

Then, we get E(12) = 37.4.

Trying to find a certain probability, or for a set amount of boxes, insert these values:

[Image: watj.png]

Noah
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)