Tests of Hypothesis for a Single Sample Part 1

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
- [Narrator] Well, hello there, we are moving into the hypotheses testing portion of our course. We set up some of the groundwork in the previous lectures by learning about confidence intervals. Now we're gonna learn about how do we test hypotheses and determine if we have evidence in favor of a certain statement, or against a certain statement. In this module... I shouldn't call it a module. In this video, we're gonna be learning about, just the basics of hypothesis testing, and then one fairly simple case. Then it gets a little bit crazier after that, but today shouldn't be too, too bad. Some of this you may already know. So Hypothesis Testing... What we're gonna be doing, is we're gonna be looking at a series of statements, and one will be an equality that the textbook always sets, the null hypothesis, that's what H nought is, it's called the null hypothesis, they set that as an equality. I wanted to point that out here, is that this text always uses an equality for the null hypothesis, some texts don't. And I'll probably go into that a little bit later. So let's suppose when we use a book example that we have a mean burn rate for a particular type of a fuel at 50 centimeters per second, and that's our null hypothesis. Our alternative hypothesis, which is what H1 is, is going to be that the mean burn rate is actually not equal to 50 centimeters per second, so, H1 is always called the alternative hypothesis. We can have basically three alternative hypotheses, we can have a not equals, which we sometimes refer to as the two sided hypothesis test. And we can also have strictly bigger than, or strictly less than. Let's see here. H1 that would be new, less than 50. And again, that would be centimeters per second. And as I said, this one would be what we would call the two sided alternative hypothesis. This would be one sided alternative hypothesis, either greater than, or less than. So, some of the battle here is learning what the notation is. Alrighty, so what is... Let's go into a little bit more here. Hypothesis-testing procedures, what they do is they're gonna rely on information that we're gonna grab from a random sample, meaning that we have no bias. I'm gonna take a small sample of size n, from a population that could have a finite or an infinite number of values, that's usually infinite. So if our information from our random sample is consistent with the null hypothesis, then we're gonna conclude that the null hypothesis is true. And I'm wanna slip that in there, as the null hypothesis. And that the information is inconsistent with our null hypothesis, then we're gonna conclude that, that hypothesis is false. The thing is we're never gonna be a 100% sure, because we are basing their information on a random sample, which brings me to the next slide, is just because we come to a conclusion doesn't mean it is the right one. And so it's possible that we could have an error, and we call these errors, Type I and Type II, and each one of these errors has a probability of occurrence. Oh, I wanted to point out too, that I had to hand write in the slide numbers down here, because I inserted another footer here, just so you know, I hand wrote those initial correspond with your slides as well. All right, so when we make a Type I error, we're gonna call that probability alpha. And when we make a Type II error, we're gonna call that probability, beta. And when we... Oh, I annunciated that so well, beta. And we're going to say that the power of the test is gonna be one minus beta. So let me explain what alpha and beta are, and what Type I error, and Type II error are. You may have heard this presented in other classes, or by other teachers in slightly different ways, but this is the way I present it, and I think it makes the most sense in the context of this course. Okay, so here's an example, I had to look these, there's two examples I'm gonna give, so there's a gentleman back in, when was it? 1974. He was convicted of a terrible crime of kidnapping and raping a child. And he was in prison for quite a long time. Well then DNA evidence came about, and in 2009, they determined that he couldn't possibly have committed this crime. So, if we were to set up an analogy here for our hypothesis testing, we have H nought, which I'm gonna say is that James Bain was innocent of the crime that he was con... That he was charged with. And H1, is going to be that he, yeah, he didn't do it. So in 1974, the jury actually rejected H nought, when H nought was actually true. So, this would be a good example in words, not really in Math, of an example of when we actually had a Type I error. So, we have a Type I error, when we reject H nought, when H not is true, and we could call this a false negative, if you like. And so Type one error, is like convicting an innocent person if you will. Alpha is the probability. So, alpha is always a probability, and alpha would be something that would lie because it's a probability between zero and one. So, alpha is the probability of making a Type I error. So a Type I error, this is a situation, and alpha is a probability. Sometimes people call alpha Type I error, and it's not, it's the probability of Type I error. So let's do a Type II error, actually is. So I dug deep for this one, is hard to find. And there was in 2014, a young man by the name of Christian Harvey. And he was recorded on tape trying to hire somebody to kill a female prosecutor for only $200. So he admitted that he did this, but he went to trial anyways. I don't know the specifics of this, but he went to trial. And the jury actually found him not guilty. So in 2014, if we were to set up our null and alternative hypothesis, Christian Harvey is innocent, same thing as James Bain, or Christian Harvey did do this crime. In 2014, the jury failed to reject H nought, when H nought was actually false. So Type II error, is when we fail to reject H nought when, H nought is false. And we could also call this a false positive. And again, just like with the alpha, beta is a probability. So beta is going to lie between zero and one, it's a probability of making a Type II error. So again, beta here, I wanna write again and emphasize it, prob ab-ability. And Type II error, this is a situation, or condition. And we're gonna learn about how we can determine what alpha and beta are. So, here's a little bit of a truth table here. I'm gonna fill in the bottom first, and then I'll fill in the table up here. Sometimes the Type I probability is called the significance level of the test. And you're gonna find that when you go do your homework, and read the textbook, they're gonna be referring to the significance level. So when you see the word significance level, you're gonna be thinking of alpha, okay? Now, alpha again is the probability of incorrectly, and this would be rejecting, a true null hypothesis. So, alpha up here, would be where we reject H nought, when H nought is true. So alpha in this table up here would go right there, rejecting H nought, when H nought is true. One minus alpha, is the probability of correctly identifying a true null hypothesis. So, one minus alpha, would be saying that we fail to reject H nought, when H nought is true, and so that would be one minus alpha, here. Beta is the probability of incorrectly excepting a false null hypothesis. So H nought is false, but we failed to reject it. So beta would go up there. And one minus beta, is the probability of correctly rejecting a false null hypothesis. One minus beta, is sometimes called the power of the test. And so this would be one minus beta. So this is kind of a helpful slide. It's important that you know what each one of these values actually mean. So in summary, if we reject H nought, and H nought is truly false, no error, so I'd like that out here. So these are indicating no error, in our conclusion. But these are two probabilities of error. So when we reject H nought, when H nought is true, it's an alpha probability. When we fail to reject H nought, when it's false, it is called beta. And we're gonna learn a little bit more about each of those. Eventually, probably not in this lecture. Okay. So, here is the more with the null and alternative hypotheses. I mentioned this before, but there's a point on this slide that is very important, and that is, when we reject H nought, that's actually a stronger conclusion than failing to reject H nought. So we're never gonna say... I want to point this out. We're never gonna say, except H nought, I'm gonna do this, we will never say that. We are never gonna say, except H1. Instead, what we're going to say is, if we have evidence in favor of H nought, we're gonna say that we failed to reject H nought. We're always gonna phrase it in terms of H nought, or we're gonna say that we reject H nought, those are the two conclusions that we're gonna come to. So if we fail to reject H nought, it means we're gonna have more evidence in favor of this, null hypothesis. If we reject H nought, we're gonna have more evidence in favor of the alternative hypothesis. And again, it could be one of these three. Now, the really important thing is, is the notation. This right here is exactly what you thought it was, which is the population mean. We don't know what it is, that's why we're doing the hypothesis test. This mu nought, though, this is going to be our hypothesized population mean. And it's always going to be a number. Here it's just shown as mu nought, because we have to have a general reform for different values. So, μ is always a Greek letter, on the left side of these equations. mu nought is always going to be a number on the right hand side. Now, there's another thing called the P-value, and we'll be talking a lot more about this. And it's a little bit of a difficult concept to understand, but once you either understand it, or know how to use it it is very helpful in determining whether or not you're going to fail to reject H nought, or reject H nought. So the textbook is going to define the P-value as follows. They say, that the P-value is the smallest level of significance. And remember, what does level of significance mean that is just code for alpha. So it's the smallest level of alpha that would lead to a rejection of the null hypothesis with the given data. What do we mean by given data? We mean the random sample. The information we got from the random sample. So the P-value is what we sometimes refer to as the observed significance level. I prefer to put it this way, the P-value is the value of alpha that would put us right on the edge. You can use the word edge, or borderline if you're a Madonna fan. Oh, between rejecting H nought and failing to reject H nought. So it would be the value of alpha where you're like, man, I can't decide whether I reject H nought, or if they failed to reject H nought. It's a measure of the sensitivity of the test. And I can tell you whether you have a strong result, or a weak result. Alrighty. So there is a connection between the hypothesis tests that we're doing in this section and the confidence intervals that we just finished up, for last week. So let me explain this, if I can. There's a relationship, as it says, between the test of a hypothesis on a population parameter. What do I mean by population parameter? I mean, population mean, or population variance, or population standard deviation. And eventually I'm gonna learn about population proportion, so I'm throwing that one in there. So we're going to... Remember that we computed L, our lower... Estimate lower bound, and our upper bound estimate from the last week. If we have this confidence interval for a parameter, theta, and again, theta is just a general representation from you, or sigma, or sigma squared, or P it's just a generic representation. And if they than not, and again, this would be a generic representation of mu nought, or sigma nought, or sigma not squared, which we're gonna learn about we didn't do (indistinct) or P nought. If that's not in that confidence interval, then we are going to reject H nought. If we were looking for a test of hypothesis in a test of hypothesis for delta nought... This we should really say for a delta, nought value, I should put it that way. Well, cannot write today, V-A-L-U-E. So if we had a hypothesis test, it was mu equals mu nought, against mu is not equal to mu nought. And, if this value here is not in L or this confidence interval, then we are gonna reject H nought, and conclude that we have more evidence in favor of H1. The textbook does a very good job of giving you a step by step kind of cookbook approach to doing what we call a hypothesis test, and that's what the next slide is about. And I actually like to use, I like to use these steps as we go through this chapter, and also the next chapter about hypothesis tests on more than one parameter. So, let me just walk you through this rather quickly, and then we'll just put it into use here shortly. So, first thing we're gonna do is we're gonna read our word problem, identify what population parameter of interest are we doing this hypothesis test on. So is it a question about the population mean? Is it a question about the population variance? Is it a question about the population standard deviation? Or is it a question about the population proportion? We're gonna formulate our null hypothesis, H nought, remembering that this is always gonna be set up as an equality. We're gonna decide what is our appropriate alternative hypothesis? Do we want a one sided hypothesis test? Are we testing to see if that parameter is less than something or bigger than something? So that's my one sided alternative, or am I just interested in, is that parameter just not equal to something? And so that would be what we call the two-sided test. We are going to choose a significance level alpha, so this is the point, you are either going to choose it, and I should point out here, you, as the analyst practicing this stuff, you would choose what you want your outfit to be, what you want your risk to be, generally alpha is usually, and the book does deviate from this, but it's usually 0.01 or 0.05, but it can be anything you want. So that's what alpha usually is. We also sometimes refer to alpha as the analysts, ana-lysts, risk. So we sometimes say that alpha is the analyst risk because you get to choose it. Next step is we're gonna determine something called a test statistic, which I haven't taught you about yet. But we're gonna be looking at, so it's what you expect. Z is a standard normal random, value. So these are gonna be in numerical value. So a point here, these will be numerical values, numerical values. So that little subscript of zero means it is actually gonna be a value. Then we're gonna read... We're gonna decide, well, under what circumstances are we going to reject H nought? So that's what step six is. So, under what circumstances will we reject our null hypothesis? Then seven and eight... Have you compute our necessary values? I always recommend when you're doing these things to sketch, if you can, any of the appropriate probability density functions that we're gonna be using, and that's why we had to get through all of that probability stuff, so we can understand a little bit about what's going on with hypothesis testing. And then what we're gonna do, is we're gonna draw appropriate conclusions. What do we mean by draw appropriate conclusions? We are either going to fail to reject H nought, and that's just a general way to say it. Or we are going to reject H nought and conclude that there was more evidence in favor of H1. So that is the eight step hypothesis testing procedure. So let's do an example here, and what we're gonna do is the simplest example and the one that is easiest to apply, and this will be... We're gonna be doing a hypothesis test on the population mean, what do I mean by population mean? It means we do not know what mu is. So we're gonna grab some sample data and try to do a hypothesis test to determine what this value might actually be. And we're gonna do this, when the variance is known, that means when we know what sigma squared is in the population, so that's the population variance. So we say, it's known, and I will to put that in quotes, cause sometimes it just means we're just gonna estimate it and assume that it is known. So we're gonna assume that we do know what the population variance and standard deviation is. So this is what we'll start out here with a two sided test, and that's the example that I'm going to use. And we're going to consider this hypothesis test, and whenever we're doing a population mean test, that is two sided. So here we have a two sided test. The test statistic that we're gonna create is we're gonna take this X-bar. So this is going to be the sample mean, so it's the main for my random sample. I am going to subtract from it, the numerical value of my hypothesized population mean, and remember this is a number that's a numerical value. We're gonna take the population standard deviation that we're assuming known. So this is my population standard deviation. And then we're gonna divide by the square root of the sample size so n, is my sample size. And then the next chart is not something that's in the book explicitly. What we have here in the book is... I tried to put like everything on one slide, kind of as a summary slide that you can go to, and I hope that it's helpful. It's helped me, I go to this slide all the time. So here, what I'm showing is we have our null hypothesis for this particular case, and that will be H nought. And that's gonna be, as my population mean equal to some numerical value. Then I'm gonna have one of these three alternative hypotheses, and I'm gonna choose whichever one is most appropriate. Then I had mentioned, when you go back a few slides to the hypothesis testing procedure, there is a step that says, determine the rejection criteria. Well, that's what this piece is right here, and I'm gonna kind of circle this. These are all equivalent, so this is same for this two-sided alternative hypothesis, rejecting H nought, looking at X-bar, or my test statistic Z, these are all equivalent, and then this one is equivalent as well. So each one of these corresponds to a very specific alternative hypothesis. Then there's this P-value, which we're not gonna do in this particular lecture, but these are how you would compute the P-value, and this section here computing the P-value for these hypothesis tests. I'm actually gonna refer you to the next slide, which is slide 16, which I think is a little bit better summary of how to do that. So I'm just trying to put everything on this one slide here. This is what my test statistic looks like, this is the circumstances under which I am going to reject H nought. So this piece right here, I'm gonna reject H nought, if my P-value is less than alpha. So I kind of wanna point out that this and this, this, and this and this, and this are all equivalent means of determining whether you reject H nought, or fail to reject H nought. By the way, this is about the point in the lecture where I say to my campus class, I know this is a lot right now in this particular lecture, and it's probably stuff you've never seen before. So if you are a little confused right now, that's perfectly okay, it's very normal. So I would say, if you are understanding 25 to 30% of what I'm talking about in this video, you are doing very well. What you're gonna have to do is practice, practice, practice, the problems, practice, practice, practice, reading the word problems so that you understand when to apply these formulas on this slide, and that's the challenges diagnosing the problem and knowing, Oh, I gotta go to slide 15 of this lecture to figure out what I'm doing. So if you feel like overwhelmed right now, that's a normal experience, and I'm hoping it gets better and it gets better with practice just like everything else, right? So slide 16 here, and this is what I wanted to point out, is my slide where I tell you how you can compute the P-value. Again, we're not gonna do that today, but I do want you to remember that you have this slide right here available to you, when we get there. So I've got a color coded, so for a two sided test, do this, for a one sided test, do this, for a one one sided upper test... We call it a one sided upper test, by the way, because it has a greater than here. We call it a one sided lower test, because it has a less than here. So we're gonna kind of put this one on hold, but I did wanna point it out to you. I will use my red and green pens here on the next slide though, to identify what we mean by reject H nought. So what we're gonna do here... Let me go back if you don't mind to slide 15, what I'm gonna do on slide 15, is I am going to show you what this looks like when we put it on the standard normal, PDF. So I said on slide 15, that we're going to reject our null hypothesis if my sample mean is bigger than this equation, or my sample mean is less than this equation, but the easier way to do it, is to create Z nought, so I can turn this X-bar into this Z nought. And we know this from previous lectures that we can standardize any random variable into a standard normal. Then if I just take... If I just took this side of the equation, and I went, X-bar minus mu nought, divided by sigma, divided by the square root of n, and do that to this other side, then I'm gonna get exactly what this equation is right here. And we are... We learned about what Z sub alpha over two is, and Z sub alpha from the previous lectures about confidence intervals. So this should not be foreign to you. Okay, so we're saying here... Let me, hmm, hmm, hmm, hmm right. I'm just gonna recopy this. So I'm going to refer you to for all of these. I want you to be looking at slide 17, and also look at slide 15 when you're looking at this slide, because I'm kind of combining them. All right. So we have standard normal PDFs here, we know that, that's F of Z, and this my zero variable has a mean of zero, and it has a range of minus infinity to plus infinity. So this is the population mean of my Z random variable, that's why I say mu is equal to zero. Now, if I have a two sided hypothesis test, I am going to reject H nought, right here and conclude that H1 has more evidence if my test statistic Z nought. So remember what Z nought is gonna be Z nought is going to be X-bar minus mu nought, over sigma divided by radical, and this is a number. So if Z nought is bigger than Z alpha over two, or if it's less than minus Z alpha over two. Then we are going to reject H nought. So here is minus Z, alpha over two, this Z alpha over two. And remember what this means, this means that the area above this value here is alpha over two. And that this means that the area below this value is alpha over two. So the area in between must be one minus two, times alpha, over two, so that would just be one minus alpha, which is... That should be familiar to you from confidence intervals. So my rejection region here is, I'm gonna use a red pen. So if I get a test statistic, Z nought, that falls down here, or up here I'm gonna reject H nought. If I get a test statistic that falls between those two values, I'm gonna fail to reject H nought, so that's what my color coding is here. I can do this same thing for my one sided alternatives here as well. So if I have a one sided lower hypothesis test here, I am going to reject H nought, and notice that it's just alpha here. So for a two sided test, we divide up the alpha for one-sided test, we just throw it to the left tail or the right tail. So when you reject H nought... If my test statistic is less than minus Z alps of alpha, and that means that this area right here is gonna be alpha, which means that this area here must be one minus alpha. I will reject H nought if my test statistic pulls anywhere down here, not under the area, I mean, actually on the Z-axis. And I will fail to reject H nought if my test statistic falls in this range there. Similarly for my one sided upper test, I'm gonna reject H nought, if Z not is bigger than positive Z alpha, which would be right about here, and this would be alpha, and then again, this would be one minus alpha. This is a standard deviation of a normal random variable, standard normal, just mentioning that. And again, I will reject H nought and conclude that the population mean is probably bigger than this hypothesized value. And if my test statistic is down here, I'm gonna conclude, I have more evidence in favor of H nought. So that's how this all works. We're gonna do one example, a little bit of a longer lecture than I like you probably, I'm zoning out a little bit right now, or maybe you want to pause it, take a break and then come back. And I'm gonna put everything together here in one example. That we'll use a textbook example. And the textbook example, plus, I'm gonna be also referring to our hypothesis test, testing procedure. So I also like you to visit slide 12, which is my hypothesis test testing procedure. So the textbook right now is telling me that we've got this solid rocket propellant, and the specifications say that the mean burning rate must be 50 centimeter. So I'm going to be highlighting somethings here, so that the mean burn rate should be 50 centimeters. They told us that the standard deviation, and again, because they say it's sigma, this is the population standard deviation. And they just told me that the standard deviation, which means the variance also is known, so that is two centimeters per second, so the variance is four centimeters squared per second squared. The significance level, they have chosen to be an alpha of 0.05, and they've chosen a random sample of 25 of these propellants, and they've burned them to see what the sample average burn rate is. And they've actually come up here and said that that would be X-bar is 51.3. Now, this is your first example. So we've laid out exactly sigma equals this, alpha equals this, n equals 25, X-bar equals 51.3. On a test or a quiz, you're not gonna be given these values, they'll simply be saying what they say right here. So instead of saying that the population standard deviation is sigma, I'll just say, the population standard deviation is two centimeters per second. On a quiz or an exam, I'll say that the probability of type one error is 0.05, or the significance level, sometime they just say alpha. And I'll say that the sample mean was 51.3. So it's important that you know, what words represent the actual notation in these problems. Okay, so if we go to slide 12, and we check out step number one, it says, identify the population parameter of interest. Well, they clearly wanna do some hypothesis tests on our population mean here, they don't know what it is. They're saying that the specification says it should be 50, but they don't really know what the population mean is. So, because it doesn't say that it has to be 50, bigger than 50, or less than 50 then in step two, we're able to identify our null hypothesis and in step three, our alternative hypothesis. So we know that our null hypothesis, we know that it's supposed to be 50 centimeters per second, and that's means that mu nought is this 50 centimeters per second, I said that mu nought on the right hand side is always going to be a numerical value. Our alternative hypothesis is going to be that our population mean is just not equal to 50 centimeters, and that's sort of the default value. If they said that it had to be less than, than this would have been a less than, if they said it had to be greater than we would have to say a greater than, but it's pretty clear from this problem that they want it to be a two sided hypothesis test. Next. Then I'm going on to the next slide. I'm trying to keep some things on screen here. So step four says, (indistinct) slide 19 here, the significance level is 0.05, they told us that. Step five says, determine the test statistic, well, we've only taught you once, so it has to be Z nought. And it says we're gonna reject H nought, and if you go to at this point, you can go to either slide 15, or slide 17. You're gonna see that we're gonna reject H nought, if my test statistic is less than Z, minus Z alpha over two, or if my test statistic is bigger than positive Z alpha over two. So step seven then says, figure out what your computations and your sketches are. So they told us from the problem here that the sample means... I'm putting a little bar over here. That's a numerical value, that's a point estimate remember. This will be when they took that sample of 25, so that's what n is here, n is when you scope that up there. When they took the n they had 25 samples, they added them up, divided by 25 and they got 51.3 centimeters per second. Our hypothesized pop... Our hypothesized mean is that 50 centimeters per second, that we identified previously. They told us that sigma was two centimeters per second in the problem. And then we have to determine what is Z alpha over two? Oh, I forgot to write that. We know that alpha here is equal to 0.05. So Z alpha over two is gonna be Z of 0.05, over two, which is Z of 0.025, and from previous work, we happen to know that when you do that in your calculator on inverse norm, you get to four decimal places, 1.96. So now what I'm gonna do, is I'm gonna sketch and determine whether or not I reject H nought, or fail to reject H nought. (indistinct) everything on this slide, here there we go, perfect. Alrighty, so what is my test statistic in this case? It's gonna be X-bar minus mu nought over Sigma, over radical and that's start there. And when I put this in, I'm gonna get 51.3 minus 50, over two, divided by the square root of 25. Now, if you go ahead and you do that, you are going to get... And I'm gonna do it on my calculator. You are going to get 3.25. This here is the PDF of Z, we know it has a mean of zero, and has a standard deviation of one. And according to step six, I'm gonna reject H nought if my test statistic falls below 1.96 negative, or above 1.96 positive. So this is gonna be my rejection region, and this is going to be my fail to reject region. So my test statistic actually ends up being way out here. We have Z nought equals 3.25, so it's way out here. So, because my X-bar was so much bigger than mu nought, I ended up with a test statistic that's quite large. Because I ended up with a test statistic that is quite large, then I am going to reject H nought. And there is more evidence in favor that the mean burn rate is not equal to 50 centimeters. In fact, there's evidence that it's actually bigger than 50 centimeters. And this is based on a sample of 25 measurements. What you would say in a meeting? So just say, reject H nought... Don't do that in the meeting. You would say to your boss or whatever, You'd say," Hey, there is evidence." This is what you would say, there's evidence that our mean burn rate is actually not 50 centimeters based on this sample. On an exam, when I asked you for a conclusion, I won't have as a conclusion reject H nought. I will ask you for more details, reject H nought because or conclude it in a way that actually makes the best sense. Now we can also figure out from this what the P-value is, that's another rejection criteria here. So going back up here to step six, we're also going to reject H nought, if my P-value, which I haven't talked too much about yet, if my P-value is bigger than, or I'm sorry, if my, sorry, if my P-value is less than alpha. So let's figure out what the P-value actually is. The P-value is going to be, if you go back to slide 16, I can compute my P-value as follows. I have a two sided test. So if my test statistic is less than zero, I'm gonna do this, well, that's not what it was. If my two-sided hypothesis test and the test statistic is bigger than zero, then the P-value is gonna be twice the area above the test statistic. So, that's what we're gonna do, we're gonna compute the P-value. And let me show you how to do it in your calculator. So our test statistic was 3.25. This is going to be the area above my test statistic Z nought. My P-value according to slide 16 is gonna be two times this area right here. So let's figure out what that is. My P-value is gonna be two times... And I can get this area under this curve by using the normal CDF. So I'm gonna have, two times the integrating function, normal CDF, and we're gonna integrate from 3.25, up to infinity, which I like to approximate by 10 to the 99th with a population mean of zero, cause it's the standard normal random variable and a variance of one. And if you were to use that in your calculator, and you might wanna pause and do this. What you're gonna end up with is... Let me see here, I'm gonna do it. Oops, I just did it wrong. You can't really get a negative, you're not supposed to get a negative. You're gonna get two times a pretty small number, and when you multiply it by two, you're gonna end up with 0.0012, if I did it to four decimal places. So that's what the P-value ends up being. Now, all of this, you're gonna be delighted to learn, is something that you can use in your calculator. So if you wanted to use the calculator and you go back to slide 15, you'll see that you can use a statistical test if you have a TI-83 or an 84, and certainly if you have an 89 or whatever. Most calculators have this ability, if you don't have a calculator that does this, I really recommend getting one for the rest of this course, because it will save you a lot of time and you can check your work. So let me show you how to do the calculator function. This is a pretty old TI-84. So, it will give me everything here, so watch. If I go to stat, tests and then I go to Z test, which is my very first option right here. It will ask me, do you wanna give me some data? Or do you wanna give me some already crunched numbers? This happens to have already crunched numbers, so I'm gonna highlight that stats. Then it prompts me for mu nought, we know that mu nought is 50 centimeters per second, it prompts me for this standard deviation, which was given to us in the problem as two centimeters per second, and it prompts me for X-bar, which was given to us as 51.3 centimeters per second, and it finally, it prompts me for on the number in my sample, which was 25. Now, then it asks me to pick my alternative hypothesis. Do I want a two sided? A one sided lower? Or a one sided upper? And I'm gonna pick the two sided here. Then when I hit calculate, you're gonna see that all of these numbers that I just spent so much time doing will just magically appear, it's pretty great. So I hit, calculate and look what it gives me. It computes my test statistic, it doesn't use a subscript of zero here, but that's what the test statistic is, is 3.25. It gives me the P-value, which is exactly what I just computed into four decimal places, is that it would be 0.0012. And so it gives me everything here. So finally, just in summary, I'm gonna reject H nought because my test statistic fell into the rejection region, also because my test statistic resulted in a P-value that was less than alpha. So I'd like to point out that my P-value, which was equal to 0.0012 is less than alpha, which was equal to 0.05. So this is our first example of hypothesis testing, it's a bit of a long lecture, but we're gonna do a lot of these examples coming up. And I encourage you to go through these slides slowly, pause them, do the computations that I'm doing here, make sure you're getting the same values that I am. And again, I can't stress this enough, make sure we know how to use your calculator functions for this. We'll see you in the next lecture.
Info
Channel: Dr C
Views: 3,855
Rating: undefined out of 5
Keywords:
Id: E6_l3JKc6qE
Channel Id: undefined
Length: 42min 41sec (2561 seconds)
Published: Thu Oct 03 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.