If you flip a coin and roll a 6-sided die, what is the probability that you will flip a HT and roll RESULT_DESC?
Flipping a HT and rolling RESULT_DESC are independent events: they don't affect each other. So, to get the probability of both happening, we just need to multiply the probability of one by the probability of the other.
The probability of flipping a HT is \dfrac{1}{2}
.
The probability of rolling RESULT_DESC is \dfrac{RESULT_POSSIBLE.length}{6}
, since there
is RESULT_POSSIBLE.length outcome
which satisfy our condition
(namely, toSentence(RESULT_POSSIBLE)), and 6 total possible outcomes.
The probability of rolling RESULT_DESC is \dfrac{RESULT_POSSIBLE.length}{6}
, since there
are RESULT_POSSIBLE.length outcomes
which satisfy our condition
(namely, toSentence(RESULT_POSSIBLE)), and 6 total possible outcomes.
The probability of rolling RESULT_DESC is \dfrac{RESULT_POSSIBLE.length}{6}
, since there
is RESULT_POSSIBLE.length outcome
which satisfies our condition
(namely, toSentence(RESULT_POSSIBLE)), and 6 total possible outcomes.
The probability of rolling RESULT_DESC is \dfrac{RESULT_POSSIBLE.length}{6}
, since there
are RESULT_POSSIBLE.length outcomes
which satisfies our condition
(namely, toSentence(RESULT_POSSIBLE)), and 6 total possible outcomes.
So, the probability of both these events happening is \dfrac{1}{2} \cdot \dfrac{RESULT_POSSIBLE.length}{6}
= \dfrac{PRETTY_N}{PRETTY_D}
.
PLAYER is shooting free throws. Making or missing free throws doesn't change the probability that he
will make his next one, and he makes his free throws localeToFixed(PR*100, 0)\%
of the time.
What is the probability of PLAYER making all of his next STREAK free throw attempts? What is the probability of PLAYER making none of his next STREAK free throw attempts?
\large{ANS}
\large{OPTIONS[0]}
\large{OPTIONS[1]}
\large{OPTIONS[2]}
\large{OPTIONS[3]}
We know that \blue{SINGLE_PCT \%}
of the time, he'll make
his first shot.
Then SINGLE_PCT \%
of
the time he makes his first shot, he will also make his second shot, and
localeToFixed((1-PROB)*100, 0) \%
of the time he makes his
first shot, he will miss his second shot.
Notice how we can completely ignore the rightmost section of the line now, because those were the times that
he missed the first free throw, and we only care about if he makes the first and the second.
So the chance of making two free throws in a row is SINGLE_PCT\%
of the times
that he made the first shot, which happens SINGLE_PCT\%
of the time in general.
This is SINGLE_PCT\% \cdot SINGLE_PCT\%
, or
localeToFixed(PROB, 2) \cdot localeToFixed(PROB, 2) \approx localeToFixed(PROB*PROB, 3)
.
We can repeat this process again to get the probability of making three free throws in a row. We simply take
SINGLE_PCT\%
of probability that he makes two in a row, which we know from the previous step is
localeToFixed(PROB*PROB, 3) \approx \purple{TWO_PCT\%}
.
SINGLE_PCT\%
of \purple{TWO_PCT\%}
is
localeToFixed(PROB, 2) \cdot localeToFixed(PROB * PROB, 3) \approx
localeToFixed(PROB_CUBED, 3)
, or
about \green{THREE_PCT\%}
:
There is a pattern here: the chance of making two free throws in a row was
localeToFixed(PROB, 2) \cdot localeToFixed(PROB, 2)
, and the probability of making
three in a row was localeToFixed(PROB, 2) \cdot localeToFixed(PROB * PROB, 3) =
localeToFixed(PROB, 2) \cdot (localeToFixed(PROB, 2) \cdot localeToFixed(PROB, 2))
= localeToFixed(PROB, 2)^3
.
In general, you can continue in this way to find the probability of making any number of shots.
The probability of making STREAK free throws in a row is localeToFixed(PROB, 2) ^ STREAK
.
We know that \blue{SINGLE_PCT \%}
of the time, he'll miss
his first shot
(100 \% - localeToFixed(PR*100, 0) \% = SINGLE_PCT \%)
.
Then SINGLE_PCT \%
of
the time he misses his first shot, he will also miss his second shot, and
localeToFixed((1-PROB)*100, 0) \%
of the time he misses his
first shot, he will make his second shot.
Notice how we can completely ignore the rightmost section of the line now, because those were the times that
he made the first free throw, and we only care about if he misses the first and the second.
So the chance of missing two free throws in a row is SINGLE_PCT\%
of the times
that he missed the first shot, which happens SINGLE_PCT\%
of the time in general.
This is SINGLE_PCT\% \cdot SINGLE_PCT\%
, or
localeToFixed(PROB, 2) \cdot localeToFixed(PROB, 2) \approx
localeToFixed(PROB * PROB, 3)
.
We can repeat this process again to get the probability of missing three free throws in a row. We simply take
SINGLE_PCT\%
of probability that he misses two in a row, which we know from the previous step is
localeToFixed(PROB*PROB, 3) \approx \purple{TWO_PCT\%}
.
SINGLE_PCT\%
of \purple{TWO_PCT\%}
is
localeToFixed(PROB, 2) \cdot localeToFixed(PROB*PROB, 3) \approx localeToFixed(PROB_CUBED, 3)
, or
about \green{THREE_PCT\%}
:
There is a pattern here: the chance of missing two free throws in a row was
localeToFixed(PROB, 2) \cdot localeToFixed(PROB, 2)
, and the probability of missing
three in a row was localeToFixed(PROB, 2) \cdot localeToFixed(PROB*PROB, 3) =
localeToFixed(PROB, 2) \cdot (localeToFixed(PROB, 2) \cdot localeToFixed(PROB, 2))
= localeToFixed(PROB, 2)^3
.
In general, you can continue in this way to find the probability of missing any number of shots.
The probability of missing STREAK free throws in a row is
localeToFixed(PROB, 2) ^ STREAK = ANS
.
Captain person(1) has a ship, the H.M.S. Khan.
The ship is two furlongs from the dread pirate person(2) and his merciless band of thieves.The ship is two furlongs from the dread pirate person(2) and her merciless band of thieves.
The Captain has probability C_HIT_PRETTY
of hitting the pirate ship.
The pirate only has one good eye, so he hits the Captain's ship with probability
P_HIT_PRETTY
.The Captain has probability C_HIT_PRETTY
of hitting the pirate ship.
The pirate only has one good eye, so she hits the Captain's ship with probability
P_HIT_PRETTY
.
If both fire their cannons at the same time, what is the probability that QUESTION?
If the Captain hits the pirate ship, it won't affect whether he's also hit by the pirate's cannons (and vice-versa), because they both fired at the same time. So, these events are independent.
If the Captain hits the pirate ship, it won't affect whether she's also hit by the pirate's cannons (and vice-versa), because they both fired at the same time. So, these events are independent.
Since they are independent, in order to get the probability that QUESTION, we just need to multiply together the probability that the captain hits and the probability that the pirate hits. Since they are independent, in order to get the probability that QUESTION, we just need to multiply together the probability that the captain hits and the probability that the pirate misses. Since they are independent, in order to get the probability that QUESTION, we just need to multiply together the probability that the captain misses and the probability that the pirate hits. Since they are independent, in order to get the probability that QUESTION, we just need to multiply together the probability that the captain misses and the probability that the pirate misses.
The probability that the Captain hits is C_HIT_PRETTY
.
The probability that the Captain misses is 1 -
(the probability the Captain
hits), which is 1 - C_HIT_PRETTY = C_MISS_PRETTY
.
The probability that the pirate hits is P_HIT_PRETTY
.
The probability that the pirate misses is 1 -
(the probability the pirate
hits), which is 1 - P_HIT_PRETTY = P_MISS_PRETTY
.
So, the probability that QUESTION is
C ? C_HIT_PRETTY : C_MISS_PRETTY \cdot P ? P_HIT_PRETTY : P_MISS_PRETTY =
\dfrac{ANS_N/getGCD(ANS_N,ANS_D)}{ANS_D/getGCD(ANS_N,ANS_D)}
.