 Well, hello, it's time for statistics. It's Monica Wahee, your library college lecturer back with chapter 7.4 and 7.5 sampling distributions and the central limit theorem. So at the end of this lecture you should be able to state the statistical notation for parameters and statistics for two measures of variation. Name one type of inference and describe it. Explain the difference between a frequency distribution and a sampling distribution, describe the central limit theorem in either words or formulas, and also describe how to calculate the standard error. So here's your introduction to this lecture. And as you can see I'm much 7.4 and 7.5 together again, they felt like a natural fit. First, we're going to review and maybe overview parameters, statistics, and also inferences. We're going to just talk about those ideas, because that will sort of ease you into the next part, which is where we start talking about sampling distribution, which is the new concept here. Okay, and then we'll go on to talk about the central limit theorem. And finally, I'll do a little demonstration of how to find probabilities regarding x bar. So if you're not really sure about what that means, don't worry, you should be able to understand it at the end of this lecture. All right, here's the first part parameters, statistics, and inferences. And this is the review and overview I promised you. So if you remember from a long time ago, a statistic is a numerical measure describing a sample. And a parameter is a numerical measure describing a population remember SS sample statistic PP population parameter, you probably remember that. Okay, so we have different ways of notating these. So if you look under measure, like you see mean, right? And if it's a statistic, it's x bar. And I say x bar on this on the slide sometimes, because it's hard to make that little line always be positioned above the x. So I'm just lazy, I say x bar. And then under parameter, it's that that mu symbol. So it's pronounced mu. But it looks like that thing on the slide. All right, the next two variants and standard deviation remember how they're friends. And so the statistic version is the s for variance, it's the s with the little two up there, the exponent, because you know, it's standard deviation to the second is variance and the square root of variance is a standard deviation. So that's why they have s and then s to the second. For the statistic, okay, for the parameter, it's that lowercase sigma symbol. And that's it's that to the second when it's variance. And it's just without to the exponent, when it's just the regular parameter of standard deviation, right? And you're used to seeing these on the slides. This is just review. Also, it mentioned in the book, proportion is P hat. And then the parameter is P. But I don't really go into that. I just wanted to do a little shout out to it. Okay, let's think about the word inference, like infer, like if somebody implies something, maybe you'll infer it, like, he implied it would be hard if I came over late that night. So I inferred that I shouldn't come over late that night. So like here, you know, you may have heard the term, where there's smoke, there's fire. And so you see this on the slide, there's a lot of smoke. Is there fire, though, is that smoke coming from fire? Because if you look at it, it probably could be coming from fire. But there's sort of this outside chance. It's not what we think it is. Like maybe, you know, if you've ever used a fire extinguisher, they make all this phone come out, maybe it's that, you know, or maybe it's like, if you've ever had dry ice, and then that makes a bunch of smoke. Maybe it's not fire, right? So where there's smoke, there's fire. That's an inference. Well, let's see. It's actually fire, right? But we weren't sure we thought it was likely to be fire. But we weren't sure. And so there's inference is something that you do in statistics, because you use probability to make these inference, because you can't see the fire, you can just see the smoke, and you're not sure, right? So there's three different kinds. I'm going to talk about the first kind is estimation, where we estimate the value of a parameter using a sample. So the sample is kind of like the smoke and the parameters, the fire, we can't see. So we estimate it. Okay. And we're going to talk about that in chapter eight more. A second time type of inference we do is testing, where we do a test to help us make a decision about a population parameter. In other words, we don't know one, but we want to make a decision about it. So we do a statistical test. And we're not going to get into that. That's in chapter nine. Finally, there's regression where we make predictions or forecasts about a statistic. That's a third kind of inference. And we actually already did this in chapter 4.2. So the reason why I bring up all of this is that estimation, which is going to be in chapter eight, and testing, which is going to be in chapter nine, but we're not going over chapter nine in this class. But um, but if we were, you know, you'd have to know this because in this lecture, I'm going to talk about sampling distributions and the central limit theorem. And you need to grasp those things in order to do those these two things on the slide that with the box around them estimation and testing. And so that's why I'm bringing this up now. Okay, so now we're going to move on to talking about sampling distribution and how it's different from a frequency distribution. Alright, so let's just remind ourselves what a frequency distribution actually is. Okay. So remember that from a long time ago, what you would have is a quantitative variable. You'd make a frequency table. And then you'd use that to graph the histogram, right? And here I made an example down there of frequency histogram that shows a normal distribution. And so that's what you would do. You know, step two would be you draw it, and then you'd see the shape and figure out what the distribution was of that quantitative variable or that x, okay? Because each one of these is an x like the middle one, it's almost 30 x's that are in that frequency. Okay, now we're going to talk about sampling distribution. It's a little more complicated. And a sampling distribution, you start out with a population. That's the first thing is you're dealing with population. Then you pick an n of a certain size, like you pick a number that you're going to have your sample size b. And then you take as many samples of that size as possible from the population. And then you make an x bar from each of these samples. So there's a ton of samples, right? Because it'll show you a little demonstration so you can really grab your mind around how many different samples that can be. But each one is going to have an x bar. And then you make a histogram of all those x bars. So like I said, I'm going to just kind of show you what I'm talking about. So we're going to imagine this is a population of people. And we're going to imagine we're going to talk about BMI or body mass index just so you can wrap your mind around this. So you start with this population, let's decide on an N. How about five, five is good, right? So now what the deal is is I'm trying to take as many samples of n as possible from all of these people on the slide. So here's our first sample we took. And we got an x bar for BMI of 23 from these five people. Well, let's try these five people. Now, look, we double dipped with that first one. Okay, but we get this x bar of 21. And we can keep going. And actually, there's going to be a ton of these, right? There's a ton of different ones. But it's finite. I mean, at the end of the day, there's only so many groups of five, I can get out of this population on the slide. And each group of five is going to have an its own x bar. So I could write down every single one of those x bars I get for every single group of five I can make out of this. And then I can make a histogram of all the x bars. And, of course, I'd start with a frequency table. But look at the frequencies, they're huge. That's because you can get just a ton of samples out of one population. And so what you'll see is if you make a histogram out of that, it looks normally distributed. It's just that the frequencies are really high, because there's a whole bunch of different samples you can take. And remember, this is a frequency histogram of x bars. This is each one of these frequencies is an x bar that you got out of a group of five you could take. And so that's what this sampling distribution is. It ends up looking like a histogram, but it's a histogram of all the possible x bars you could get from all the possible samples of whatever n size you picked from the population that you have. So, so this is the fancy way, the official statistical way of saying it is a sampling distribution is a probability distribution of a sample statistic. In this case x bar, based on all possible simple random samples of the same size from the same population. So that's what makes it a sampling distribution and not a frequency distribution. And so in the next section, so you're probably like, okay, great, that's wonderful, you just explain that. But in the next section, we're going to talk about the central limit theorem. Here comes a theorem, right? And there's a proof for the theorem. And you need to understand this concept of sampling distribution for inference in order to understand this proof. So I just had to go through this. Okay, now we're on to the central limit theorem, and how it's used for statistical inference. So I'm going to start by explaining it in words and see that sampling distributions over there. So this is the words around the central limit theorem, it says for any normal distribution. And remember, we're talking about a normal distribution here. The sampling distribution, meaning the distributions of the x bars from all possible samples like we just talked about, is a normal distribution, meaning it's not skewed, it's not bimodal, whatever, it looks kind of like what is on the slide. Okay, then to this is important, the mean of the x bars is actually mu. So I had a student who would say, Oh, the x bar of the x bars is mu. And that's actually true. If you actually did the thing I described, which don't try it at home, because you'll be up all night taking samples. Okay, but if you did, if you actually got all samples of five from a population, and got all their x bars, and you made a mean of all those x bars, you get mu and how you could check it is of course just easily taking a mean of the entire population, like that would have been the easy way to do it. But no, if you do it this way, where you get every possible x bar for a particular sample size, and then you make an x bar of those x bars, you'll get mu. So that's, you know, it's a proof. So that sounds like a thing that would be in a proof, right? Now, here's an x part three, the standard deviation of all those x bars is actually the population standard deviation divided by the square root of whatever and you picked. So in other words, if you have the whole population data, and you just found out the standard deviation, you just have the standard deviation. But if you did this thing with the x bars where you took all those x bars, and you found the standard deviation of those x bars, that would equal the population standard deviation divided by the square root of whatever n you use to get all those x bars. Again, sounds really proofy in theory, me, but that's the third part of the central limit theorem in words. And so here's another some people like to look at it from a formula standpoint. So you'll see on the right side of the slide, in this little these little formulas, the n means the sample size. And remember, I picked five you could pick a different one, right? And mu is the mean of the x distribution, meaning the population me, right? And then that population standard deviation symbol is the standard deviation of the x distribution mean the population standard deviation. So we look on the left. Now this is just a formula version of what I just said, the mu of all the x bars that you could get from a particular sample, in a particular population is going to equal the mu of the population. And the standard deviation of all those x bars is going to equal the population standard deviation divided by the square root of whatever n you picked. So now I just want to point out the z thing, we've been doing this z thing, right? But we've been doing it with one x. Now, if you imagine grabbing a bunch of x's, in other words, a sample, this is the formula you're going to be using, which is x bar minus mu over the standard deviation divided by the square root of n, right? And so that's kind of what we're moving into here is what happens if you get a sample and you're looking at x bar, not if you just grab one x and you're looking at that. So I wanted to point out, first of all, that this whole thing is only supposed to happen if your n is greater than 30. Okay, otherwise, you shouldn't really be doing this. Then the second thing I wanted to point out is that this piece underneath and the lower part of the equation, that's called the standard error, they named that piece. And part of the reason why I like that they named that piece separately is I usually make that piece before I even do the equation. So I just have that number sitting around because, you know, there's a square root underneath this standard deviation. And that whole thing is underneath another thing. So it's hard to do all that dividing. So I usually just make the standard error first, by taking the standard population standard deviation divided by the square root of n and just have that number. And then later I use it in this z equation. So that's two things I wanted you to notice. So I brought that out on this slide. Okay, here's more on the central limit theorem. So if the distribution of x is normal, then the distribution of x bar is also normal. So if we look at the top, that's an example of just an axe distribution. And then if you go do that thing where you take all those samples, and you get all those x bars, and then you make the histogram, you'll see the pink one down lower, the x bar distribution. This is just a pictorial example. But even if the distribution of x is not normal, as long as there's more than 30 and is more than 30, the central limit theorem says that the x bar distribution is approximately normal. So remember a lot of that hospital data we've been looking at, like a hospital beds in a state, often you'll see a skewed distribution. But if you have more than 30 hospitals, then it what you could do is you could pick an n and take an n bigger than 30, and take a bunch of samples and get a bunch of x bars, not just a bunch, get all of them, all of the possible ones. And then when you if you made that x bar distribution, even though the hospital beds would be skewed, just as an axe distribution, their x bar distribution would be normal. And that's one other important piece of the central limit theorem. That's one important piece of that proof is that all of those x bars that you get will end up on a normal distribution, even if your underlying distribution is not normal, so long as the end you're picking is greater than 30. And finally, that leads to you know, proofs are they build on each other that leads to the concept that a sample statistic is considered unbiased, just unbiased, right, it's not perfect, but it's unbiased, if the mean of its sampling distribution equals the parameter being estimate. In other words, the fact that the x bar of the x bars is mu means that an x bar is going to be unbiased, it might not be mu, it might not be exactly the same as the population mean, but it will be unbiased, it's not a biased representative of me. All right, now let's move on to finding probabilities regarding x bar. So for those of you who want to actually do something and apply something and stop thinking about theory, let's go. Okay, but let's remind ourselves what are we doing? Right, what are we doing? Well, what were we doing? In chapters 7.1 through 7.3, we were looking at having a normally distributed x. So we had this population of quantitative values that were normally distributed. And we had a population mean, a mu, and we had a population standard deviation. And we kept doing these exercises where we were finding the probability of selecting a value from that population and x from that population, above or below a certain value of x, right. And so we were looking at the probabilities and we'd look up the z score and the z table probabilities. And so basically what we would be doing is converting x to z, right. And we use this formula here to convert x to z. So whenever we had an x, we could put it on the z distribution, and we could figure out the probability. So here's what's different now. You'll notice the first thing has not changed. We're still talking about normally distributed x's. We're still talking about a population where we have a mu and a population standard deviation. But now we're not just grabbing one x from that population, we're grabbing a sample. And because we're grabbing a sample, we have to pick an n. So the n's going to be different each time, right? So we're grabbing a sample of the population. Well, how do we boil that down to one number? Well, we're taking the x bar or the mean value from that sample. And that's what we're doing. The z score on is that x bar instead of the x, because we're taking a sample. So when you see the formula below, you'll notice that the other one just had x in it because we only had one. This one has x bar in it because we have a sample. You'll also notice that downstairs, what we had before was a population standard deviation. But now we have the standard error. Remember, I talked about that the population standard deviation divided by the square root of n, that's where n comes in because it's going to matter which what and you have to make the z come out, right? Alright, so now that we're reminded of what we're doing, we'll just explain how to do it, right? So let's say you do have an n, right? And you have an x bar, like you grabbed your and then you got an x bar, you can convert the x bar to a z score using this formula where, of course, you have to be told the population mean and the population standard deviation, but then you'll have your x bar and you'll have your n so you can do the whole equation. And then you'll get a z. And guess what you do? What do you do with the z? You look it up. So you look at the probability for the z score in the z table, like in chapter 7.2 and 7.3 only this is just about x bar, basically. So and then I thought what I would do is walk you through two examples. You're already kind of good at this because this is not too different from 7.2 and 7.3. But I just want to walk you through it because it is a little different when you have a sample versus just one x. Okay. So remember our poor chemistry class that I was in where I got a 73. Well, remember, we were assuming it was 100 student class. So there were 100 students in the class n equals 100 in the class, capital N, right? Because they're the population. And then if you look on the slide, you'll see the mu of their scores was pretty bad. It was 65.5 on 100 point test. And the population standard deviation was 14.5. So this was the population of this 100 student class. So I'm going to do some exercises here. Let's say we're going to pick it that we have to pick an n bigger than 30. So we're going to pick an n of 49, right? Now I'm coming up with a little scenario here. To pass the class, students have to get at least 70, which is a C. So let's pretend this is the question. What is the probability of me selecting a sample of 49 students with an x bar greater than 70? Notice how we ask the question a little bit differently. What's the probability of me getting a set of 49 students such that their x bar is greater than 70? Does that kind of remind you of the central limit theorem, where we had to go back and get us like an n of five, we got different ends of five. What's the probability of me getting one of those samples that has an x bar in greater than 70? That's the question, right? And I drew this out here, remember our old z distribution with our also our x distribution, and I kind of drew where 70 is. But I wanted you to point I wanted to point out for you the probability for an x bar is going to be smaller than for x, because you're going to have to do a lot of work to get that x bar to be above 70, right? So here we go. So I'm just going to remind you that the equation at the top and the equation at the bottom are the same equation. I'm just using the term SE for the standard error. And I like to calculate that separately, like I told you. So I like to do that first. So we're going to do that. And how do we do that? Well, the n was 49, right? And the population standard deviation is 14.5. So that's where we get this, this number, the standard error of 2.1. So now let's calculate the z. Alright, here's z. So z is our x, which is our x bar, which is 70 minus 65.5, which is our mu divided by our prep cooked standard error, which is 2.1. And we get a z of 2.17. So we're tempted to look that up. But let's look at our picture. So here's our z distribution. And what we're going for is this little piece at the top, right above 2.17. So that's a little piece. So we got a look for that, right? Let's go look. So because we're going to go for the piece at the top, we're going to use the opposite z. There's remember two ways of doing this, but everybody seems to prefer the way the where you use the opposite z if you're looking for something to the right. So we're going to use negative 2.17 to get a little piece, right? Because when you look that up, I'm not going to demonstrate you guys are good at this now. You get p equals 0.0150. If you were to look up 2.17, then you'd get the big piece. So that's why we do this. And so then the answer is, remember the question was what is the probability of me selecting a sample, or a set of 49 students with an x bar that's greater than 70. And remember how this really test really sucked. I mean, people, the mu was 65.5. So it was pretty hard to get a high score. So the probability was pretty low as 0.0150. Or if you do the percent version, 1.5%. Okay, now we're going to try a different one. That one was asking what is the probability of me selecting a sample with an x bar greater than a certain number. Now we're going to talk about the probability of selecting a sample with x bar between two numbers, right? So again, we're back with our poor student class that with this terrible chemistry test. This time I decided to choose the end of 36, you'll notice that I always choose perfect squares for ends because you have to take the square root and I'm just lazy. So okay, here's our question. What is the probability of me selecting a sample of 36 students with an x bar between 60 and 65. And just I drew this picture up here reminds you that that's going to be on the left side of mu, you know, we're going to be dealing with negative Zs, right? And so we have to remember when we would have two axes back in 7.2 and 7.3. Well, this is now a situation where we have two x bars. So you just got to name them x bar one and x bar two. And again, I show you this demonstration, you know, these red arrows, but the probability for x bar will be smaller than for x because it's harder to get a whole group of people together to give you an x bar in between a certain place. Alright, so this is not new. These are the same formulas I showed you to before. I just want to emphasize that making your standard error first can really help you as you move along through these problems. It just makes it a little easier to calculate, especially in this case where we're going to use a standard error twice. So again, what we do is we take this would look exactly like the last standard error, but it's different because our n is different. So this time our standard error comes out as 2.4. And what I just want to remind you is that the more n you get, the bigger that square root of n gets, I mean, n gets bigger, the square root of n gets bigger. And this then the smaller the standard error gets, so you can make the standard error really small. If you just get a lot of n, right? So here's z one and z two, I put them both up there, but we can just walk through this, you know, x bar one is 60 and x bar two is 65 because it's between 60 and 65. So you see that you see what's going on in slide. And like I told you, you know, these were both of these x bars are below the mu so they're both going to have negative z's and so we've got our negative z's. And now we have to just remind ourselves Well, what are we doing, right? And so you see z one is at negative 2.28. So that's a little piece at the bottom, we're going to want to trim off. And then the big piece at the top for z two, that starts at negative 0.21. So that's just remember the picture is really helpful. So now we're going to go deal with the probabilities, right? So for z one, we're looking at something to the left. So we just leave the z alone and go look it up. And that's P equals 0.0113. For z two, we got to flip the sign, because we have to use the opposite z, because we're going for the right. So that was the probability to and we can check that see because we can see that's more than 50% of that shape. So it's 0.5832. Okay, so we got our probabilities now. And like just like last time, we got to take one minus both of those pieces, right? And then we get the probability in the middle, and that's the probability of drawing a sample of 36 students with an x bar between 1665. And I just translate that to you the answer the probabilities 0.4055. Or if you rounded it, you know, any like percent, so you could say 41%. So in conclusion, we reviewed the parameters and the statistics, and those notations. And we talked about inferences and what we're doing with inference. Next, we talked about what a sampling distribution is, and how that's different from a frequency distribution. So you can tell, you know, what's going on with that. Then I presented to you the central limit theorem, which may have been kind of confusing because, you know, theorems always are there always about different principles and about different things equaling each other. But because of the central limit theorem, we then have permission to do the operations we're doing after that, which is finding probabilities regarding x bar. The central limit theorem says that, you know, this is how the world works. So you get to use a standard error, and you get to do these kind of calculations. So now you know how to, in addition to finding probabilities regarding x, you can find probabilities regarding x bar. Don't you feel smart?