Hypothesis Testing Introduction and EXAMPLE for the Population Mean

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone andy robertson here with cq academy and in today's video i'm going to show you how to do a hypothesis test for the population mean all right let's head over the computer and get started all right so in today's lecture we're going to start everything off here by talking about something called the sample mean distribution so hypothesis testing is a form of inferential statistics where we were using sample data to make inferences about a population so for you to understand hypothesis testing you have to understand something called the sample mean distribution because everything we're going to talk about later in the lecture is based on the sample mean distribution and then i want to talk about the big assumption in hypothesis testing so our hypothesis test and the entire process is based on one giant assumption and it's important that we cover this before we get into the next part of the presentation which is going to be the six step process to hypothesis testing so we'll cover that we'll walk through it in detail talking about the significance level and calculating test statistics and rejection regions and then finally we'll do an example of hypothesis testing for the population mean all right let's get into it so hypothesis testing and the sample mean distribution so i've talked about this in in other presentations but the sample mean distribution is a core concept in inferential statistics and specifically in hypothesis testing so the way we create a sample mean distribution is that we have our original population here on the left and then what we do is we take a random sample of 30 units and we calculate a sample mean value and let's say we did that 10 20 30 40 50 100 times every time we took a random sample we'd come up with a different sample mean value just based on random luck we could do this we could do this over and over we could do this 100 times and then we could take those individual sample mean values and we could create a new distribution called the distribution of sample means and this would be a normally distributed distribution that reflects all of the possible sample mean values that might be captured or that might be measured when we randomly sampled from our original population and then the expected value of this distribution the mean value is equal to the population mean and then the standard deviation of this distribution is equal to and you can see over here that this original population distribution has a standard deviation of simply just sigma the distribution of sample means has a standard error we call the standard error to avoid confusion with the standard deviation of the population standard deviation divided by the square root of n and then essentially what ends up happening is once we know our significance level we can determine rejection regions associated with this sample mean distribution and we can take us a new sample of data and we can see where that falls within the sample mean distribution so for example you might have one set of data you might have one sample mean fall here in the distribution okay and that might lead you to one conclusion within your hypothesis test you might have another set of data that falls way out here in the tails of the sample mean distribution and we might come to a different conclusion based on that result so all of this hypothesis testing is based on this distribution of sample means and then the big assumption in hypothesis testing so the analogy here is the u.s criminal justice system in the u.s the null hypothesis is that every defendant is innocent until proven guilty and the alternative hypothesis is that the defendant is of course guilty and the only way we come to the conclusion that a defendant is guilty is if we have sufficient facts and data and evidence to prove that the alternative hypothesis is in fact true and that same idea is absolutely true in hypothesis testing we start every test assuming that the null hypothesis is true and when we do this it allows us to create that rejection region that we can then use to either reject the null or fail to reject the null hypothesis so this is a huge assumption in hypothesis testing everything assumes the null is true and then we have to collect data to prove that the null hypothesis is in fact false so that we can reject it and of course as we walk you through the process we'll talk about how you know when you can successfully reject the null hypothesis all right so the six step process hypothesis testing step one and this is most important is to identify the null and alternative hypothesis if we don't get this correctly it changes the way the entire hypothesis test works and might throw off your eventual result so it's important to think about the unique situation that you're assessing for and pick the correct null and alternative hypothesis and then step two is choosing the significance level so once you have your null and alternative hypothesis correctly you need to determine a significance level because that's an important step of step three which is determining the rejection region for whatever statistic we're measuring for so before you can determine a rejection region you have to know your significance level once we have our rejection region we can actually collect our sample data and calculate a test statistic we can then compare that test statistic against the rejection criteria and make our final conclusion and then finally restate that decision in terms of the original problem statement so let's walk through each of these steps individually and then we'll do our example so step one identifying the null and alternative hypothesis so there's three really three different ways to create a null and alternative hypothesis and what you'll notice is that the null hypothesis and the alternative hypothesis are mutually exclusive statements so for example the null hypothesis here on the left-tailed test is that our population mean is greater than or equal to the null population mean and the alternative hypothesis is that our new population mean is less than our original population mean or the null population mean and you can see what happens here to our rejection region when we're performing a left tail test so what we end up doing is we end up putting that rejection criteria that rejection region or that significance level in the left tail of our distribution so for example let's say you made a change to your production process and you wanted to prove that you had reduced some sort of output within your process whether it was scrap or some other output in your process if you wanted to make a strong claim with your alternative hypothesis you would want to choose a left tail test another option here is the two-tailed test so let's just say you're you have a hypothesis that maybe your population mean has shifted maybe you're not sure if it shifted up or shifted down but you think it's changed in some way you can perform a two-tailed test that essentially proves and you can see it here in the alternative hypothesis that your new sample mean or your new population mean is not equal to the original null population mean value so this is why it's important to choose the right null and alternative hypothesis because it changes where the rejection region is in your sample mean distribution and then two choosing the significance level so this is really important to hypothesis testing and it establishes the criteria that allows you to pick between the null and the alternative hypothesis and so there's this great statement that helps you judge if the value of the sample mean would be highly unlikely to occur assuming that the null hypothesis was true then we can reject the null hypothesis in favor of the alternative so if we assume that the null hypothesis is true that it is some set value that getting a sample mean way out here in the tails of this distribution would be highly unlikely to occur and if the value of the sample mean is highly unlikely to occur then we feel like we have enough data and we have enough evidence to reject the null in favor of the alternative hypothesis so choosing the significance level establishes the rejection region of your test and essentially creates this criteria of what a highly unlikely to occur value would be the other thing that your significance level does is it creates the probability of a type 1 error so a type 1 error is when you reject the null hypothesis when it is in fact still true so let's say you did have this sample mean distribution and we know that randomly just by certain chance and luck you actually could take a sample from this distribution and have the sample mean fall out here in the tails of our distribution that's called a type one error so depending on the significance level you pick it changes the probability of a type one error of course i've got three different scenarios i'm showing here i've got the ten percent significance level here so this is a two-tailed test with five percent on the left and five percent on the right here's a five percent significance level and this is typically the default significance level that most people pick and then of course if you want a lower probability of a type one error you can always change your significance level to something like one percent but generally let's stick with our example today of five percent and then step three determining the rejection region so the rejection region is a combination of the significance level and the type of test so i'm showing here two different types of tests i'm showing the two-tailed test and the one-tailed test and essentially what we do is we have to translate that significance level into a z-score so when we're talking about a two-tailed test the z-score of minus 1.96 and positive 1.96 forms the boundary of the rejection region so any z-score greater than 1.96 essentially would represent a statistic that falls into the rejection region and then for a one-tailed test if we've got a 5 significance level that z score of 1.65 forms the boundary of our rejection region so that's how we use the significance level and the type of test to create that rejection region and then number four is calculating the test statistic so in any hypothesis test we're going to collect sample data and we're going to calculate in this example a sample mean value and then what we do is we take that sample mean value here i'm showing it as x bar and we transform that x-bar value into a z-score so we compare it against the mean we divide by the standard error and we calculate a z-score and then essentially we can take that z-score and compare it against our rejection region which is step five so there's really two different outcomes in a hypothesis test the first outcome is when our z-score actually falls into the rejection region in this scenario we can reject the null hypothesis and essentially accept the alternative hypothesis is true now this particular outcome where we reject the null hypothesis is called a strong claim because we've essentially collected a substantial amount of facts and data and evidence that allow us to prove this to be the truth essentially our sample data was significant enough to reject that starting assumption that the null hypothesis was true now the other outcome is when our z-score doesn't fall in the rejection region so in this scenario when our z-score falls anywhere in this region here we must fail to reject the null hypothesis and therefore fail to accept the alternative hypothesis now in hypothesis testing this is called a weak claim because we didn't necessarily prove the null hypothesis was true we just don't have the evidence needed to conclude that it's incorrect by the way we never say that we accept the null hypothesis we always present it as a failure to reject the null and then lastly we simply just restate that decision so our hypothesis test performed at a five percent significance level we can reject the null hypothesis and accept the alternative that you know our process shifted or our process changed or whatever whatever so that's that's step number six now let's get into that example so let's say you're filling bottles of glue and your historical fill height is equal to 3.45 inches you sample 30 units from your recent batch you know your population standard deviation is equal to half an inch and the sample mean that you measure in those 30 units is equal to 3.43 inches using a significance level of 5 test the hypothesis that the true average fill height is equal to 3.45 inches okay so step one in the six step process is to identify the null and the alternative hypothesis so in this scenario essentially what we want to prove is that our mean value hasn't changed right so that our mean value is still equal to that historical fill height of 3.45 inches so we're going to go with a two-tailed test and spread our rejection region out amongst two tails and then the significance level is given in the problem statement it's five percent so step 3 determine the rejection region for the statistic of interest well if we have a 5 significance level we just saw this in the previous walkthrough that if we spread that significance level out nowhere tails then our z scores of minus 1.96 and positive 1.96 form the boundaries of our rejection region and then step four is to calculate the test statistic from the sample data so here's that z transformation that we use when we're talking about the sample mean distribution we know what our parameters are there's four variables that go into this z transformation the sample mean the population mean the population standard deviation and the sample size we can plug in those variables from the problem statement and calculate a z-score of minus 0.220 now graphically that looks like this so you can see where that z-statistic falls within our distribution and it essentially doesn't fall in the rejection region so we can compare that test statistic against our rejection region and essentially we don't fall in the rejection region and therefore we must fail to reject the null hypothesis so we can restate this decision in terms of the original problem statement based on the sample data we must fail to reject the null hypothesis that the fill height of the glue bottles is not statistically significantly different than the historical fill height of 3.45 so that's basically it for hypothesis testing all right that was it for today's lecture i hope you liked it if you did hit that like button down below so that other people just like you can find the same content and if you really loved it and you want to take that next step in becoming a cqe click that subscribe button and that notification bell icon that way as i publish new material you get notified and you can keep going along your journey to become a cqe all right that's it i'll talk to you later bye you
Info
Channel: CQE Academy
Views: 1,082
Rating: undefined out of 5
Keywords: : Hypothesis Testing, Hypothesis Testing for the Population Mean, Inferential Statistics, Distribution of Sample Means, Null Hypothesis, Alternative Hypothesis, Null and Alternative Hypothesis, Significance Level of a Hypothesis Test, Rejection Region of Hypothesis Testing, Z-score and hypothesis testing
Id: vRIIUDhCKU8
Channel Id: undefined
Length: 15min 17sec (917 seconds)
Published: Wed Jan 20 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.