 Statistics and Excel. Calories, data, statistics, sample, example. Get ready, taking a deep breath, holding it in for 10 seconds and looking forward to a smooth soothing Excel. Here we are in Excel. If you don't have access to this workbook, that's OK because we'll basically build this from a blank worksheet, possibly being able to get sample data sets from Kaggle.com. That's K-A-G-G-L-E.com. If you do have access to this workbook, three tabs down below. Example, practice blank. Example, in essence, answer key. Practice tab, having pre-formatted cells so we can get right to the heart of the practice problem. The blank tab, just having our data set so we can practice formatting cells within Excel as we work through the practice problem. Let's go to the example tab to get an idea of what we will be doing. We've got our data set, which we will make a table out of. This is calories, our related data set. We're going to imagine that this is the entire population data set on the left-hand side. We'll make a histogram from it. We'll make an average of that entire data set. Then we want to take samples of this data set to see how closely the samples mirror the results of the full data set. And we're going to be practicing how we can basically take randomized samples from what we're imagining is our whole data set. And this is similar to what we've seen in the past but slightly different because we want to basically, we can use our randomized numbers but then we want to line them up to line items on the actual data set. So we can then put our random numbers next to the entire data set to use that to scramble the data set in basically a random method. And then we'll imagine how we can use this tool so that we can pull multiple samples together. So then we'll do multiple samples here that we will be pulling together. It looks like we have samples of 20 or 19 or 20. And then we'll make a whole bunch of those samples together to practice that method of sampling. And then we'll see what the results of that sample are. So let's go to the blank tab and I'm going to delete this. So here's our data on the left. Now it's currently sorted by date. So we're tracking in essence calories here. By day we're going to imagine this is our full data set. So let's insert a table. So I'm going to go to the insert tab up top. We're going to go to the tables and insert a table. So it's going all the way from A1 to 458. So fairly long data set but not huge. I'm going to say okay. So there's our data set. It's currently sorted by date. We could sort it by calories to see lowest to highest and then highest to lowest. So we could do that. And then, or we can sort it back by the date over here. Lowest to highest. And then we're going to take that data and do some calculations from it. Let's do our standard average. I'm going to pull in column C, bringing that in a bit. And our standard kind of calculations then would be the average or mean. Before I do this, by the way, I should have done this first. I'm going to format the entire worksheet. So let me put my cursor over here on the triangle. This is going to mess up the date formatting. So we'll see how to deal with that. I'm going to right click. I'm going to format the entire worksheet. And I'm going to go then to my baseline formatting which I would like to be the currency, negative numbers bracketed and red. And I don't think we need the decimals. So I'll remove the decimals and no dollar sign. So I'm going to say, okay, when I do that, it's going to mess up the date formatting over here. So I'm going to go, okay. So messed up the date formatting. Then I'll just select this entire column and go to the home tab, number group. And in this dropdown, this is like the quick formatting. I can find then the date. So I can go down to the short date and it'll populate it back to the date. So that looks good. Let's make this one white on the font. Okay, and normally I would like to do that to the sheet before I add the actual data possibly, if possible. And that will make things a little bit faster sometimes. Then I'm going to select the calories and or let's calculate our average first. Let's go to the average, average or mean. So the average is mean. I'm going to pull this to the right and we'll say this equals the average. There's our function. Double click in the function, selecting just the numbers. So we have the dropdown in our table. So we're picking up the table of calories. That's it, enter. Then we might want the median. We'll use our median function, equals the median. I'm doing this fairly quickly because we've seen these in the past. Double click in the median, selecting our data and enter. So there's the median. We might want the min, or let's take the max first. Max and then the min equals the max. Double click in the max function and then selecting our data. That's the top calorie. And then the min. Equals and then min, selecting the min and the data. And there's the min, zero. Okay, so let's select the entire data here. I'm going to make it bold, home tab font group. I'll bold it. I'm also going to scroll in. I'm scrolling just a little, that looks pretty good. Let's enter a histogram now. So I'm going to select the entire data and go to the insert tab and the charts will make a histogram. So there's our histogram of the data. I'll delete the title. I'll make this data blue and bordered as is normally our custom. So I'm going to go to the insert tab, I'm sorry, home tab, font group, bucket dropdown. If you don't have that blue, it's in the more colors, standard. And there's the blue I'll use and then okay, let's put some borders around it, home tab, font group and put some borders around it. So there we have it and there's our chart. Okay, so now let's create our sample. So if I wanted to make a random sample of these numbers, then what I could do is say, I'm going to put this next to a column where we randomly generate numbers and then organize the randomly generated numbers in order so it will shuffle the calories column randomly. And then we can pick the numbers. Now, if I want to do multiple samples, then we can make multiple of these kind of random shuffling tools. So let's try doing that. I'm going to select the entire column, column B, right click and copy and I'm going to put that over here somewhere. I'll put it over here in M, right click. I'm going to paste it just one, two, three because I'm going to put a different table around it. And then here's my random shuffle. My random shuffle tool will be over here. I'm going to use just the normal random shuffle generator equals RAND double clicking that. And then I'm just