Main content

## Statistics and probability

### Course: Statistics and probability > Unit 12

Lesson 3: Tests about a population proportion- Constructing hypotheses for a significance test about a proportion
- Writing hypotheses for a test about a proportion
- Conditions for a z test about a proportion
- Reference: Conditions for inference on a proportion
- Conditions for a z test about a proportion
- Calculating a z statistic in a test about a proportion
- Calculating the test statistic in a z test for a proportion
- Calculating a P-value given a z statistic
- Calculating the P-value in a z test for a proportion
- Making conclusions in a test about a proportion
- Making conclusions in a z test for a proportion

© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Calculating a z statistic in a test about a proportion

Calculating a z statistic in a one-sample z test about a proportion.

## Want to join the conversation?

- It was never explained why z is the correct test statistic for this significance test. I imagine it isn't always the "correct test statistic" and would have appreciated an explanation of what the other choices would be and why. And if it is indeed the only one, then why is that. It would go a long way as to understanding why he did what he did here.

Thank you.

ETA: I googled test statistic and found there are 4 main ones, Z-test, T-test, ANOVA and Chi-Square Test. I didn't realize these were how the test statistic were used/found.(5 votes) - Duno why he stopped in the middle. This is the most important video to explain the significance test in action(5 votes)
- Shouldn't we be taking the standard deviation of the actual distribution rather than the standard deviation of the sample distribution?

Are we assuming they are approximately the same?(2 votes) - The name test statistic seems a little confusing. I though, they asked about which population statistic the test is dealing with(1 vote)
- I have the same problem with questions being vague like that, but in real world application, you would have to figure out for yourself what is the most proper test statistic for your data.

Generally you would use:

Z-test and Chi-squared test for categorical variables (counts/proportions)

T-test/ANOVA for numerical variables (averages/means)(2 votes)

- square rout from (P(1-P) divided on n) - isn't it the standard deviation of the population?! how can we use it as if it were the standard deviation of the sampling distribution?(2 votes)
- Since we are talking about the proportion of the residents of the town, the population is the distribution of a Bernoulli random variable with 1 = the hypothesized value of p (0.08 in this case) and 0 = 1-p = 0.92

The standard deviation of this distribution is, therefore, sqrt(p(1-p)).(0 votes)

## Video transcript

- [Instructor] The mayor
of a town saw an article that claimed the national
unemployment rate is 8%. They wondered if this held
true in their own town, so they took a sample of 200 residents to test the null hypothesis
is that the unemployment rate is the same as the national one versus the alternative hypothesis which is that the unemployment rate is
not the same as the national, where p is the proportion
of residents in the town that are unemployed. The sample included 22
residents who were unemployed. Assuming that the conditions
for inference have been met, and so that's the random, normal,
and independent conditions that we've talked about
in previous videos, identify the correct test statistic for this significance test. So let me just, I like
to rewrite everything just to make sure I've
understood what's going on. We have a null hypothesis
that the true proportion of unemployed people in our town, that's what this p represents, is the same as the national unemployment. And remember, our null
hypothesis tends to be the no news here, nothing
to report so to speak, and we have our alternative hypothesis that no, the true unemployment
in this town is different, is different than 8%. And so what we would do is we would set some type of a significance level, we would assume that the
mayor of the town sets it, let's say, he sets or she sets
a significance level of 0.5. And then, what we wanna do
is conduct the experiment. So this is the entire
population of the town. They take a sample of 200
people, so this is our sample, n is equal to 200, since it
met the independence condition, we'll assume that this is less
than 10% of the population, and we calculate a sample statistic here, and it would be, since we care about the true population proportion,
the sample statistic we would care about is
the sample proportion and we figure out that it
is 22 out of the 200 people in the sample are unemployed. So this is 0.11. Now the next step is
assuming the null hypothesis is true, what is the
probability of getting a result this far away or further from the assumed population proportion? And if that probability
is lower than alpha, then we would reject the null hypothesis which would suggest the alternative. But how do you figure
out this probability? Well, one way to think about it is we could say how many
standard deviations away from the true proportion,
the assumed proportion is it? And then we could say
what's the probability of getting that many standard
deviations or further from the true proportion? We could use a z-table to do that. And so what we wanna do is figure out the number of standard deviations, and so that would be a z-statistic. And so how do we figure it out? Well, we can figure out the difference between the sample proportion here and the assumed population proportion, so that would be 0.11 minus 0.08 divided by the standard deviation of the sampling distribution
of the sample proportions. And we can figure that out. Remember, all that is is,
and sometimes we don't know what the population proportion is but here we're assuming
a population proportion. So we're assuming it is 0.08 and then we'll multiply
that times one minus 0.08 so we'll multiply that times 0.92 and this come straight from we've seen it in previous videos, the standard deviation of the sampling distribution
of sample proportions and then you divide that by n
which is 200 right over here. And we can get a calculator
out to figure this out but this would give us
some value which it says how many standard deviations
away from 0.08 is 0.11? And then we could use
a z-table to figure out what's the probability of
getting that far or further from the true proportion
and then that would give us our p-value which we can
compare the significance level. Sometimes, you will see a formula that looks something
like this that you say, hey look, you have your sample proportion, you find the difference between that and the assumed proportion
in the null hypothesis, that's what this little zero says, that this is the assumed
population proportion from the null hypothesis
and you divide that by the standard deviation,
the assumed standard deviation of the sampling distribution
of the sample proportions. So that would be our assumed
population proportion times one minus our assumed
population proportion divided by our sample size. And in future videos,
we're gonna go all the away and calculate this, and
then look it up in a z-table and see what's the probability of getting that extreme or more extreme of a result and compare it to alpha.