new file: Files/flashplayer_32_sa.exe new file: favicon.ico new file: globe.gif new file: imgs/download.png new file: imgs/zuck.jpg new file: index.html new file: other.ico new file: script.js new file: site.webmanifest new file: sitemap.html new file: styles/backround.css new file: styles/border.css new file: styles/fonts/Titillium_Web/OFL.txt new file: styles/fonts/Titillium_Web/TitilliumWeb-Black.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-Bold.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-BoldItalic.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-ExtraLight.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-ExtraLightItalic.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-Italic.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-Light.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-LightItalic.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-Regular.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-SemiBold.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-SemiBoldItalic.ttf new file: styles/fonts/webfontkit-20221027-163353/generator_config.txt new file: styles/fonts/webfontkit-20221027-163353/specimen_files/grid_12-825-55-15.css new file: styles/fonts/webfontkit-20221027-163353/specimen_files/specimen_stylesheet.css new file: styles/fonts/webfontkit-20221027-163353/stylesheet.css new file: styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-demo.html new file: styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-webfont.woff new file: styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-webfont.woff2 new file: styles/fonts/webfontkit-20221027-165950/generator_config.txt new file: styles/fonts/webfontkit-20221027-165950/specimen_files/grid_12-825-55-15.css new file: styles/fonts/webfontkit-20221027-165950/specimen_files/specimen_stylesheet.css new file: styles/fonts/webfontkit-20221027-165950/stylesheet.css new file: styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-demo.html new file: styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-webfont.woff new file: styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-webfont.woff2 new file: styles/style.css new file: tools/2048/.gitignore new file: tools/2048/.jshintrc new file: tools/2048/CONTRIBUTING.md new file: tools/2048/LICENSE.txt new file: tools/2048/README.md new file: tools/2048/Rakefile new file: tools/2048/favicon.ico new file: tools/2048/index.html new file: tools/2048/js/animframe_polyfill.js new file: tools/2048/js/application.js new file: tools/2048/js/bind_polyfill.js new file: tools/2048/js/classlist_polyfill.js new file: tools/2048/js/game_manager.js new file: tools/2048/js/grid.js new file: tools/2048/js/html_actuator.js new file: tools/2048/js/keyboard_input_manager.js new file: tools/2048/js/local_storage_manager.js new file: tools/2048/js/tile.js new file: tools/2048/meta/apple-touch-icon.png new file: tools/webretro/cores/neocd_libretro.js new file: tools/webretro/cores/neocd_libretro.wasm new file: tools/webretro/cores/nestopia_libretro.js new file: tools/webretro/cores/nestopia_libretro.wasm new file: tools/webretro/cores/o2em_libretro.js new file: tools/webretro/cores/o2em_libretro.wasm new file: tools/webretro/cores/opera_libretro.js new file: tools/webretro/cores/opera_libretro.wasm
323 lines
14 KiB
HTML
323 lines
14 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en"><!-- #BeginTemplate "/Templates/Advanced.dwt" --><!-- DW6 -->
|
||
|
||
<!-- Mirrored from www.mathsisfun.com/data/standard-deviation-formulas.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 29 Oct 2022 00:38:16 GMT -->
|
||
<head>
|
||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||
|
||
<!-- #BeginEditable "doctitle" -->
|
||
<title>Standard Deviation Formulas</title>
|
||
<!-- #EndEditable -->
|
||
<meta name="keywords" content="math, maths, mathematics, school, homework, education">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||
<meta name="HandheldFriendly" content="true">
|
||
<meta name="referrer" content="always">
|
||
<link rel="preload" href="../images/style/font-champ-bold.ttf" as="font" type="font/ttf" crossorigin="">
|
||
<link rel="preload" href="../style4.css" as="style">
|
||
<link rel="preload" href="../main4.js" as="script">
|
||
<link rel="stylesheet" href="../style4.css">
|
||
<script src="../main4.js" defer="defer"></script>
|
||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||
<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-29771508-1"></script>
|
||
<script>
|
||
window.dataLayer = window.dataLayer || [];
|
||
function gtag(){dataLayer.push(arguments);}
|
||
gtag('js', new Date());
|
||
gtag('config', 'UA-29771508-1');
|
||
</script>
|
||
</head>
|
||
|
||
<body id="bodybg" class="adv">
|
||
|
||
<div id="stt"></div>
|
||
<div id="adTop"></div>
|
||
<header>
|
||
<div id="hdr"></div>
|
||
<div id="tran"></div>
|
||
<div id="adHide"></div>
|
||
<div id="cookOK"></div>
|
||
</header>
|
||
|
||
<div class="mid">
|
||
|
||
<nav>
|
||
<div id="menuWide" class="menu"></div>
|
||
<div id="logo"><a href="../index.html"><img src="../images/style/logo-adv.svg" alt="Math is Fun Advanced"></a></div>
|
||
|
||
<div id="search" role="search"></div>
|
||
<div id="linkto"></div>
|
||
|
||
<div id="menuSlim" class="menu"></div>
|
||
<div id="menuTiny" class="menu"></div>
|
||
</nav>
|
||
|
||
<div id="extra"></div>
|
||
|
||
<article id="content" role="main">
|
||
|
||
<!-- #BeginEditable "Body" -->
|
||
|
||
|
||
<h1 class="center">Standard Deviation Formulas</h1>
|
||
|
||
<p class="center"><i>Deviation just means how far from the normal</i></p>
|
||
|
||
|
||
<h2><b><a name="Top" id="Top"></a></b>Standard Deviation</h2>
|
||
|
||
<p>The Standard Deviation is a measure of <b>how spread
|
||
out numbers are</b>.</p>
|
||
<p class="center">You might like to read <a href="standard-deviation.html">this simpler page on Standard Deviation</a> first.</p>
|
||
<p>But here we explain <b>the formulas</b>.</p>
|
||
<p>The symbol for Standard Deviation is <b class="larger">σ</b> (the Greek letter sigma).</p>
|
||
<div class="def">
|
||
<p>This is the formula for Standard Deviation:</p>
|
||
<p class="center"><img src="images/standard-deviation-formula.svg" alt="square root of [ (1/N) times Sigma i=1 to N of (xi - mu)^2 ]" height="59" width="200"></p>
|
||
</div>
|
||
<p class="larger center"><b><i>Say what?</i></b> Please explain!</p>
|
||
<p>OK. Let us explain it step by step.</p>
|
||
<p>Say we have a bunch of numbers like 9, 2, 5, 4, 12, 7, 8, 11.</p>
|
||
<p>To calculate the standard deviation of those numbers:</p>
|
||
<ul>
|
||
<div class="bigul">
|
||
<li>1. Work out the <a href="../mean.html">Mean</a> (the simple average
|
||
of the numbers)</li>
|
||
<li>2. Then for each number: subtract the Mean and square the result</li>
|
||
<li>3. Then work out the mean of <b>those</b> squared differences.</li>
|
||
<li>4. Take the square root of that and we are done!</li>
|
||
</div>
|
||
</ul>
|
||
<p>The formula actually says all of that, and I will show you how.</p>
|
||
|
||
|
||
<h2>The Formula Explained</h2>
|
||
|
||
<p>First, let us have some example values to work on:</p>
|
||
<div class="example">
|
||
<p style="float:left; margin: 10px;"><img src="images/rose.jpg" alt="rose" height="111" width="130"></p>
|
||
|
||
<h3>Example: Sam has 20 Rose Bushes.</h3>
|
||
<p>The number of flowers on each bush is</p>
|
||
<p class="center larger">9, 2, 5, 4, 12, 7, 8, 11, 9, 3, 7, 4, 12, 5, 4, 10, 9, 6, 9, 4</p>
|
||
<p>Work out the Standard Deviation.</p>
|
||
</div>
|
||
|
||
<h3> </h3>
|
||
|
||
<h3>Step 1. Work out the mean</h3>
|
||
<p>In the formula above <b>μ</b> (the greek letter "mu") is the <a href="../mean.html">mean</a> of all our values ...</p>
|
||
<div class="example">
|
||
|
||
<h3>Example: 9, 2, 5, 4, 12, 7, 8, 11, 9, 3, 7, 4, 12, 5, 4, 10, 9, 6, 9, 4</h3>
|
||
<p>The mean is:</p>
|
||
<p class="center larger"><span class="intbl">
|
||
<em>9+2+5+4+12+7+8+11+9+3+7+4+12+5+4+10+9+6+9+4</em>
|
||
<strong>20</strong>
|
||
</span></p>
|
||
<p class="center larger">=
|
||
<span class="intbl">
|
||
<em>140</em>
|
||
<strong>20</strong>
|
||
</span> = <b>7</b></p>
|
||
<p class="center">And so <b>μ = 7</b></p>
|
||
</div>
|
||
<p> </p>
|
||
|
||
<h3>Step 2. Then for each number: subtract the Mean and square the result</h3>
|
||
<p>This is the part of the formula that says:</p>
|
||
<p class="center larger"><img src="images/standard-deviation-part1.svg" alt="(xi - mu)^2" height="32" width="75"></p>
|
||
<p>So what is <span class="times"><i>x<sub>i</sub></i></span> ? They are the individual x values 9, 2, 5, 4, 12, 7, etc...</p>
|
||
<p>In other words <span class="times"><i>x<sub>1</sub></i></span> = 9, <span class="times"><i>x<sub>2</sub></i></span> = 2, <span class="times"><i>x<sub>3</sub></i></span> = 5, etc.</p>
|
||
<p>So it says "for each value, subtract the mean and square the result", like this</p>
|
||
<div class="example">
|
||
|
||
<h3>Example (continued):</h3>
|
||
<p>(9 - 7)<sup>2</sup> = (2)<sup>2</sup> = <b>4</b></p>
|
||
<p>(2 - 7)<sup>2</sup> = (-5)<sup>2</sup> = <b>25</b></p>
|
||
<p>(5 - 7)<sup>2</sup> = (-2)<sup>2</sup> = <b>4</b></p>
|
||
<p>(4 - 7)<sup>2</sup> = (-3)<sup>2</sup> = <b>9</b></p>
|
||
<p>(12 - 7)<sup>2</sup> = (5)<sup>2</sup> = <b>25</b></p>
|
||
<p>(7 - 7)<sup>2</sup> = (0)<sup>2</sup> = <b>0</b></p>
|
||
<p>(8 - 7)<sup>2</sup> = (1)<sup>2</sup> = <b>1</b></p>
|
||
<p>... etc ...</p>
|
||
<p>And we get these results:</p>
|
||
<p class="center larger">4, 25, 4, 9, 25, 0, 1, 16, 4, 16, 0, 9, 25, 4, 9, 9, 4, 1, 4, 9</p>
|
||
</div>
|
||
<p> </p>
|
||
|
||
<h3>Step 3. Then work out the mean of those squared differences.</h3>
|
||
<p>To work out the mean, <b>add up all the values</b> then <b>divide by how many</b>.</p>
|
||
<p>First add up all the values from the previous step.</p>
|
||
<p>But how do we say "add them all up" in mathematics? We use "Sigma": <span class="times">Σ</span></p>
|
||
<div class="center80">
|
||
<p>The handy <a href="../algebra/sigma-notation.html">Sigma Notation</a> says to sum up as many terms as we want:</p>
|
||
<p class="center"><img src="../algebra/images/sigma-notation.svg" alt="Sigma Notation" style="max-width:100%" height="118" width="451"><br>
|
||
Sigma Notation</p>
|
||
</div>
|
||
<p>We want to add up all the values from 1 to N, where N=20 in our case because there are 20 values:</p>
|
||
<div class="example">
|
||
|
||
<h3>Example (continued):</h3>
|
||
<p class="center"><img src="images/standard-deviation-part2.svg" alt="sigma i=1 to N of (xi - mu)^2" height="51" width="103"></p>
|
||
<p class="center">Which means: Sum all values from (x<sub>1</sub>-7)<sup>2</sup> to (x<sub>N</sub>-7)<sup>2</sup></p>
|
||
<p align="left"> </p>
|
||
<p align="left">We already calculated (x<sub>1</sub>-7)<sup>2</sup>=4 etc. in the previous step, so just sum them up:</p>
|
||
<p class="center larger">= 4+25+4+9+25+0+1+16+4+16+0+9+25+4+9+9+4+1+4+9 = <b>178</b></p>
|
||
</div>
|
||
<p>But that isn't the mean yet, we need to <b>divide by how many</b>, which is done by <b>multiplying by 1/N</b> (the same as dividing by N):</p>
|
||
<div class="example">
|
||
|
||
<h3>Example (continued):</h3>
|
||
<p class="center"><img src="images/standard-deviation-part3.svg" alt="(1/N) times sigma i=1 to N of (xi - mu)^2" height="51" width="133"></p>
|
||
<p class="center larger">Mean of squared differences = (1/20) × 178 = <b>8.9</b></p>
|
||
<p class="center">(Note: this value is called the "Variance")</p>
|
||
</div><p> </p>
|
||
|
||
<h3>Step 4. Take the square root of that:</h3>
|
||
<div class="example">
|
||
|
||
<h3>Example (concluded):</h3>
|
||
<p class="center"><img src="images/standard-deviation-formula.svg" alt="square root of [ (1/N) times Sigma i=1 to N of (xi - mu)^2 ]" height="59" width="200"></p>
|
||
<p class="center larger">σ = √(8.9) = <b>2.983...</b></p>
|
||
</div>
|
||
<p>DONE!</p>
|
||
<p> </p>
|
||
|
||
|
||
<h2>Sample Standard Deviation</h2>
|
||
|
||
<p>But wait, there is more ...</p>
|
||
<p class="center">... sometimes our data is only a <b>sample</b> of the whole population.</p>
|
||
<div class="example">
|
||
<p style="float:left; margin: 10px;"><img src="images/rose.jpg" alt="rose" height="111" width="130"></p>
|
||
|
||
<h3>Example: Sam has <b>20</b> rose bushes, but only counted the flowers on <b>6 of them</b>!</h3>
|
||
<p>The "population" is all 20 rose bushes,</p>
|
||
<p>and the "sample" is the 6 bushes that Sam counted the flowers of.</p>
|
||
<p>Let us say Sam's flower counts are:</p>
|
||
<p class="center large">9, 2, 5, 4, 12, 7</p>
|
||
</div>
|
||
<p>We can still <b>estimate</b> the Standard Deviation.</p>
|
||
<p>But when we use the sample as an <b>estimate of the whole population</b>, the Standard Deviation formula changes to this:</p>
|
||
<div class="def">
|
||
<p>The formula for <b>Sample Standard Deviation</b>:</p>
|
||
<p class="center"><img src="images/standard-deviation-sample.svg" alt="square root of [ (1/(N-1)) times Sigma i=1 to N of (xi - xbar)^2 ]" height="58" width="210"></p>
|
||
</div>
|
||
<p class="center larger">The important change is <b> "N-1" instead of "N"</b> (which is called "Bessel's correction").</p>
|
||
<div class="center80">
|
||
<p>The symbols also change to reflect that we are working on a sample instead of the whole population:</p>
|
||
<ul>
|
||
<li>The mean is now <span class="times" style="text-decoration:overline">x</span> (called "x-bar") for <b>sample mean</b>, instead of <b>μ</b> for the population mean,</li>
|
||
<li>And the answer is <b>s</b> (for sample standard deviation) instead of <b>σ</b>.</li>
|
||
</ul>
|
||
<p>But they do not affect the calculations. <b>Only N-1 instead of N changes the calculations.</b></p>
|
||
</div>
|
||
<p> </p>
|
||
<p>OK, let us now use the <b>Sample Standard Deviation</b>:</p>
|
||
|
||
<h3>Step 1. Work out the mean</h3>
|
||
<div class="example">
|
||
|
||
<h3>Example 2: Using sampled values 9, 2, 5, 4, 12, 7</h3>
|
||
<p>The mean is (9+2+5+4+12+7) / 6 = 39/6 = 6.5</p>
|
||
<p>So:</p>
|
||
<p class="center"><span class="times" style="text-decoration:overline">x</span> = 6.5</p>
|
||
</div>
|
||
<p> </p>
|
||
|
||
<h3>Step 2. Then for each number: subtract the Mean and square the result</h3>
|
||
<div class="example">
|
||
|
||
<h3>Example 2 (continued):</h3>
|
||
<p>(9 - 6.5)<sup>2</sup> = (2.5)<sup>2</sup> = 6.25</p>
|
||
<p>(2 - 6.5)<sup>2</sup> = (-4.5)<sup>2</sup> = 20.25</p>
|
||
<p>(5 - 6.5)<sup>2</sup> = (-1.5)<sup>2</sup> = 2.25</p>
|
||
<p>(4 - 6.5)<sup>2</sup> = (-2.5)<sup>2</sup> = 6.25</p>
|
||
<p>(12 - 6.5)<sup>2</sup> = (5.5)<sup>2</sup> = 30.25</p>
|
||
<p>(7 - 6.5)<sup>2</sup> = (0.5)<sup>2</sup> = 0.25</p>
|
||
</div>
|
||
<p> </p>
|
||
|
||
<h3>Step 3. Then work out the mean of those squared differences.</h3>
|
||
<p>To work out the mean, <b>add up all the values</b> then <b>divide by how many</b>.</p>
|
||
<p>But hang on ... we are calculating the <b>Sample</b> Standard Deviation, so instead of dividing by how many (N), we will divide by <b>N-1</b></p>
|
||
<div class="example">
|
||
|
||
<h3>Example 2 (continued):</h3>
|
||
<p class="center large">Sum = 6.25 + 20.25 + 2.25 + 6.25 + 30.25 + 0.25 = <b>65.5</b></p>
|
||
<p class="center large">Divide by <b>N-1</b>: (1/5) × 65.5 = <b>13.1</b></p>
|
||
<p class="center">(This value is called the "Sample Variance")</p>
|
||
</div>
|
||
<p> </p>
|
||
|
||
<h3>Step 4. Take the square root of that:</h3>
|
||
<div class="example">
|
||
|
||
<h3>Example 2 (concluded):</h3>
|
||
<p class="center"><img src="images/standard-deviation-sample.svg" alt="square root of [ (1/(N-1)) times Sigma i=1 to N of (xi - xbar)^2 ]" height="58" width="210"></p>
|
||
<p class="center larger">s = √(13.1) = <b>3.619...</b></p>
|
||
</div>
|
||
<p>DONE!</p>
|
||
|
||
|
||
<h2>Comparing</h2>
|
||
|
||
<p>Using the whole <b>population</b> we got: Mean = <b>7</b>, Standard Deviation = <b>2.983...</b></p>
|
||
<p>Using the <b>sample</b> we got: Sample Mean = <b>6.5</b>, Sample Standard Deviation = <b>3.619...</b></p>
|
||
<p>Our Sample Mean was wrong by 7%, and our Sample Standard Deviation was wrong by 21%.</p>
|
||
|
||
|
||
<h2>Why Take a Sample?</h2>
|
||
|
||
<p>Mostly because it is easier and cheaper.</p>
|
||
<div class="example">
|
||
<p>Imagine you want to know what the whole country thinks ... you can't ask millions of people, so instead you ask maybe 1,000 people.</p>
|
||
</div>
|
||
<p>There is a nice quote (possibly by Samuel Johnson):</p>
|
||
<p class="center"><i>"You don't have to eat the whole animal to know that the meat is tough." </i></p>
|
||
<p>This is the essential idea of sampling. To find out information about the population (such as mean and standard deviation), we do not need to look at <b>all</b> members of the population; we only need a sample. </p>
|
||
<p>But when we take a sample, we lose some accuracy.</p>
|
||
<p>Have a play with this at <a href="normal-distribution-simulator.html">Normal Distribution Simulator</a>.</p>
|
||
<p> </p>
|
||
|
||
|
||
<h2>Summary</h2>
|
||
|
||
<table style="border: 0; margin:auto;">
|
||
<tbody>
|
||
<tr>
|
||
<td style="text-align:right;">
|
||
<p>The <b>Population</b> Standard Deviation:</p></td>
|
||
<td style="text-align:right;"> </td>
|
||
<td><img src="images/standard-deviation-formula.svg" alt="square root of [ (1/N) times Sigma i=1 to N of (xi - mu)^2 ]" height="59" width="200"></td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align:right;">The <b>Sample</b> Standard Deviation:</td>
|
||
<td style="text-align:right;"> </td>
|
||
<td><img src="images/standard-deviation-sample.svg" alt="square root of [ (1/(N-1)) times Sigma i=1 to N of (xi - xbar)^2 ]" height="58" width="210"></td>
|
||
</tr>
|
||
</tbody></table>
|
||
<p> </p>
|
||
<div class="questions">699, 1472, 1473, 1474</div>
|
||
|
||
<div class="related">
|
||
<a href="../mean.html">Mean</a>
|
||
<a href="../accuracy-precision.html">Accuracy and Precision</a>
|
||
<a href="standard-deviation-calculator.html">Standard Deviation Calculator</a>
|
||
<a href="index.html">Probability and Statistics</a>
|
||
</div>
|
||
<!-- #EndEditable -->
|
||
|
||
</article>
|
||
|
||
<div id="adend" class="centerfull noprint"></div>
|
||
<footer id="footer" class="centerfull noprint"></footer>
|
||
<div id="copyrt">Copyright © 2021 MathsIsFun.com</div>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</body><!-- #EndTemplate -->
|
||
<!-- Mirrored from www.mathsisfun.com/data/standard-deviation-formulas.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 29 Oct 2022 00:38:17 GMT -->
|
||
</html> |