Thanks!
Edit: Using an old SNES game called EarthBound as an example (because it's the first one that comes to mind), there's an enemy that drops an item called the Star Pendant 1/256 of the time (technically 1/128, but 1/256 in practice). It is optimal to obtain three Star Pendants in this manner. If I were to fight 400 of these enemies, what are the odds that they will drop at least three Star Pendants? How many of them would I have to fight to reach 50% odds? This sort of problem has always tripped me up, since I never learned how to do it.
To put it in a gambling perspective, if your odds of getting dealt a Royal Flush in Jacks or Better is .0025%, or 25/1000000, and you played 50000 hands, what are the odds that you will get at least two Royals in those 50000 hands?
Quote: etony33If there are ten marbles in an opaque bag, nine of which are red and one of which is green, and I replace the marble each time after randomly picking it, the odds of picking the green one in my first ten tries are 1-(9/10)^10, or 65.132%. My question is, what are the odds I will pick the green marble exactly three times in ten tries? What are the odds I will pick the green marble at least three times in ten tries? How did you arrive at this conclusion?
Thanks!
Why not ask the actual question though instead? But, to be honest, the marble example is more clear though. :)
Your answer lies in "binomial distribution":
http://en.wikipedia.org/wiki/Binomial_distribution
http://mathworld.wolfram.com/BinomialDistribution.html
Note: C(x,y) is the binomial coefficient: http://mathworld.wolfram.com/BinomialCoefficient.html
C(x,y) = x!/(x-y)!/y!, where x! = x*(x-1)*(x-2)*.....*1
So to get exactly 3 marbles:
P(3/10) = C(10,3) x (1/10)^3 x (9/10)^7 = 120 x 0.001 x 0.4782969 = 0.057395628
To get "at least three" you need to sum P(0/10) + P(1/10) + P(2/10)
P(0/10) = C(10, 0) x (1/10)^0 x (9/10)^10 = 1 x 1 x 0.3486784401 = 0.3486784401
P(1/10) = C(10, 1) x (1/10)^1 x (9/10)^9 = 10 x 0.1 x 0.387420489 = 0.387420489
P(2/10) = C(10, 2) x (1/10)^2 x (9/10)^8 = 45 x 0.01 x 0.43046721 = 0.1937102445
Probability of two or less marbles: 0.3486784401 + 0.387420489 + 0.1937102445 = 0.9298091736
So the probability of three or more marbles is: 1 - 0.9298091736 = 0.0701908264
As for the >50% question, it is better that you calculate all the probabilities of the distribution and sum them up until you get beyond the 50% point.
Fortunately, spreadsheet programs like microsoft excel can do that for you. And the "cumulative" flag does the summing for you automatically.
http://support.microsoft.com/kb/827459
Quote: etony33...what are the odds I will pick the green marble exactly three times in ten tries?
This is simply a Bernoulli trial with probability of success p=1/10 =.1:
P(s=3) = C(n,s)(p)^s(1-p)^(n-s)
= (10!)/(3!(10-3)!)(.1)(1-.1)^(10-3)
= (120)(.001)(.478)
= 5.7%
Quote: etony33...what are the odds I will pick the green marble at least three times in ten tries? How did you arrive at this conclusion?
P(s>=3) = 1 - P(s=0) - P(s=1) - P(s=2)
(50000!/[50000-2]!/2!)*.000025^2*.999975^49998
50000! is a number that is extremely large, to the point that most calculators won't even deal with it. Is there any way to break it down into numbers that are small enough to punch into a calculator?
Quote: etony33Another question: what about when you start dealing with a large number of events? Using my Royal Flush (getting two Royals in 50000 hands, assuming .0025% odds) example, it would be
(50000!/[50000-2]!/2!)*.000025^2*.999975^49998
50000! is a number that is extremely large, to the point that most calculators won't even deal with it. Is there any way to break it down into numbers that are small enough to punch into a calculator?
Yes.
50000!/(50000-2)!/2! = 50000*49999*49998!/49998!/2! = 50000*49999/(2*1) = 1,249,975,000
Is this statement ALWAYS true, or are there exceptions?
This statement is NEVER true. The formula actually gives the probability, not the odds! (and also considering z to be a probability, not odds)Quote: etony33"The odds of something's happening exactly x times out of y chances, when the odds of it happening are z, the formula is (y!/x!(y-x)!)*z^x*1-z^1-x"
Is this statement ALWAYS true, or are there exceptions?