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

314 lines (290 sloc) 15.802 kb
<!DOCTYPE html>
<html data-require="math graphie word-problems stat">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Z-scores 3: Finding areas under the curve with a z-table</title>
<script src="../khan-exercise.js"></script>
<style>
.reading span {
width: 32px;
font-size: 11px;
padding: 5px;
}
.reading span:first-child {
font-weight: bold;
width: 22px;
border-right: 2px solid #CCCCCC;
}
</style>
</head>
<body>
<div class="exercise">
<div class="problems">
<div>
<div class="vars">
<var id="INDEX">randRange(0, 3)</var>
<var id="STDDEV">[4, 5, 8, 10][INDEX]</var>
<var id="ZSCORES">
(function() {
var zScores = [];
if (STDDEV === 8) {
var zDecimal1 = randRange(0, 2) * 2;
var zDecimal2 = randRange(zDecimal1 / 2 + 1, 3) * 2;
} else {
var zDecimal1 = randRange(0, STDDEV - 2);
var zDecimal2 = randRange(zDecimal1 + 1, STDDEV - 1);
}
zScores.push(roundTo(2, randRange(0, 2) + zDecimal1 / STDDEV) * randRangeNonZero(-1, 1));
zScores.push(roundTo(2, floorTo(0,
abs(zScores[0])) + zDecimal2 / STDDEV) * randRangeNonZero(-1, 1));
return sortNumbers(zScores);
})()
</var>
<var id="ROW_INDEX_1">floorTo(0, abs(ZSCORES[0]) * 10) % 10</var>
<var id="COL_INDEX_1">(roundTo(0, abs(ZSCORES[0]) * 100)) % 10</var>
<var id="ROW_INDEX_2">floorTo(0, abs(ZSCORES[1]) * 10) % 10</var>
<var id="COL_INDEX_2">(roundTo(0, abs(ZSCORES[1]) * 100)) % 10</var>
<var id="MEAN">randRange(95, 99) - STDDEV * 3</var>
<var id="GRADES">[MEAN + ZSCORES[0] * STDDEV, MEAN + ZSCORES[1] * STDDEV]</var>
<var id="ROWS">
(function() {
var rowNames = [];
for (var i = floorTo(0, abs(ZSCORES[0])); i &lt; (floorTo(0, abs(ZSCORES[0])) + 1); i += 0.1) {
rowNames.push(i.toFixed(1));
}
return rowNames;
})()
</var>
<var id="COLUMNS">[".00", ".01", ".02", ".03", ".04", ".05", ".06", ".07", ".08", ".09"]</var>
<var id="ZGRID">
(function() {
var zGrid = [];
for (var i = 0; i &lt; ROWS.length; i++) {
var zRow = [];
for (var j = 0; j &lt; COLUMNS.length; j++) {
zRow.push(zScores(roundTo(2,
(floorTo(0, abs(ZSCORES[0])) + i / 10 + j / 100) * 100)).toFixed(4));
}
zGrid.push(zRow);
}
return zGrid;
})()
</var>
<var id="ANSWER">
(function() {
var a, b;
if (ZSCORES[0] &gt;= 0) {
a = ZGRID[ROW_INDEX_1][COL_INDEX_1];
} else {
a = 1 - ZGRID[ROW_INDEX_1][COL_INDEX_1];
}
if (ZSCORES[1] &gt;= 0) {
b = ZGRID[ROW_INDEX_2][COL_INDEX_2];
} else {
b = 1 - ZGRID[ROW_INDEX_2][COL_INDEX_2];
}
return roundTo(4, b - a);
})()
</var>
<var id="HEADER">"z"</var>
</div>
<div class="problem">
The scores on a statewide <var>course( 1 )</var> exam were normally distributed with
<code>\mu = <var>MEAN</var></code> and <code>\sigma = <var>STDDEV</var></code>.
</div>
<p class="question">
What percentage of test-takers had a grade between <code><var>GRADES[0]</var></code>
and <code><var>GRADES[1]</var></code> on the exam?
Use the cumulative z-table provided below. Round to two decimal places.
</p>
<div class="fake_header reading">
<span><var>HEADER</var></span><span data-each="COLUMNS as i, column"><var>column</var></span>
</div>
<div class="fake_row reading" data-each="ROWS as i, row">
<span><var>row</var></span><span data-each="ZGRID[i] as j, zgrid"><var>zgrid</var></span>
</div>
<div class="solution" data-inexact data-max-error="0.01" data-forms="percent">
<span><var>roundTo( 2, ANSWER * 100 )</var></span>
</div>
<div class="hints">
<p>
A cumulative z-table shows the probability that a standard normal variable will
be <b>less than</b> a certain value <b>(z)</b>.
</p>
<p>
In order to use the z-table, we first need to determine the
<span class="hint_blue">z-scores</span> of the two grades which we were given.
</p>
<div>
<p>
Recall that we can calculate the z-scores by subtracting the
<span class="hint_pink">mean <code>(\mu)</code></span> from
each exam grade and then dividing by the <span class="hint_green">standard
deviation <code>(\sigma)</code></span>.
</p>
<p data-each="GRADES as index, grade">
<code>
\large{\quad z \quad = \quad
\dfrac{x - \pink{\mu}}{\green{\sigma}}
\quad = \quad \dfrac{<var>grade</var> - \pink{<var>MEAN</var>}}{\green{<var>STDDEV</var>}}
\quad = \quad <var>ZSCORES[index]</var>}
</code>
</p>
</div>
<div>
<p>
We can find the percentage of test-takers that earned between
<code><var>GRADES[0]</var></code> and <code><var>GRADES[1]</var></code>
by finding the area between <code><var>ZSCORES[0]</var></code> and
<code><var>ZSCORES[1]</var></code> under the standard normal curve. After
looking up these two z-scores in our z-table, subtracting the two table
values will provide us with the total area.
</p>
<div class="graphie" id="grid">
init({
range: [[-4, 4], [-1.5, 4.7]],
scale: [430 / 8, 30]
});
style({ stroke: "#bbb" }, function() {
line([-3.5, 0], [3.5, 0]);
});
graph.pdf = function(x) {
return gaussianPDF(0, 1, x) * 4 / gaussianPDF(0, 1, 0) + 0.2;
};
style({ stroke: BLUE }, function() {
plot(graph.pdf, [-3.5, 3.5]);
});
</div>
</div>
<div>
<div data-if="ZSCORES[1] < 0"><p>
Since the normal curve is symmetrical, the area <b>less than</b>
<code><var>ZSCORES[1]</var></code> is equal to the area
<b>greater than</b> <code><var>abs( ZSCORES[1] )</var></code>, which can
be found by looking up <code><var>abs( ZSCORES[1] )</var></code>
on the z-table and subtracting the table value from <code>1</code>, the
total area under the curve.
</p></div>
<p data-if="ZSCORES[1] < 0">
<code>1 - <var>ZGRID[ ROW_INDEX_2 ][ COL_INDEX_2 ]</var> =
<var>roundTo( 4, 1 - ZGRID[ ROW_INDEX_2 ][ COL_INDEX_2 ] )</var></code>.
This value, <code class="hint_blue">
<var>roundTo( 4, 1 - ZGRID[ ROW_INDEX_2 ][ COL_INDEX_2 ] )</var></code>,
represents the portion of the population that scored lower than
<code><var>GRADES[1]</var></code> on the exam.
</p>
<p data-else>
Look up <code><var>ZSCORES[1]</var></code> on the z-table. This value,
<code class="hint_blue"> <var>ZGRID[ ROW_INDEX_2 ][ COL_INDEX_2 ]</var></code>,
represents the portion of the population that scored lower than
<code><var>GRADES[1]</var></code> on the exam.
</p>
<div class="graphie">
var nth = ":nth-child(" + ( COL_INDEX_2 + 2 ) + ")";
$( ".fake_row" ).eq( ROW_INDEX_2 ).find( "span" + nth )
.css( "background", KhanUtil.BLUE );
</div>
<div class="graphie" data-update="grid">
style({ stroke: "#bbb" }, function() {
graph.zLine1 = line([ZSCORES[1], 0], [ZSCORES[1], graph.pdf(ZSCORES[1])]).toBack();
});
graph.zLabel = label([ZSCORES[1], 0], roundTo(2, ZSCORES[1]), "below", { color: "#bbb" });
var step = 1 / 50;
blueShape = [];
blueShape.push([-3.5, 0]);
for (var i = -3.5; i &lt;= ZSCORES[1]; i += step) {
blueShape.push([i, graph.pdf(i)]);
}
blueShape.push([ZSCORES[1], graph.pdf(ZSCORES[1])]);
blueShape.push([ZSCORES[1], 0]);
blueShape.push([-3.5, 0]);
style({ stroke: null, fill: BLUE, opacity: 0.3 }, function() {
graph.blueShape = path(blueShape);
});
</div>
</div>
<div>
<div data-if="ZSCORES[0] < 0"><p>
Since the normal curve is symmetrical, the area <b>less than</b>
<code><var>ZSCORES[0]</var></code> is equal to the area
<b>greater than</b> <code><var>abs(ZSCORES[0])</var></code>, which can
be found by looking up <code><var>abs(ZSCORES[0])</var></code>
on the z-table and subtracting the table value from <code>1</code>, the
total area under the curve.
</p></div>
<p data-if="ZSCORES[0] < 0">
<code>1 - <var>ZGRID[ROW_INDEX_1][COL_INDEX_1]</var> =
<var>roundTo(4, 1 - ZGRID[ROW_INDEX_1][COL_INDEX_1])</var></code>. This value,
<code class="hint_orange"><var>roundTo(4, 1 - ZGRID[ROW_INDEX_1][COL_INDEX_1])</var></code>,
represents the portion of the population that scored lower than
<code><var>GRADES[0]</var></code> on the exam.
</p>
<p data-else>
Look up <code><var>ZSCORES[0]</var></code> on the z-table. This value,
<code class="hint_orange"><var>ZGRID[ ROW_INDEX_1 ][ COL_INDEX_1 ]</var></code>,
represents the portion of the population that scored lower than
<code><var>GRADES[0]</var></code> on the exam.
</p>
<div class="graphie">
var nth = ":nth-child(" + (COL_INDEX_1 + 2) + ")";
$(".fake_row").eq(ROW_INDEX_1).find("span" + nth).css("background", ORANGE);
</div>
<div class="graphie" data-update="grid">
style({ stroke: "#bbb" }, function() {
graph.zLine2 = line([ZSCORES[0], 0], [ZSCORES[0], graph.pdf(ZSCORES[0])]).toBack();
});
graph.zLabel.remove();
graph.zLabel = label([ZSCORES[0], 0], roundTo(2, ZSCORES[0]), "below", { color: "#bbb" });
var step = 1 / 50;
graph.blueShape.remove();
orangeShape = [];
orangeShape.push([-3.5, 0]);
for (var i = -3.5; i &lt;= ZSCORES[0]; i += step) {
orangeShape.push([i, graph.pdf(i)]);
}
orangeShape.push([ZSCORES[0], graph.pdf(ZSCORES[0])]);
orangeShape.push([ZSCORES[0], 0]);
orangeShape.push([-3.5, 0]);
style({ stroke: null, fill: ORANGE, opacity: 0.7 }, function() {
graph.orangeShape = path(orangeShape);
});
blueShape = [];
blueShape.push([ZSCORES[0], 0]);
for (var i = ZSCORES[0]; i &lt;= ZSCORES[1]; i += step) {
blueShape.push([i, graph.pdf(i)]);
}
blueShape.push([ZSCORES[1], graph.pdf(ZSCORES[1])]);
blueShape.push([ZSCORES[1], 0]);
blueShape.push([ZSCORES[0], 0]);
style({ stroke: null, fill: BLUE, opacity: 0.3 }, function() {
graph.blueShape = path(blueShape);
});
</div>
</div>
<div>
<p>
Finally, subtract the two cumulative areas to arrive at our final answer:
<code>\blue{<span data-if="ZSCORES[1] < 0">
<var>roundTo(4, 1 - ZGRID[ROW_INDEX_2][COL_INDEX_2])</var>
</span><span data-else>
<var>roundTo(4, ZGRID[ROW_INDEX_2][COL_INDEX_2])</var>
</span>} - \orange{<span data-if="ZSCORES[0] < 0">
<var>roundTo(4, 1 - ZGRID[ROW_INDEX_1][COL_INDEX_1])</var>
</span><span data-else>
<var>roundTo(4, ZGRID[ROW_INDEX_1][COL_INDEX_1])</var>
</span>} = <var>ANSWER</var></code><br />
Thus, <code class="hint_pink"><var>roundTo( 2, ANSWER * 100 )</var>\%</code>
of the test-takers scored between <code><var>GRADES[0]</var></code> and
<code><var>GRADES[1]</var></code> on the <var>course( 1 )</var> exam.
</p>
<div class="graphie" data-update="grid">
graph.orangeShape.remove();
graph.zLabel.remove();
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.