This lesson will explain hypothesis testing when the population standard deviation (sigma) is known.
In this tutorial, you're going to learn how to perform a z-test for population means.
Specifically you will focus on:
A z-test for population means is not done often because it requires that you know the population's standard deviation, but not the population mean. This does not happen all that often.
According to their bags, the standard bag of M&Ms candies is 47.9 grams. Take 14 bags at random and weigh them and the standard deviation of all M&M bags is 0.22 grams.
Fourteen bags of M&Ms result in a standard deviation of .22. Would you consider this to be evidence to prove that M&Ms bags do not contain the claimed amount of 47.9 grams in each bag?
This could mean that it's either higher than 47.9 grams or lower than 47.9 grams. If you take a look, some of these are fairly off, some by almost a full gram. You are assuming that you know the standard deviation of all M&M bags, which is not always a reasonable assumption, but is for this example.
There are four parts to running any hypothesis test. This is regardless of the type of tests that you use. The first step is stating the null and alternative hypotheses. Second, check the conditions necessary in order to actually perform the inference that you're trying to do. Third, calculate the test statistic, in this case, a z-statistic, and calculate the p value based on the normal sampling distribution. Finally, compare your test statistic to your chosen critical value or your p value to our chosen significance level. Those are both OK approaches.
Based on how they compare, state a decision regarding the null hypothesis. Circle it back around to the null hypothesis and decide if it supports the null hypothesis or does it refute the hypothesis? Make a decision to either reject or fail to reject it based on your evidence. It should also be in the context of the problem.
Step one-- for this problem, the null hypothesis is that the M&M bags are doing exactly what you thought they would do. The mean is the 47.9 grams that was claimed.
The mean of all M&M bags is 47.9 grams in weight. The alternative hypothesis is that they're not that number. This is going to be a two-sided test based on this not equal to symbol. You should also state what your alpha level is going to be, what your significance level is going to be.
By stating that alpha equals 0.05, which is the most common significance level, you are saying if the p value is less than 0.05, reject the null hypothesis. If this is above 0.05, you should fail to reject it.
Second, look at the conditions necessary for inference on a population mean.
One criteria is the data should be collected in a random way. The second criteria, is each observation is independent of the other observations? Third, is the sampling distribution that you're going to use approximately normal?
You can break it down by:
It does say the bags were randomly selected in the problem. So thinking about the way that the data was collected in the problem is important. Assume there are at least 140 bags of M&Ms. That's a reasonable assumption. Why 140? Because there were 14 bags in our sample. So you're going to assume that the population of all bags of M&M is at least 10 times that size. And then finally, the distribution of bag weights is in fact approximately normal as stated in the problem.
Part three, look at the test statistic. In this case, your test statistic is going to be a z-statistic. How is this done? The sample mean minus the hypothesized population mean of 47.9 from the null hypothesis.
It’s going to be over the standard error, which is the standard deviation of the population divided by the square root of sample size. When you do all of that and punch in the numbers, you get a z-statistic of positive 2.89.
Look at where that lies on the normal distribution that you're using. A z-statistic of 2.89 on the standard normal distribution centered at 0 is between two and three standard deviations above the mean.
Because this is a two-sided test, find the probability that your z-statistic is above positive 2.89 and the probability that it's below negative 2.89.
That probability when doubled gives us 0.0038.
You can also find this probability using technology.
Finally, compare your test statistic to your critical value or your p-value to your significance level. Compare your p- value of 0.0038 to your significance level of 0.05. This actually contains three parts-- the comparison, the decision, and the conclusion. Since your p-value of 0.0038 is less than 0.05-- there's your comparison-- your decision is you reject the null hypothesis. There is evidence to conclude that the M&M bags are not filled to a mean of 47.9 grams. There's your conclusion.
You have all three parts needed to finish the problem.
The steps in any hypothesis test, not just a z-test for population means, but any hypothesis test are the same. First, state the null and alternative hypotheses both in symbols and in words. Second, state and verify the conditions necessary for inference. Third, calculate the test statistic from your statistics that you have and calculate its p-value. Finally, compare your p-value to the alpha level that you've chose or your test statistic to the critical value, and make a decision about the null hypothesis. State your conclusion in the context of the problem.
In a z-test for population means, the population standard deviation must be known. That is not very common. You'll have other ways to deal with it when you don't know the population standard deviation. And since the test statistic is a z, this is all about z-test for population means.
Good luck.
Source: This work adapted from Sophia Author Jonathan Osters.
A hypothesis test that compares a hypothesized mean from the null hypothesis to a sample mean, when the population standard deviation is known.