9.1.2.2 - Minitab: Difference Between 2 Independent Proportions
9.1.2.2 - Minitab: Difference Between 2 Independent ProportionsWhen conducting a hypothesis test comparing the proportions of two independent proportions in Minitab two p-values are provided. If \(np \ge 10\) and \(n(1-p) \ge 10\), use the p-value associated with the normal approximation method. If this assumption is not met, use the p-value associated with Fisher's exact method.
Minitab Note!
When conducting a hypothesis test for a difference between two independent proportions in Minitab you need to remember to change the "test method" to "use the pooled estimate of the proportion." This is because the null hypothesis is that the two proportions are equal.
Minitab® – Testing Two Independent Proportions using Raw Data
Let's compare the proportion of females who have tried weed to the proportion of males who have tried weed.
- Open Minitab file: class_survey.mpx
- Select Stat > Basic Statistics > 2 Proportions
- Select Both samples are in one column from the dropdown
- Double click the variable Try Weed in the box on the left to insert the variable into the Samples box
- Double click the variable Biological Sex in the box on the left to insert the variable into the Sample IDs box
- Under the Options tab change the Test method to Use the pooled estimate of the proportion
- Click OK and OK
This should result in the following output:
Method
Event: Try_Weed = Yes
\(p_1\): proportion where Try_Weed = Yes and Biological Sex = Female
\(p_2\): proportion where Try-Weed = Yes and Biological Sex = Male
Difference: \(p_1\)-\(p_2\)
Descriptive Statistics: Try Weed
Biological Sex | N | Event | Sample p |
---|---|---|---|
Female | 127 | 56 | 0.440945 |
Male | 99 | 62 | 0.626263 |
Estimation for Difference
Difference | 95% CI for Difference |
---|---|
-0.185318 | (-0.313920, -0.056716) |
CI based on normal approximation
Test
Null hypothesis | \(H_0\): \(p_1-p_2=0\) |
---|---|
Alternative hypothesis | \(H_1\): \(p_1-p_2\neq0\) |
Method | Z-Value | P-Value |
---|---|---|
Normal approximation | -2.77 | 0.006 |
Fisher's exact | 0.007 |
The test based on the normal approximation uses the pooled estimate of the proportion (0.522124)
Five Step Hypothesis Testing Procedure: Weed Example
Step 1:
\(H_0 : p_f - p_m =0\)
\(H_a : p_f - p_m \neq 0\)
Check assumptions:
\(n_f p_f = 56\)
\(n_f (1-p_f) = 127-56 = 71\)
\(n_m p_m = 62\)
\(n_m (1-p_m) = 99-62 = 37\)
All \(np\) and \(n(1-p)\) are at least ten, therefore we can use the normal approximation method.
Step 2:
From output, \(z=-2.77\)
Step 3:
From output, \(p=0.006\)
Step 4:
\(p \leq \alpha\), reject the null hypothesis
Step 5:
There is convincing evidence that in the population the proportion of females who have tried weed is different from the proportion of males who have tried weed.
Minitab® – Testing Two Independent Proportions using Summarized Data
Let's compare the proportion of Penn State World Campus graduate students who have children to the proportion of Penn State University Park graduate students who have children. In a representative sample there were 120 World Campus graduate students; 92 had children. There were 160 University Park graduate students; 23 had children.
- In Minitab, select Stat > Basic Statistics > 2 Proportions
- Change Both samples are in one column to Summarized data in the dropdown
- For Sample 1 next to Number of events enter 92 and next to Number of trials enter 120
- For Sample 2 next to Number of events enter 23 and next to Number of trials enter 160
- Under the Options tab change the Test method to Use the pooled estimate of the proportion
- Click OK and OK
This should result in the following output:
Method
\(p_1\): proportion where Sample 1 = Event
\(p_2\): proportion where Sample 2 = Event
Difference: \(p_1\)-\(p_2\)
Descriptive Statistics
Sample | N | Event | Sample p |
---|---|---|---|
Sample 1 | 120 | 92 | 0.766667 |
Sample 2 | 160 | 23 | 0.143750 |
Estimation for Difference
Difference | 95% CI for Difference |
---|---|
0.622917 | (0.529740, 0.716093) |
CI based on normal approximation
Test
Null hypothesis | \(H_0\): \(p_1-p_2=0\) |
---|---|
Alternative hypothesis | \(H_1\): \(p_1-p_2\neq0\) |
Method | Z-Value | P-Value |
---|---|---|
Normal approximation | 10.49 | 0.000 |
Fisher's exact | 0.000 |
The test based on the normal approximation uses the pooled estimate of the proportion (0.410714)
Five Step Hypothesis Testing Procedure: Parents
Step 1:
\(H_0 : p_w - p_u =0\)
\(H_a : p_w - p_u \neq 0\)
Check assumptions:
\(n_w p_w = 92\)
\(n_w (1-p_w) = 120-92 = 28\)
\(n_u p_u = 23\)
\(n_u (1-p_u) = 160-23 = 137\)
All \(np\) and \(n(1-p)\) are at least ten, therefore we can use the normal approximation method.
Step 2:
From output, \(z=10.49\)
Step 3:
From output, \(p=0.000\)
Step 4:
\(p \leq \alpha\), reject the null hypothesis
Step 5:
There is convincing evidence that in the population the proportion of World Campus students who have children is different from the proportion of University Park students who have children.
9.1.2.2.1 - Example: Dating
9.1.2.2.1 - Example: DatingExample: Dating
This example uses the course survey dataset:
A random sample of Penn State University Park undergraduate students were asked, "Would you date someone with a great personality even if you did not find them attractive?" Let's compare the proportion of males and females who responded "yes" to determine if there is convincing evidence of a difference.
We are looking for a "difference," so this is a two-tailed test.
\(H_{0} \colon p_1 - p_2 =0\)
\( H_{a} \colon p_1 - p_2 \neq 0 \)
Check assumptions
\(n_f p_f = 367\)
\(n_f (1-p_f) = 571 - 367 = 204\)
\(n_m p_m = 148\)
\(n_m (1 - p_m) = 433 - 148 = 285\)
All of these counts are at least 10 so we will use the normal approximation method.
From output, \(z=9.45\)
Event: DatePerly = Yes |
\(p_1\): proportion where DatePerly = Yes and Gender = Female |
\(p_2\): proportion where DatePerly = Yes and Gender = Male |
Difference: \(p_1-p_2\) |
Gender | N | Event | Sample p |
---|---|---|---|
Female | 571 | 367 | 0.642732 |
Male | 433 | 148 | 0.341801 |
Difference | 95% CI for Difference |
---|---|
0.300931 | (0.241427, 0.360435) |
Null hypothesis | \(H_0\): \(p_1-p_2=0\) |
---|---|
Alternative hypothesis | \(H_1\): \(p_1-p_2\neq0\) |
Method | Z-Value | P-Value |
---|---|---|
Fisher's exact | <0.0001 | |
Normal approximation | 9.45 | <0.0001 |
The pooled estimate of the proportion (0.512948) is used for the tests.
From output, \(p<0.0001\)
\(p \leq \alpha\), reject the null hypothesis
There is convincing evidence that in the population of all Penn State University Park undergraduate students the proportion of men who would date someone with a great personality even if they did not find them attractive is different from the proportion of women who would date someone with a great personality even if they did not find them attractive.