 Hello, in this video we will discuss measures of variation. Measure of variation or measure of spread or dispersion as it may be known as by other people or other textbooks describes how spread out or scattered a set of data is or are. Measures of variation include the range, the standard deviation, and the variance. You've likely calculated a range before, but maybe you have never calculated the standard deviation or variance before, so we are going to spend some time on that. So the range is simply the maximum data value minus the minimum data value. So remember we're looking at measures of variation or measures of spread. How spread out are the data values? The standard deviation of a set of sample values, which is represented by lowercase s, for standard deviation, is a measure of how far the data values are from the mean. So the larger the standard deviation, the further away on average the data values are from the mean. So it's kind of like the average distance of the data values from their mean. So here's the formula for standard deviation of a sample. First things first, you take each data value and you subtract the mean from it. So you take every data value and you subtract the mean. And then you square each of those deviations or each of those differences. Then you add up all those square deviations, so you add them all up. You divide by the number of data values minus one, so if you have ten data values, you will divide by ten minus one, you will divide by nine. And then you'll take the square root of that entire quotient there, the top divided by the bottom. That's the square root of that value. Don't worry, we are going to use technology to find that, but I want us to first calculate a standard deviation by hand, which we'll do in just a minute. So the standard deviation is a measure of variation of all values from the mean. The value of the standard deviation is always positive, so if you ever get a negative number when you do your standard deviation calculation, you did something wrong. It can increase dramatically with the inclusion of outliers, so in other words the standard deviation is not resistant, outliers can really mess up the standard deviation, make it go up quite a bit. The units of the standard deviation are the same units as the original data values, so if the data values are dollars, then the standard deviation is in dollars as well. So find the standard deviation of the number of marshmallows found in a sample of just four boxes of cereal. So I'm going to calculate this by hand. I know you're super excited to do that. So the first thing we calculate would be our mean x bar. I'm going to add up the four data values and divide by four. Be very excited, we only have four data values, otherwise this would become a very messy standard deviation calculation. We get 620 over four, which is 155. So I really want you to pay attention to this calculation and don't just jump right to the technology because it really helps you to understand what in fact is standard deviation. So I'm going to create a chart to help me with my calculation with the first column being x, meaning my data values. So list all four data values in the first column. This chart is going to help me organize my work. So the first thing you're going to do is to subtract the mean from each data value. So subtract the mean from each data value. What is 150 minus 155, remember x bar of the mean is 155, well that's negative five. What's 152 minus 155, negative three, 157 minus 155, that's two, 161 minus 155. That's six. If you add up all these differences you should actually get zero. That's just kind of a little checkpoint there. All the deviations added together, which is what we just found, these differences would be zero. All right, the next part of the formula is to take each of these deviations or each of these differences and square them. So we square them. Square negative five to get 25. Squaring negative numbers makes them positive. Square negative three to get nine. Square two to get four. Square six to get 36. Remember what my formula looks like. My formula is the standard deviation is the square root of the sum of the square deviations divided by n minus one. So currently I know what all of my square deviations are. What do these square deviations add up to? Well if you use a calculator or you could use mental math if you want, the square deviations add up to 74. So currently I know the following from my standard deviation calculation. I know that the top, I have my square root and the top of my fraction is 74. The sum of the square deviations is 74. Well what's n minus one? Well what is n? How many data values do we have? Four. What is four minus one? Well it gives you three. So I have s equals square root of 74 over three. The square root of 74 divided by three. So do 74 divided by three in your calculator then take it square root and you're going to get about 4.97. That is my standard deviation. Now I was only using four data values. It takes a rather long time and it can be a little bit of an intricate process, rather tedious I must say. So there's got to be an easier way, right? Of course there is. Google Sheets to the rescue. So in Google Sheets we're going to focus on the one variable stats tab or one bar stats tab. Clear out my data values that are there and then type in my four data values. Push enter after each data value. Do not use the arrow keys otherwise it will not calculate correctly. So push enter. I did my four data values and I'm looking at sample standard deviation and look at that 4.97. It did all the work for us within the blink of an eye. So that's exactly what we got 4.97. So if you need to write down the directions, here they are for you. How to find the standard deviation and variance. We used the one variable stats tab. Type in our data values and column D had our answer. Before we do another example, let's talk about variance. The variance is literally the square of the standard deviation. So in the previous example my standard deviation was 4.97. If you square that it gives you the variance. So sample variance is actually, the notation is s squared and the population variance is this Greek letter called sigma squared. The Greek letter is sigma. Remember sample standard deviation, little s represents the sample standard deviation and we haven't really talked about it much but sigma just sigma represents the population standard deviation. You square each of those to get the corresponding variance. So there it is for you nicely written up. A lot of this class we will focus mainly on sample information because obviously we talked about in the first module that it's really hard to get all subjects in a population to get data from them. So we always have to resort to sampling or resort to sample calculations. But one of the cool things is, and if you ever take a more advanced stats course you'll learn more about unbiased estimators but the sample variance is actually an unbiased estimator meaning it's a reasonable estimator for the population variance. And you're going to learn a little bit later in this course that we can use sample descriptive statistics to predict population, or population parameters I should say. So find the range, sample standard deviation, and sample variance for the listed exam scores. So I want to find the range, remember that's the maximum value minus the minimum value. I'll do this calculation by hand because it's really not that difficult to find it. So maximum value minus minimum value, 95 minus 49. So 95 minus 49, 95 minus 49 will actually give you 46. So that's my range, 46. Alright, next order of business. I need to find my sample standard deviation, so I have sample standard deviation which is lowercase s, and then I have my sample variance which is represented by s squared. That's the notation anyway. So let's make a visit to Google Sheets. Let's see if Google Sheets is here to help us. The Google Sheets spreadsheet, one variable stats tab, highlight column a and delete the data, and start typing away. So I have 83, 55, 71, 95, 72, 87, 69, 68, 92, 49. And what do we need? We need to sample standard deviation, 15.2. We need to sample variance, 230.5, and it does calculate the range for us, but we already found it. Alright, so that being said, our sample standard deviation once again is 15.2. Please make sure as you do your homework questions and do your practice questions that you round to the requested number of decimal places, it'll usually be one or two decimal places, and sample variance was 230.5. So those are all of your answers. So you can try calculating the sample standard deviation by hand, but I really don't recommend you waste your time unless you just like math really that much. So that's all I have for now. Thanks for watching.