Hypothesis Testing for a Difference Between Two Proportions

An error occurred trying to load this video.

Try refreshing the page, or contact customer support.

Coming up next: What is a Chi-Square Test? - Definition & Example

You're on a roll. Keep up the good work!

Take Quiz Watch Next Lesson
Your next lesson will play in 10 seconds
  • 0:01 Proportions
  • 0:30 Proportions &…
  • 4:20 Example
  • 9:11 Lesson Summary
Save Save Save

Want to watch this again later?

Log in or sign up to add this lesson to a Custom Course.

Log in or Sign up

Speed Speed
Lesson Transcript
Instructor: Artem Cheprasov

Artem has a doctor of veterinary medicine degree.

Have you ever wondered if there's a difference between two proportions or if it just seems that way? Take for example, the proportion of college graduates who smoke vs. the proportion of college dropouts who smoke? You can test for this using hypothesis testing to discover if there's a real difference or not.


Is the proportion of people in their 30s who own a home higher than the proportion of people in their 40s that own a home? Is there a difference in the proportion of college graduates who own a car and the proportion of college dropouts who don't own a car? How can we know if there is a difference? For this, we turn to hypothesis testing to figure out whether or not there is a difference between two proportions.

Proportions & Hypothesis Testing

First, let's start with a little alphabet soup. On the screen is an equation (see video). It reads like this: p hat is equal to x over n. p hat is the sample proportion that we use to estimate the population proportion, which is simply p. n is our sample size, and x is the number of units or individuals who represent the characteristic we are most interested in.

So, for example, let's say that in a sample of 50 people over 60 years of age, 10 have cancer. This means our sample proportion, p hat, is equal to 10/50, which is 1/5, or 0.20.That was simple. Let's build on this.

When we are trying to figure out if there's a difference between two population proportions, denoted p_1 and p_2, we must come up with hypotheses. They are as follows:

  • The null hypothesis, H-naught (H_0), tells us that p_1 is equal to p_2
  • The alternative hypothesis, H_A, tells us that p_1 is not equal to p_2

It's easy to remember that this is the case by thinking of the justice system in the U.S. If you get arrested for anything, the null hypothesis is that you are innocent until proven guilty. You equals good; that's the null hypothesis. It's up to the prosecution to disprove this. You does not equal good: the alternative hypothesis.

Okay. Simple enough. Since we're dealing with two proportions, it's very logical to see that we use p hat_1 = x_1 / n_1 to estimate p_1. Likewise, we use p hat_2 = x_2 / n_2 to estimate p_2. Again, all this is saying is that we use each population's respective sample proportion (p hat) to estimate its own population proportion (p).

Because we don't know what p_1 and p_2 actually are, we can come up with a weighted estimate of p with the following formula (see video). And the standard error can be found using the following formula (see video). The standard error is basically a measure of how variable the sample mean can be across different samples of a given population. Note the q in the most recent formula. Remember that q = 1 - p for later.

You're probably really confused by all of these numbers and letters and who knows what. So, let me simplify everything you need to know about using a z-test to figure out the difference between two population proportions using the following master image (see video). This also looks intimidating, but I promise it's not. All this is really saying is that the test value, z, is equal to the observed value (p hat_1 - p hat_2) - the expected value (p_1 - p_2) all divided by the standard error. That's it.

In order to use the z-test to find the difference between two proportions, we must satisfy two requirements:

  1. The samples have to be independent
  2. n_1 * p_1, n_1 * q_1, n_2 * p_2, and n_2 * q_2 have to be greater than or equal to 5


Again, I know all those equations and formulas and symbols have made your head spin, but let's just focus on the master image and an example where all you have to do is basically plug and chug.

Here are the steps you need to take to solve our example:

Step 1: State your hypothesis

Step 2: Find your critical values

Step 3: Calculate the test value

Step 4: Make your decision - do you reject or fail to reject the null hypothesis?

Step 5: Summarize your results

Here's our example. In a recent study (totally made up by the way), it was shown that 100 out of 250 Republican-leaning cities had an accidental shooting rate of less than 10%, while 50 out of 350 Democratic-leaning cities had an accidental shooting rate of less than 10%. Using a significance level of 0.05, go ahead and test the claim that there is no difference in the proportions of the Republican- and Democratic-leaning cities with an accidental shooting rate of less than 10%.

To unlock this lesson you must be a Member.
Create your account

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use

Become a member and start learning now.
Become a Member  Back
What teachers are saying about
Try it risk-free for 30 days

Earning College Credit

Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Create an account to start this course today
Try it risk-free for 30 days!
Create an account