Statistical probability in JavaScript

Joined
Mar 3, 2021
Messages
240
Reaction score
30
I need more context. Is the "multiple event win" reducing the possibilities, e.g., removing a marble from a bag, or are the odds the same each time, e.g., spinning a slot machine (which would be zero decay)? What result are you looking for? The total odds of winning if it was soun multiple times?
 
Joined
Dec 28, 2021
Messages
4
Reaction score
0
I need more context. Is the "multiple event win" reducing the possibilities, e.g., removing a marble from a bag, or are the odds the same each time, e.g., spinning a slot machine (which would be zero decay)? What result are you looking for? The total odds of winning if it was soun multiple times?
Total odds i.e 1/5000 spun four times vs, 1/1250
 
Joined
Mar 3, 2021
Messages
240
Reaction score
30
To combine all four spins into a total probability that at least one win, you use the "at least one rule." First, find the probability that all of them will _fail_. Then, subtract it from one.

Code:
P(all) = (1 - 1/5000) * (1 - 1/4000) * (1 - 1/3000) * (1 - 1/2000)
P(at least one) = 1 - P(all) 
P(at least one) = 1 - (0.9998 * 0.99975 * 0.999666 * 0.9995)
P(at least one) = 1 - 0.998717 = 0.00128 = 0.128%

For four spins of 1/1250, it's the same process, but a little more simplified.

Code:
P(fail) = 1 - 1/1250 = 1 - 0.0008 = 0.9992
P(at least one) = 1 - 0.9992^4 = 1 - 0.9976 = 0.0024 = 0.24%
 
Joined
Dec 28, 2021
Messages
4
Reaction score
0
To combine all four spins into a total probability that at least one win, you use the "at least one rule." First, find the probability that all of them will _fail_. Then, subtract it from one.

Code:
P(all) = (1 - 1/5000) * (1 - 1/4000) * (1 - 1/3000) * (1 - 1/2000)
P(at least one) = 1 - P(all)
P(at least one) = 1 - (0.9998 * 0.99975 * 0.999666 * 0.9995)
P(at least one) = 1 - 0.998717 = 0.00128 = 0.128%

For four spins of 1/1250, it's the same process, but a little more simplified.

Code:
P(fail) = 1 - 1/1250 = 1 - 0.0008 = 0.9992
P(at least one) = 1 - 0.9992^4 = 1 - 0.9976 = 0.0024 = 0.24%
Thanks so much for the explanation!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top