Regarding proportions in hypothesis testing

Agent Smith

Full Member
Joined
Oct 18, 2023
Messages
458
Level: Basic Stats (Grade XII)

Hypothesis Testing

Proportions

[imath]p_0[/imath] = parent population proportion
[imath]p_s[/imath] = sample proportion
[imath]n[/imath] = sample size

Assume all conditions for inference are satisfied.

Hypothesis

[imath]H_0: p_s = p_0[/imath]
[imath]H_1 = p_s > p_0 \text{ or } p_s < p_0 \text{ or } p_s \ne p_0[/imath]

Standard deviation of population = [imath]\sigma = \sqrt{p_0(1 - p_0)}[/imath]

Standard deviation of the sampling distribution of the difference in proportions = [imath]\sigma_s[/imath]
[imath]\sigma_s = \frac{\sigma}{\sqrt n}[/imath]

Compute z score, [imath]z = \frac{p_s - p_0}{\sigma_s}[/imath]

Look up p-value for computed z.
If p-value [imath]\leq \alpha[/imath] then reject [imath]H_0[/imath].

Correct?


Also, I don't understand this part 👉 Compute z score, [imath]z = \frac{p_s - p_0}{\sigma_s}[/imath]

Please help. Gracias
 
Level: Basic Stats (Grade XII)

Hypothesis Testing

Proportions

[imath]p_0[/imath] = parent population proportion
[imath]p_s[/imath] = sample proportion
[imath]n[/imath] = sample size

Assume all conditions for inference are satisfied.

Hypothesis

[imath]H_0: p_s = p_0[/imath]
[imath]H_1 = p_s > p_0 \text{ or } p_s < p_0 \text{ or } p_s \ne p_0[/imath]

Standard deviation of population = [imath]\sigma = \sqrt{p_0(1 - p_0)}[/imath]

Standard deviation of the sampling distribution of the difference in proportions = [imath]\sigma_s[/imath]
[imath]\sigma_s = \frac{\sigma}{\sqrt n}[/imath]

Compute z score, [imath]z = \frac{p_s - p_0}{\sigma_s}[/imath]

Look up p-value for computed z.
If p-value [imath]\leq \alpha[/imath] then reject [imath]H_0[/imath].

Correct?
I agree with your analysis.

Also, I don't understand this part 👉 Compute z score, [imath]z = \frac{p_s - p_0}{\sigma_s}[/imath]

Please help. Gracias
This is just the standard formula for the z-score in hypothesis testing involving proportions.

Let us put your skills in practice. How would you solve this problem?

A school claims that 60% of their students pass a standardized test. A random sample of 100 students is taken, and 65 students are found to have passed. Test if there is sufficient evidence to support the claim that more than 60% of students pass the test at a 5% significance level.
 
Proportions
[imath]p_0[/imath] = parent population proportion
[imath]p_s[/imath] = sample proportion
[imath]n[/imath] = sample size

Hypothesis
[imath]H_0: p_s = p_0[/imath]
[imath]H_1 = p_s > p_0 \text{ or } p_s < p_0 \text{ or } p_s \ne p_0[/imath]
I'm confused by your notation. (I'm not a statistician, so I don't make any claims to a full understanding.)

You seem to be making a hypothesis about the sample proportion, which is what you already know. I'd expect you to be making some claim that the population proportion [imath]p[/imath] is equal/less/greater than some claimed value [imath]p_o[/imath], rather than that the sample proportion is equal/less/greater than the population proportion, as you are saying.

I expect notation more like what I see here, where [imath]\hat{p}[/imath] is the sample proportion, and [imath]p_o[/imath] is the claimed population proportion.

1732735942955.png

Where did you get your version?
 
I'm confused by your notation. (I'm not a statistician, so I don't make any claims to a full understanding.)

You seem to be making a hypothesis about the sample proportion, which is what you already know. I'd expect you to be making some claim that the population proportion [imath]p[/imath] is equal/less/greater than some claimed value [imath]p_o[/imath], rather than that the sample proportion is equal/less/greater than the population proportion, as you are saying.

I expect notation more like what I see here, where [imath]\hat{p}[/imath] is the sample proportion, and [imath]p_o[/imath] is the claimed population proportion.


Where did you get your version?
My lessons were less formal amd short (max 1 example question per topic). The notation I used is one that I made up; my bad if causes confusion. I guess substitutions can be made without major issues popping up along the way.

The question you asked is on point. I got it from a question which gives the national hours-of-sleep proportion among teens and the hypothesis is that a particular school's hours-of-sleep proportion among teens is lower.
 
A school claims that 60% of their students pass a standardized test. A random sample of 100 students is taken, and 65 students are found to have passed. Test if there is sufficient evidence to support the claim that more than 60% of students pass the test at a 5% significance level.
Thanks.

[imath]z = \frac{0.65 - 0.60}{\sqrt{\frac{0.65 \times 0.35}{100}}} = 1.04[/imath]

P-value [imath]\approx 1 - (0.5 + 0.34) = 0. 16[/imath]

[imath]0.16 > 0.05[/imath]

We reject the hypothesis that 60% or more of the students passed this test.

Correct?
 
The probability corresponding to a z score of 1.04 is about 0.85 = 85%.

This is less than the required (1-0.05)=0.95=95% so we reject the claim.

Can't say I really understand what you've done after correctly computing the z score.
 
I'm confused by your notation. (I'm not a statistician, so I don't make any claims to a full understanding.)

You seem to be making a hypothesis about the sample proportion, which is what you already know. I'd expect you to be making some claim that the population proportion [imath]p[/imath] is equal/less/greater than some claimed value [imath]p_o[/imath], rather than that the sample proportion is equal/less/greater than the population proportion, as you are saying.

I expect notation more like what I see here, where [imath]\hat{p}[/imath] is the sample proportion, and [imath]p_o[/imath] is the claimed population proportion.


Where did you get your version?
Where did you take the screenshot from, please share.
 
Where did you take the screenshot from, please share.
As before, I gave the link:
I expect notation more like what I see here, where [imath]\hat{p}[/imath] is the sample proportion, and [imath]p_o[/imath] is the claimed population proportion.


Where did you get your version?
Just click on the word "here".

But it's just one of many such explanations that I happened to choose, not something rare. It isn't hard to find lessons on this material.
 
[imath]z = \frac{0.65 - 0.60}{\sqrt{\frac{0.65 \times 0.35}{100}}} = 1.04[/imath]

P-value [imath]\approx 1 - (0.5 + 0.34) = 0. 16[/imath]
From your work, I can see that you are using the sort of table that gives the probability that z is between 0 and a given value, rather than the probability that z is less than a given value, as I more often see these days. You added 0.5 to the 0.34 from the table to convert it to the probability that z is less than 1.04, and then subtracted that from 1 to get the probability that z is greater than 1.04.

For information about the three common types of tables, see

But, looking at the tables there, I see that you misread the answer.

From the table here, the probability between 0 and 1.04 is 0.3508, not 0.34:

1732806575867.png

How did you get 0.34?
 
@Dr.Peterson Capture.PNG
Approximately ... I used the 68-95-99.7 empirical rule. Bad idea?

Is my answer right though? It should've been we fail to reject the null hypothesis, 0.16 > 0.05
 
Thanks.

[imath]z = \frac{0.65 - 0.60}{\sqrt{\frac{0.65 \times 0.35}{100}}} = 1.04[/imath]

P-value [imath]\approx 1 - (0.5 + 0.34) = 0. 16[/imath]

[imath]0.16 > 0.05[/imath]

We reject the hypothesis that 60% or more of the students passed this test.

Correct?
The probability corresponding to a z score of 1.04 is about 0.85 = 85%.

This is less than the required (1-0.05)=0.95=95% so we reject the claim.

Can't say I really understand what you've done after correctly computing the z score.
i think that both of you misunderstood what are [imath]H_0[/imath] and [imath]H_1[/imath] or failed to recognize the condition of when to reject or fail to reject!

Follow post #1:

First:
What are
[imath]p_0[/imath]
[imath]p_s[/imath]
[imath]n[/imath]

Second:
What are
[imath]H_0[/imath]
[imath]H_1[/imath]

Third:
Make a decision (Most likely you made a mistake in this part)
If the test statistic [imath](z)[/imath] is less than the critical value [imath](z_{0.05})[/imath], do you reject the null hypothesis?
Or
If the test statistic [imath](z)[/imath] is less than the critical value [imath](z_{0.05})[/imath], do you fail to reject the null hypothesis?
 
Last edited:
A school claims that 60% of their students pass a standardized test. A random sample of 100 students is taken, and 65 students are found to have passed. Test if there is sufficient evidence to support the claim that more than 60% of students pass the test at a 5% significance level.

@mario99 thanks for responding.

[imath]H_0[/imath]: 60% of the students passed the test
[imath]H_a[/imath]: > 60% of the students passed the test

I have to assume [imath]H_0[/imath]. Then, what is the probability that a sample will show 65% students passed the test (the question has 100 as the sample size). I computed that probability, a p-value of 0.16, corresponding to a z score of 1.04. Since 0.16 > alpha i.e. 0.16 > 0.05, I fail to reject [imath]H_0[/imath]. Correct?
 
A school claims that 60% of their students pass a standardized test. A random sample of 100 students is taken, and 65 students are found to have passed. Test if there is sufficient evidence to support the claim that more than 60% of students pass the test at a 5% significance level.

@mario99 thanks for responding.

[imath]H_0[/imath]: 60% of the students passed the test
[imath]H_a[/imath]: > 60% of the students passed the test

I have to assume [imath]H_0[/imath]. Then, what is the probability that a sample will show 65% students passed the test (the question has 100 as the sample size). I computed that probability, a p-value of 0.16, corresponding to a z score of 1.04. Since 0.16 > alpha i.e. 0.16 > 0.05, I fail to reject [imath]H_0[/imath]. Correct?
Now your answer is almost perfect. It is only that you did not calculate [imath]z[/imath] precisely!

[imath]z = 1.02[/imath]

Or

[imath]z = 1.04[/imath]

🤔
 
You seem to be making a hypothesis about the sample proportion, which is what you already know. I'd expect you to be making some claim that the population proportion ppp is equal/less/greater than some claimed value pop_opo, rather than that the sample proportion is equal/less/greater than the population proportion, as you are saying.
This isn't explained in my lessons. I took a short online course. It's a good course. Some test questions are on changes in the population mean and some are on differences in the population mean.

As I mentioned there's a question on average sleep hours for teenagers and we're to test if the average sleep hours in a local school is different.

Then another question on unemployment rate and a check on whether the elected mayor was able to do something about it/not.

What's the difference in these two questions, I don't know. Can you help? Gracias.
 
I referred you to a lesson on the subject (among many others). If you want to learn about it, read those.

You'd need to show both questions in full, in order to be sure if there is any significant difference between them. It's easy for such questions to sound similar though they are different, or vice versa. But both of the two you mention here appear to be testing a hypothesis that some parameter is not equal to an existing standard (claimed population parameter), so they may be essentially asking the same thing.
 
I referred you to a lesson on the subject (among many others). If you want to learn about it, read those.

You'd need to show both questions in full, in order to be sure if there is any significant difference between them. It's easy for such questions to sound similar though they are different, or vice versa. But both of the two you mention here appear to be testing a hypothesis that some parameter is not equal to an existing standard (claimed population parameter), so they may be essentially asking the same thing.
Ah, yes, I remember that. Gracias. The questions themselves are lost in my notes, unfortunately. However, what I recall is in the preceding posts. To repeat, we have a overall mean sleep hours (I think it was 8 hours) for teenagers in the country. The question then gives us the mean sleep hours for teens in a particular school. We are asked to check if this school's teenagers sleep differently.

As for the unemployment rate, there's a before-mayor and after-mayor proportion for a city. We're asked to check if the mayor made any difference (it seems he won based on promises made on the difficult unemployment situation in his city).

Isn't that enough information? 🤔
 
Top