In this video we are going to through how to perform a hypothesis test using a p value for a population mean, mu, assuming we know the population standard deviation,
sigma. And we do this by using a z test for the mean, where z equals the sample mean, minus the hypothesized mean, divided by the standard error.
The formula for this is z equals x bar minus mu, divided by sigma over the square root of n. And in this formula, z is a standardized test statistic for mu,
x bar is a mean from a sample, mu is the population mean, which is being hypothesized, sigma is the population standard deviation, and n is the size
of the sample we are using. And there are 2 conditions, the sample must be a random sample, and the population must be normally distributed, or n, the sample size
must be greater than or equal to 30. Lets jump into an example, and we will go through a list of steps for this method. A recent news article stated that the mean
cost of an oil change is $53. You think this information is incorrect, so you randomly select 36 people and find the mean cost for their oil changes to be $49.
And from past data, you know the population standard deviation is $12. Is there enough evidence to support your claim at a level of significance of alpha equals 0.05?
So, when using p values for a z test for a mean it’s good to go through a list of steps. And step 1 is to make sure the conditions for using the formula are met.
The sample is a random sample, and the sample size, n is 36, so n is greater than or equal to 30. Step 2 is write the claim out and identify the null and alternative
hypotheses. Our claim is that the mean, mu is not equal to 53. And we know the alternative hypothesis contains a statement of inequality, so h sub a
is mu does not equal 53. The null hypothesis is the complement of the alternative hypothesis, so h sub 0 is mu equals 53. Step 3 is to identify the level of significance,
which was given, alpha equals 0.05. Step 4 is to use the formula and calculate the z value, or the value of the standardized test statistic. And in our example,
we have x bar, the sample mean equals 49, mu, the hypothesized population mean, equals 53, sigma, the population standard deviation equals 12, and n, the sample size
equals 36. So, we can plug these into the formula and we get z equals -2.00. Step 5 is to find the area that corresponds to the z value we calculated,
and looking that value up in a z distribution table we get 0.0228. Step 6 is to determine the test to use, left tailed, right tailed or 2 tailed.
And in our example, the alternative hypothesis contains the does not equal sign, so that means a 2 tailed test is required. Step 7 is to assign the p value,
and in a 2 tailed test, the p value is the area under both of the tails. In step 5 we found that the area under 1 tail is 0.0228, so the p value equals 2 times that,
which gives us 0.0456. Step 8 is to compare the p value to alpha, the level of significance. And we have alpha equals 0.05, and a p value of 0.0456.
Step 9 is to make a decision to reject or fail to reject the null hypothesis. The rule is if the p value is less than or equal alpha, then reject the null hypothesis,
and if the p value is greater than alpha, then fail to reject the null hypothesis. Since our p value is less than alpha, we reject the null hypothesis that mu is equal to $53.
Step 10 is to write out the decision. So, there is enough evidence at the 5% level of significance to support the claim that the mean cost of an oil change
is different from $53. Alright, one more example, and I’m going to go through this a little quicker. A website reported that the mean time for a person per day spent playing
a popular game on their phone is less than 23 minutes. A random sample of 25 people showed a sample mean of 25.7 minutes.
Assume the population standard deviation is 6 minutes and the population is normally distributed. Is there enough evidence to support the claim at a level of confidence
of alpha equals 0.01? Step 1, it is a random sample, and the population is normally distributed, so we are good there. Step 2, the claim is that mu is less than 23.
And we know the alternative hypothesis contains a statement of inequality, so h sub a is mu is less than 23. The null hypothesis is the complement of the alternative
hypothesis and contains the statement of equality, so h sub 0 is mu is greater than or equal to 23. Step 3, the level of significance was given as alpha equals 0.01.
Step 4, calculate the standardized test statistic. We have x bar equals 25.7, mu equals 23, sigma equals 6, and n equals 25. Plugging and calculating we get z equals 2.25.
Step 5, in the z distribution table, for z equals 2.25, we get approximately 0.0131. For step 6, because the alternative hypothesis contains the less than inequality,
this will be a left tailed test. Step 7, since this is a one tailed, a left tailed test, the p value is equal to the area we found in step 5, so the p value equals 0.0131.
Step 8, comparing, we have alpha equals 0.01, and the p value equals 0.0131, so the p value is greater than alpha. Step 9, since the p value is greater than alpha,
we fail to reject the null hypothesis. And step 10, there is enough evidence at the 1% level to support the claim that the mean time spent per day playing a game on the
phone is less than 23 minutes. Alright my friends, that be the basics on using the p values for a z test when you know the standard deviation.
Hopefully this video helped you out, I do have more videos right there for you, till next time, I am outta here.