Added equation for standard deviation

This commit is contained in:
Roger Labbe 2015-03-07 19:52:25 -08:00
parent 5f7c7de378
commit 38322f475d

View File

@ -386,7 +386,14 @@
"\n",
"**The standard deviation is defined as the square root of the average of the squared differences from the mean.**\n",
"\n",
"That's a mouthful; let's just work through that with the data from three classes. We just subtract the mean of x from each value of x, square it, take the average of those, and then take the square root of the result. The mean of $[1.8, 2.0, 1.7, 1.9, 1.6]$ is 1.8, so we compute the standard deviation as\n",
"That's a mouthful; as an equation this is stated as\n",
"\n",
"$$\\sigma = \\sqrt{\\frac{1}{N}\\sum_{i=1}^N(x_i - \\mu)^2}$$\n",
"\n",
"where $\\sigma$ is the notation for the standard deviation.\n",
"\n",
"\n",
"Let's just work through that with the data from three classes. We just subtract the mean of x from each value of x, square it, take the average of those, and then take the square root of the result. The mean of $[1.8, 2.0, 1.7, 1.9, 1.6]$ is 1.8, so we compute the standard deviation as\n",
"\n",
"$$ \n",
"\\begin{aligned}\n",
@ -1001,7 +1008,7 @@
"Both ways of thinking about it are equivalent. We use the notation $\\sigma^2$ for the variance, and the equation for the variance is\n",
"\n",
"\n",
"$$\\sigma = \\frac{1}{N}\\sum_{i=1}^N(x_i - \\mu)^2$$\n",
"$$\\sigma^2 = \\frac{1}{N}\\sum_{i=1}^N(x_i - \\mu)^2$$\n",
"\n",
"\n",
"To make sure we understand this let's compute the variance for $x$:\n",
@ -9093,7 +9100,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.4.3"
"version": "3.4.2"
}
},
"nbformat": 4,