Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

516 lines (482 sloc) 30.617 kb
<!DOCTYPE html>
<html data-require="math math-format probability word-problems graphie">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Independent probability</title>
<script data-main="../local-only/main.js" src="../local-only/require.js"></script>
</head>
<body>
<div class="exercise">
<div class="problems">
<div id="coindie">
<div class="vars">
<var id="HT">random() &lt; 0.5 ? $._("heads") : $._("tails")</var>
<var id="RESULT_DESC, RESULT_POSSIBLE">randFromArray([
/* I18N: Shows up in a question of the form, "what is the probability you will ... roll ___ ?" */
[$._("a 1"), [1]],
/* I18N: Shows up in a question of the form, "what is the probability you will ... roll ___ ?" */
[$._("a 2"), [2]],
/* I18N: Shows up in a question of the form, "what is the probability you will ... roll ___ ?" */
[$._("a 3"), [3]],
/* I18N: Shows up in a question of the form, "what is the probability you will ... roll ___ ?" */
[$._("a 4"), [4]],
/* I18N: Shows up in a question of the form, "what is the probability you will ... roll ___ ?" */
[$._("a 5"), [5]],
/* I18N: Shows up in a question of the form, "what is the probability you will ... roll ___ ?" */
[$._("a 6"), [6]],
/* I18N: Shows up in a question of the form, "what is the probability you will ... roll ___ ?" */
[$._("at least a 2"), [2, 3, 4, 5, 6]],
/* I18N: Shows up in a question of the form, "what is the probability you will ... roll ___ ?" */
[$._("at least a 3"), [3, 4, 5, 6]],
/* I18N: Shows up in a question of the form, "what is the probability you will ... roll ___ ?" */
[$._("at least a 4"), [4, 5, 6]],
/* I18N: Shows up in a question of the form, "what is the probability you will ... roll ___ ?" */
[$._("more than a 2"), [3, 4, 5, 6]],
/* I18N: Shows up in a question of the form, "what is the probability you will ... roll ___ ?" */
[$._("more than a 3"), [4, 5, 6]],
/* I18N: Shows up in a question of the form, "what is the probability you will ... roll ___ ?" */
[$._("more than a 4"), [5, 6]],
/* I18N: Shows up in a question of the form, "what is the probability you will ... roll ___ ?" */
[$._("less than a 4"), [1, 2, 3]],
/* I18N: Shows up in a question of the form, "what is the probability you will ... roll ___ ?" */
[$._("less than a 5"), [1, 2, 3, 4]],
/* I18N: Shows up in a question of the form, "what is the probability you will ... roll ___ ?" */
[$._("less than a 6"), [1, 2, 3, 4, 5]],
/* I18N: Shows up in a question of the form, "what is the probability you will ... roll ___ ?" */
[$._("an even number"), [2, 4, 6]],
/* I18N: Shows up in a question of the form, "what is the probability you will ... roll ___ ?" */
[$._("an even number"), [2, 4, 6]],
/* I18N: Shows up in a question of the form, "what is the probability you will ... roll ___ ?" */
[$._("an odd number"), [1, 3, 5]],
/* I18N: Shows up in a question of the form, "what is the probability you will ... roll ___ ?" */
[$._("an odd number"), [1, 3, 5]],
/* I18N: Shows up in a question of the form, "what is the probability you will ... roll ___ ?" */
[$._("a prime number"), [2, 3, 5]]
])</var>
<var id="PRETTY_N">RESULT_POSSIBLE.length / getGCD(RESULT_POSSIBLE.length,12)</var>
<var id="PRETTY_D">12 / getGCD(RESULT_POSSIBLE.length,12)</var>
</div>
<p class="question">
If you flip a coin and roll a 6-sided die, what is the probability that you will flip a <var>HT</var> and roll <var>RESULT_DESC</var>?
</p>
<div class="solution" data-forms="proper, decimal, percent"><var>0.5 * RESULT_POSSIBLE.length / 6</var></div>
<div class="hints">
<p>
Flipping a <var>HT</var> and rolling <var>RESULT_DESC</var> 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.
</p>
<p>
The probability of flipping a <var>HT</var> is <code>\dfrac{1}{2}</code>.
</p>
<p data-if="RESULT_POSSIBLE.length > 1"><span data-if="isSingular(RESULT_POSSIBLE.length)" data-unwrap="">
The probability of rolling <var>RESULT_DESC</var> is <code>\dfrac{<var>RESULT_POSSIBLE.length</var>}{6}</code>, since there
is <var>RESULT_POSSIBLE.length</var> outcome
which satisfy our condition
(namely, <var>toSentence(RESULT_POSSIBLE)</var>), and 6 total possible outcomes.
</span><span data-else="" data-unwrap="">
The probability of rolling <var>RESULT_DESC</var> is <code>\dfrac{<var>RESULT_POSSIBLE.length</var>}{6}</code>, since there
are <var>RESULT_POSSIBLE.length</var> outcomes
which satisfy our condition
(namely, <var>toSentence(RESULT_POSSIBLE)</var>), and 6 total possible outcomes.
</span></p><p data-else=""><span data-if="isSingular(RESULT_POSSIBLE.length)" data-unwrap="">
The probability of rolling <var>RESULT_DESC</var> is <code>\dfrac{<var>RESULT_POSSIBLE.length</var>}{6}</code>, since there
is <var>RESULT_POSSIBLE.length</var> outcome
which satisfies our condition
(namely, <var>toSentence(RESULT_POSSIBLE)</var>), and 6 total possible outcomes.
</span><span data-else="" data-unwrap="">
The probability of rolling <var>RESULT_DESC</var> is <code>\dfrac{<var>RESULT_POSSIBLE.length</var>}{6}</code>, since there
are <var>RESULT_POSSIBLE.length</var> outcomes
which satisfies our condition
(namely, <var>toSentence(RESULT_POSSIBLE)</var>), and 6 total possible outcomes.
</span></p>
<p>
So, the probability of both these events happening is <code>\dfrac{1}{2} \cdot \dfrac{<var>RESULT_POSSIBLE.length</var>}{6}
= \dfrac{<var>PRETTY_N</var>}{<var>PRETTY_D</var>}</code>.
</p>
</div>
</div>
<div id="freethrows">
<div class="vars">
<var id="FREE_THROWS">
[["Carmelo Anthony", .84],
["Trevor Ariza", .70],
["Michael Beasley", .75],
["Carlos Boozer", .70],
["Elton Brand", .78],
["Kobe Bryant", .83],
["DeMarcus Cousins", .69],
["Glen Davis", .74],
["Luol Deng", .75],
["Tim Duncan", .72],
["Kevin Durant", .88],
["Raymond Felton", .81],
["Kevin Garnett", .86],
["Pau Gasol", .82],
["Manu Ginobili", .87],
["Grant Hill", .83],
["LeBron James", .76],
["Antawn Jamison", .73],
["Shawn Marion", .77],
["Joakim Noah", .74],
["Chris Paul", .88],
["Paul Pierce", .86],
["Derrick Rose", .86],
["Amar'e Stoudemire", .79],
["John Wall", .77]]
</var>
<var id="ALL">random() &lt; 0.5</var>
<var id="PLAYER,PR">randFromArray(FREE_THROWS)</var>
<var id="PROB">ALL ? PR : roundTo(2, 1-PR)</var>
<var id="PROB10">PROB * 10</var>
<var id="PROB_CUBED">pow(PROB, 3)</var>
<var id="STREAK">randRange(4,9)</var>
<var id="SINGLE_PCT">localeToFixed(PROB * 100, 0)</var>
<var id="TWO_PCT">localeToFixed(pow(PROB,2) * 100, 0)</var>
<var id="THREE_PCT">
(pow(PROB,3) * 100) &lt; 0.5 ?
localeToFixed(pow(PROB,3) * 100, 1) :
localeToFixed(pow(PROB,3) * 100, 0)
</var>
<var id="OPTIONS">shuffle(
[localeToFixed(PR, 2) + "^" + STREAK,
STREAK + " \\cdot" + localeToFixed(PR, 2),
STREAK + " \\cdot" + "(1 - " + localeToFixed(PR, 2) + ")",
"(1 - " + localeToFixed(PR, 2) + ")^" + STREAK])
</var>
<var id="ANS">
ALL ?
localeToFixed(PR, 2) + "^" + STREAK :
"(1 - " + localeToFixed(PR, 2) + ")^" + STREAK
</var>
</div>
<p>
<var>PLAYER</var> 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 <code><var>localeToFixed(PR*100, 0)</var>\%</code>
of the time.
</p>
<p class="question"><span data-if="ALL" data-unwrap="">
What is the probability of <var>PLAYER</var> making all of his next
<var>STREAK</var> free throw attempts?
</span><span data-else="" data-unwrap="">
What is the probability of <var>PLAYER</var> making none of his next
<var>STREAK</var> free throw attempts?
</span></p>
<div class="solution"><code>\large{<var>ANS</var>}</code></div>
<ul class="choices" data-show="4">
<li><code>\large{<var>OPTIONS[0]</var>}</code></li>
<li><code>\large{<var>OPTIONS[1]</var>}</code></li>
<li><code>\large{<var>OPTIONS[2]</var>}</code></li>
<li><code>\large{<var>OPTIONS[3]</var>}</code></li>
</ul>
<div class="hints">
<div data-if="ALL" data-unwrap="">
<div>
<p>We know that <code>\blue{<var>SINGLE_PCT</var> \%}</code> of the time, he'll make
his first shot.</p>
<div class="graphie">
init({
range: [[-1, 11], [-1, 1]]
});
line([0, 0], [10, 0]);
line([10,-0.2], [10,0.2]);
label([PROB10,-0.53], SINGLE_PCT + "\\%", "center");
style({ stroke: "BLUE", strokeWidth: 3 });
line([0,-0.2], [0,0.2]);
line([0,0], [PROB10,0]);
line([PROB10,-0.2], [PROB10,0.2]);
</div>
<p>Then <code><var>SINGLE_PCT</var> \%</code> of
the time he makes his first shot, he will also make his second shot, and
<code><var>localeToFixed((1-PROB)*100, 0)</var> \%</code> of the time he makes his
first shot, he will miss his second shot.</p>
<div class="graphie">
init({
range: [[-1, 11], [-1, 1]]
});
line([0, 0], [10, 0]);
line([10,-0.2], [10,0.2]);
label([PROB10, -0.53], SINGLE_PCT + "\\%", "center");
style({ stroke: "#888", strokeWidth: 3 });
line([PROB * PROB10,0], [PROB10,0]);
line([PROB10,-0.2], [PROB10,0.2]);
style({ stroke: "PURPLE", strokeWidth: 3 });
line([0,-0.2], [0,0.2]);
line([0,0], [PROB * PROB10,0]);
line([PROB * PROB10,-0.2], [PROB * PROB10,0.2]);
</div>
</div>
<p>
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 <b>and</b> the second.
So the chance of making <b>two</b> free throws in a row is <code><var>SINGLE_PCT</var>\%</code> of the times
that he made the first shot, which happens <code><var>SINGLE_PCT</var>\%</code> of the time in general.
</p>
<p>
This is <code><var>SINGLE_PCT</var>\% \cdot <var>SINGLE_PCT</var>\%</code>, or
<code><var>localeToFixed(PROB, 2)</var> \cdot <var>localeToFixed(PROB, 2)</var> \approx <var>localeToFixed(PROB*PROB, 3)</var></code>.
</p>
<div>
<p>
We can repeat this process again to get the probability of making <b>three</b> free throws in a row. We simply take
<code><var>SINGLE_PCT</var>\%</code> of probability that he makes two in a row, which we know from the previous step is
<code><var>localeToFixed(PROB*PROB, 3)</var> \approx \purple{<var>TWO_PCT</var>\%}</code>.
</p>
<div class="graphie">
init({
range: [[-1, 11], [-1, 1]]
});
line([0, 0], [10, 0]);
line([10,-0.2], [10,0.2]);
label([PROB10, -0.53], SINGLE_PCT + "\\%", "center");
line([PROB10,-0.2], [PROB10,0.2]);
label([PROB * PROB10, -0.53], TWO_PCT + "\\%", "center");
style({ stroke: "PURPLE", strokeWidth: 3 });
line([0,-0.2], [0,0.2]);
line([0,0], [PROB * PROB10,0]);
line([PROB * PROB10,-0.2], [PROB * PROB10,0.2]);
</div>
<p>
<code><var>SINGLE_PCT</var>\%</code> of <code>\purple{<var>TWO_PCT</var>\%}</code> is
<code><var>localeToFixed(PROB, 2)</var> \cdot <var>localeToFixed(PROB * PROB, 3)</var> \approx
<var>localeToFixed(PROB_CUBED, 3)</var></code>, or
about <code>\green{<var>THREE_PCT</var>\%}</code>:
</p>
<div class="graphie">
init({
range: [[-1, 11], [-1, 1]]
});
line([0, 0], [10, 0]);
line([10,-0.2], [10,0.2]);
label([PROB10, -0.53], SINGLE_PCT + "\\%", "center");
line([PROB10,-0.2], [PROB10,0.2]);
label([PROB*PROB10, -0.53], TWO_PCT + "\\%", "center");
label([PROB_CUBED*10, -0.53], THREE_PCT + "\\%", "center");
style({ stroke: "#888", strokeWidth: 3 });
line([PROB_CUBED * 10,0], [PROB * PROB10,0]);
line([PROB * PROB10,-0.2], [PROB * PROB10,0.2]);
style({ stroke: "GREEN", strokeWidth: 3 });
line([0,-0.2], [0,0.2]);
line([0,0], [PROB_CUBED*10,0]);
line([PROB_CUBED*10,-0.2], [PROB_CUBED*10,0.2]);
</div>
</div>
<p>
There is a pattern here: the chance of making two free throws in a row was
<code><var>localeToFixed(PROB, 2)</var> \cdot <var>localeToFixed(PROB, 2)</var></code>, and the probability of making
three in a row was <code><var>localeToFixed(PROB, 2)</var> \cdot <var>localeToFixed(PROB * PROB, 3)</var> =
<var>localeToFixed(PROB, 2)</var> \cdot (<var>localeToFixed(PROB, 2)</var> \cdot <var>localeToFixed(PROB, 2)</var>)
= <var>localeToFixed(PROB, 2)</var>^3</code>.
</p>
<p>
In general, you can continue in this way to find the probability of making any number of shots.
</p>
<p>
The probability of making <var>STREAK</var> free throws in a row is <code><var>localeToFixed(PROB, 2)</var> ^ <var>STREAK</var></code>.
</p>
</div>
<div data-else="" data-unwrap="">
<div>
<p>We know that <code>\blue{<var>SINGLE_PCT</var> \%}</code> of the time, he'll miss
his first shot
<code>(100 \% - <var>localeToFixed(PR*100, 0)</var> \% = <var>SINGLE_PCT</var> \%)</code>.</p>
<div class="graphie">
init({
range: [[-1, 11], [-1, 1]]
});
line([0, 0], [10, 0]);
line([10,-0.2], [10,0.2]);
label([PROB10,-0.53], SINGLE_PCT + "\\%", "center");
style({ stroke: "BLUE", strokeWidth: 3 });
line([0,-0.2], [0,0.2]);
line([0,0], [PROB10,0]);
line([PROB10,-0.2], [PROB10,0.2]);
</div>
<p>
Then <code><var>SINGLE_PCT</var> \%</code> of
the time he misses his first shot, he will also miss his second shot, and
<code><var>localeToFixed((1-PROB)*100, 0)</var> \%</code> of the time he misses his
first shot, he will make his second shot.
</p>
<div class="graphie">
init({
range: [[-1, 11], [-1, 1]]
});
line([0, 0], [10, 0]);
line([10,-0.2], [10,0.2]);
label([PROB10, -0.53], SINGLE_PCT + "\\%", "center");
style({ stroke: "#888", strokeWidth: 3 });
line([PROB * PROB10,0], [PROB10,0]);
line([PROB10,-0.2], [PROB10,0.2]);
style({ stroke: "PURPLE", strokeWidth: 3 });
line([0,-0.2], [0,0.2]);
line([0,0], [PROB * PROB10,0]);
line([PROB * PROB10,-0.2], [PROB * PROB10,0.2]);
</div>
</div>
<p>
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 <b>and</b> the second.
So the chance of missing <b>two</b> free throws in a row is <code><var>SINGLE_PCT</var>\%</code> of the times
that he missed the first shot, which happens <code><var>SINGLE_PCT</var>\%</code> of the time in general.
</p>
<p>
This is <code><var>SINGLE_PCT</var>\% \cdot <var>SINGLE_PCT</var>\%</code>, or
<code><var>localeToFixed(PROB, 2)</var> \cdot <var>localeToFixed(PROB, 2)</var> \approx
<var>localeToFixed(PROB * PROB, 3)</var></code>.
</p>
<div>
<p>
We can repeat this process again to get the probability of missing <b>three</b> free throws in a row. We simply take
<code><var>SINGLE_PCT</var>\%</code> of probability that he misses two in a row, which we know from the previous step is
<code><var>localeToFixed(PROB*PROB, 3)</var> \approx \purple{<var>TWO_PCT</var>\%}</code>.
</p>
<div class="graphie">
init({
range: [[-1, 11], [-1, 1]]
});
line([0, 0], [10, 0]);
line([10,-0.2], [10,0.2]);
label([PROB10, -0.53], SINGLE_PCT + "\\%", "center");
line([PROB10,-0.2], [PROB10,0.2]);
label([PROB * PROB10, -0.53], TWO_PCT + "\\%", "center");
style({ stroke: "PURPLE", strokeWidth: 3 });
line([0,-0.2], [0,0.2]);
line([0,0], [PROB * PROB10,0]);
line([PROB * PROB10,-0.2], [PROB*PROB10,0.2]);
</div>
<p><code><var>SINGLE_PCT</var>\%</code> of <code>\purple{<var>TWO_PCT</var>\%}</code> is
<code><var>localeToFixed(PROB, 2)</var> \cdot <var>localeToFixed(PROB*PROB, 3)</var> \approx <var>localeToFixed(PROB_CUBED, 3)</var></code>, or
about <code>\green{<var>THREE_PCT</var>\%}</code>:</p>
<div class="graphie">
init({
range: [[-1, 11], [-1, 1]]
});
line([0, 0], [10, 0]);
line([10,-0.2], [10,0.2]);
label([PROB10, -0.53], SINGLE_PCT + "\\%", "center");
line([PROB10,-0.2], [PROB10,0.2]);
label([PROB * PROB10, -0.53], TWO_PCT + "\\%", "center");
style({ stroke: "#888", strokeWidth: 3 });
line([PROB_CUBED * 10,0], [PROB * PROB10,0]);
line([PROB * PROB10,-0.2], [PROB * PROB10,0.2]);
style({ stroke: "GREEN", strokeWidth: 3 });
line([0,-0.2], [0,0.2]);
line([0,0], [PROB_CUBED * 10,0]);
line([PROB_CUBED * 10,-0.2], [PROB_CUBED * 10,0.2]);
</div>
</div>
<p>
There is a pattern here: the chance of missing two free throws in a row was
<code><var>localeToFixed(PROB, 2)</var> \cdot <var>localeToFixed(PROB, 2)</var></code>, and the probability of missing
three in a row was <code><var>localeToFixed(PROB, 2)</var> \cdot <var>localeToFixed(PROB*PROB, 3)</var> =
<var>localeToFixed(PROB, 2)</var> \cdot (<var>localeToFixed(PROB, 2)</var> \cdot <var>localeToFixed(PROB, 2)</var>)
= <var>localeToFixed(PROB, 2)</var>^3</code>.
</p>
<p>
In general, you can continue in this way to find the probability of missing any number of shots.
</p>
<p>
The probability of missing <var>STREAK</var> free throws in a row is
<code><var>localeToFixed(PROB, 2)</var> ^ <var>STREAK</var> = <var>ANS</var></code>.
</p>
</div>
</div>
</div>
<div id="YARR">
<div class="vars" data-ensure="CAPTAIN_PROB &gt; PIRATE_PROB">
<var id="CAPTAIN_NUM">randRange(1,4)</var>
<var id="CAPTAIN_DEM">CAPTAIN_NUM + randRange(1,6)</var>
<var id="CAPTAIN_PROB">CAPTAIN_NUM/CAPTAIN_DEM</var>
<var id="PIRATE_NUM">randRange(1,4)</var>
<var id="PIRATE_DEM">PIRATE_NUM + randRange(4,6)</var>
<var id="PIRATE_PROB">PIRATE_NUM/PIRATE_DEM</var>
<var id="CGCD, PGCD">[getGCD(CAPTAIN_NUM,CAPTAIN_DEM), getGCD(PIRATE_NUM,PIRATE_DEM)]</var>
<var id="C_HIT_PRETTY">"\\dfrac{" + CAPTAIN_NUM/CGCD + "}{" + CAPTAIN_DEM/CGCD + "}"</var>
<var id="C_MISS_PRETTY">"\\dfrac{" + (CAPTAIN_DEM/CGCD - CAPTAIN_NUM/CGCD) + "}{" + CAPTAIN_DEM/CGCD + "}"</var>
<var id="P_HIT_PRETTY">"\\dfrac{" + PIRATE_NUM/PGCD + "}{" + PIRATE_DEM/PGCD + "}"</var>
<var id="P_MISS_PRETTY">"\\dfrac{" + (PIRATE_DEM/PGCD - PIRATE_NUM/PGCD) + "}{" + PIRATE_DEM/PGCD + "}"</var>
<var id="INDEX">randRange(0,3)</var>
<var id="QUESTION">
[$._("the Captain hits the pirate ship, but the pirate misses"),
$._("the pirate hits the Captain's ship, but the Captain misses"),
$._("both the pirate and the Captain hit each other's ships"),
$._("both the Captain and the pirate miss")][INDEX]
</var>
<var id="ANS_N, ANS_D, ANSWER">
[[CAPTAIN_NUM * (PIRATE_DEM-PIRATE_NUM), CAPTAIN_DEM*PIRATE_DEM, CAPTAIN_PROB*(1-PIRATE_PROB)],
[(CAPTAIN_DEM-CAPTAIN_NUM) * PIRATE_NUM, CAPTAIN_DEM*PIRATE_DEM, (1-CAPTAIN_PROB)*PIRATE_PROB],
[CAPTAIN_NUM * PIRATE_NUM, CAPTAIN_DEM*PIRATE_DEM, CAPTAIN_PROB*PIRATE_PROB],
[(CAPTAIN_DEM-CAPTAIN_NUM) * (PIRATE_DEM-PIRATE_NUM), CAPTAIN_DEM*PIRATE_DEM, (1-CAPTAIN_PROB)*(1-PIRATE_PROB)]][INDEX]
</var>
<var id="C">INDEX === 0 || INDEX === 2</var>
<var id="P">INDEX === 1 || INDEX === 2</var>
</div>
<p>
<span>Captain <var>person(1)</var> has a ship, the H.M.S. Khan.</span>
<span data-if="isMale(2)">The ship is two furlongs from the dread pirate <var>person(2)</var> and his merciless band of thieves.</span><span data-else="">The ship is two furlongs from the dread pirate <var>person(2)</var> and her merciless band of thieves.</span>
<br><br>
<span data-if="isMale(2)">The Captain has probability <code><var>C_HIT_PRETTY</var></code> of hitting the pirate ship.
The pirate only has one good eye, so he hits the Captain's ship with probability
<code><var>P_HIT_PRETTY</var></code>.</span><span data-else="">The Captain has probability <code><var>C_HIT_PRETTY</var></code> of hitting the pirate ship.
The pirate only has one good eye, so she hits the Captain's ship with probability
<code><var>P_HIT_PRETTY</var></code>.</span>
</p>
<p class="question">
If both fire their cannons at the same time, what is the probability that <var>QUESTION</var>?
</p>
<div class="solution" data-forms="proper, decimal, percent"><var>ANSWER</var></div>
<div class="hints">
<p data-if="isMale(1)">
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.
</p><p data-else="">
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.
</p>
<p>
<span data-if="C"><span data-if="P" data-unwrap="">
Since they are independent, in order to get the probability that <var>QUESTION</var>, we just need to multiply together
the probability that the captain hits and the probability that
the pirate hits.
</span><span data-else="" data-unwrap="">
Since they are independent, in order to get the probability that <var>QUESTION</var>, we just need to multiply together
the probability that the captain hits and the probability that
the pirate misses.
</span></span>
<span data-else=""><span data-if="P" data-unwrap="">
Since they are independent, in order to get the probability that <var>QUESTION</var>, we just need to multiply together
the probability that the captain misses and the probability that
the pirate hits.
</span><span data-else="" data-unwrap="">
Since they are independent, in order to get the probability that <var>QUESTION</var>, we just need to multiply together
the probability that the captain misses and the probability that
the pirate misses.
</span></span>
</p>
<p data-if="C">
The probability that the Captain hits is <code><var>C_HIT_PRETTY</var></code>.
</p>
<p data-else="">
The probability that the Captain misses is <code>1 - </code> (the probability the Captain
hits), which is <code>1 - <var>C_HIT_PRETTY</var> = <var>C_MISS_PRETTY</var></code>.
</p>
<p data-if="P">
The probability that the pirate hits is <code><var>P_HIT_PRETTY</var></code>.
</p>
<p data-else="">
The probability that the pirate misses is <code>1 - </code> (the probability the pirate
hits), which is <code>1 - <var>P_HIT_PRETTY</var> = <var>P_MISS_PRETTY</var></code>.
</p>
<p>
So, the probability that <var>QUESTION</var> is
<code><var>C ? C_HIT_PRETTY : C_MISS_PRETTY</var> \cdot <var>P ? P_HIT_PRETTY : P_MISS_PRETTY</var> =
\dfrac{<var>ANS_N/getGCD(ANS_N,ANS_D)</var>}{<var>ANS_D/getGCD(ANS_N,ANS_D)</var>}</code>.
</p>
</div>
</div>
</div>
</div>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.