[SOUND] In this video I'm going to show you how to use the function in data analysis for taking samples out of your population. So I have the daily temperatures for three different cities here. Champaign, Chicago, New York. I'm going to focus on New York, and if I scroll down using control shift down button. You would see that I have over 26,000 different days of temperature. And I want to take a sample of these. So one way of doing this is by going to data. Data analysis, and then scroll down until you find sampling. Click okay. A pop-up window comes in, and it first asks you for your imput range. So I'm going to take a sample of New York. Daily temperatures that have been recorded. So I'm going to put my cursor on New York, and then Ctrl+Shift+Down. And this will pick the entire data set for me, the entire 26,000. You see here, it says E1 to E26771. Now I have picked also New York. If I had not, I could ignore this step, but since I have picked the name of my city, I'm going to click on Labels. That way it knows that the very cell only is a label and it should not be used. I'm going to use a Random sampling but I'm going to tell you something about Periodic. If I say Periodic and I can put a number here, but it's going to do is that if I say four, it's going to look for every fourth data set. And it will keep on picking those out of my data, but I want to take a random sample, so I'm going to click on Random. Now, here it says Number of Samples. And this is very confusing because in statistics number of samples means how many samples are you trying to take and what is, the size of each sample. Well here number of samples is actually about the size of the sample. So, let's say I want to take 130 observations out of this, so I'm going to say okay. After I wanted to put it in a new worksheet. That's what I'm going to put it. So, I'm going to say OK. And what you see here is that it ignored my very first data, but if I go down you will see that I have exactly 130 different datasets that have been selected. So, this is my sample number one. So, if I want to do this over and over again, the way I would do is that first I'm going to insert a row here. And I'm going to call this my sample number one. So, let's say I want to do this five times. Sample number two, and then an easy way of doing it is just highlight these two and it already knows that I am going in a linear fashion. And it would put those five things for me. Now I need to go back to sheet one and repeat this process five times. So I go to data analysis again, sampling again, I do the same thing and this one, I'm going to give it an because I want them to be on next to one another, I'm going to click here. Every time you click on this let me just show you, every time you click on this this gets highlighted again. And if you're not paying attention you're going to overwrite this. So make sure after you click on this you definitely click on this window before you click elsewhere. As you can see, as I clicked on this, this is no longer highlighted. So I'm going to go to my sheet two and I say to it that I want you to put everything starting from here and It populated it for me. Again if I look at sample two I would see that it has all of the 130 highlighted here. So I did this five times and i have now five different sets of data. From New York each of the five samples have 130 observations each. Next thing I will do is to find the average for each of these samples. At the end of the day, we are studying central limit theorem, and we want to know how sample means will differ from one randomly selected sample to the next. Eventually we will look at the distribution of the sampling means and understand how central works. So I start by calculating the average for sample number one, and I will do the same thing for each of the samples. So I'm going to record each of the samples right here. So this is the average and I'm going to pick average by tabbing on it, and I will do the same thing as I always did. So click on on the first cell, Ctrl+Shift down and pick the entire thing. Close the parentheses and return, and as I scroll up you would see the average for sample 1 is 55.97. So I will repeat the same thing for the sample 2, 3, 4 and 5. So here we are with our five different samples, all of them taken from the same large dataset that we had for New York. Each one of them had 130 observation. And by the way, they don't have to be equal. In this case, I chose to have 130 every time I sampled. You can choose that number From one sample to the next. And what I get is that clearly some differences between each sample. So sample number three for example, resulted in the highest value for the average and sample number two resulted in the lowest. And then we have two about 55, and then a 57. So if you repeat this, let's say 50, or 60, or 100 times, we're going to get that many different samples. And the idea behind central limit theorem is that we're going to To, draw this distribution. And I will show that in a later video.