How to calculate the chances of 2 chances/odds being true…?

80 Views Asked by At

I was thinking about making a JavaScript chances percentage calculator that would combine to chances to make one… If you don’t know what I mean.. Say: 5% of the world population can solve a Rubik’s cube, and 3% of the population on earth can produce the roaring sound that is made when you yawn at any time they want. Now how do I calculate the chances in percentage that you can do both of these things? I did look for the math formula to calculate this.. however what I found was not helpful. I just want the formula to calculate the chances. I would also like to point out that I’m probably using the incorrect words and terms to explain this.

2

There are 2 best solutions below

6
On BEST ANSWER

Red objects: A, B, C
Triangles: A, B, D, E
Red triangles: A, B
Total objects: A, B, C, D, E

The probability that an object is red AND a triangle = $\frac{2}{5}$

$P(R\space and \space T) = P(R) \times P(T|R)$

1
On

You're probably making the assumption that your abilities to do these two things are independent --- it's as if God had sprinkled salt onto the earth, and those hit by a little salt can do Rubik's cube, while those hit by a little pepper (in a second shaking) can roar. In that case, the answer you want is this:

If $x$ percent can do the first thing, and $y$ percent can do the second, then $xy/100$ percent can do both. In your example, $x$ is $5$ and $y$ is $3$ so the answer is $\frac{15}{100}$ percent, or $0.15$ percent.

In many real situations, the things are not in fact independent. For instance, if the first thing is 'Has learned basic arithmetic' and the second is "Has studied calculus", then everyone in the second category is in the first, so if the numbers were again $5\%$ and $3\%$, the combined number would be $3\%$.

Still, for examples like the one you chose, the independence assumption is probably justified, and my formula can help you write your program.