Introduction to MINITAB in the Saint Mary's Microcomputer Lab

XII. Inference on the difference between two proportions

Hypothesis tests and Confidence Interval calculations are carried out with the same command. Minitab will not check whether the conditions for using the test are met but will simply carry out the calculations. Checking appropriatness is your job.

Minitab will perform tests or calculate confidence intervals for proportions either from Summarized data (you enter the sample size/number of trials and the number of successes for each sample) or from raw data (Data in columns of 1's - each representing a success - and 0's - each representing a failure).

Procedure

To calculate a confidence interval for the difference betweeen two proportions or to carry out a significance test on a dfference between two proportions. Some steps will vary, depending on how you enter the data.

1. Select Stat>Basic Statistics>2Proportions
2. Locate the data:
If the data are all in one column of 1's (successes) and 0's (failures) with another column ("subscripts") identifying which population each comes from then click on the "Samples in one column" button, select the column containing the data (successes & failures) for the "Samples" box and the column containing the identifiers (subscripts) for the "Subscripts" box.
If the data are in two columns of 1's & 0's (one column for each sample) then click on the "Samples in different columns" button and enter the column for your first sample in the "First" box, column for your second column in the "Second" box. Remember the order - it will affect how you read your results. Naming the columns will help, here.
If you will enter summary data (sample size and number of successes) for each sample click on the "Summarized data" button, and enter the number of trials (sample size - n) and number of successes for each sample in the boxes. Remember the order - it will affect how you set up tests and how you read results.
3. Click on the "Options" button (so you can set the confidence level and/or set up the null and alternative hypothesis.)
4. If you want a confidence interval estimate for the difference in the proportions, enter the confidence level (as a percent - 95% as "95", not ".95") in the "Level" box and be sure the "Alternative" is set to "not equal"
If you want to perform a test, set the alternative hypothesis ("less than", "greater than", or "not equal") in the "Alternative" box. If you want to test for a specific difference K (rather than simply on proportion is greater than, less than, different from the other) you can enter this value K (as a proportion - difference of 5 percentage points would be .05, not 5) in the "Test difference" box (usually you will leave this as 0 - the null hypothesis "p1-p2 = 0" is the same as "p1=p2").Be sure the direction of your test says what you want with the order of your samples.
5. Click "OK" for the "Options" window and "OK" for the "2proportions" window.

Output in the Session window. Form depends on how the data were entered:

A. For data entered in two columns (of 0's & 1's) the program will show:

A heading "Test and CI for two proportions: [first sample],[second sample]"
A line "Success = 1" to remind you how "success" was indicated.
A table with data on the two samples (labeled at the top):
For each sample:
Variable (column number, if you didn't name them), number of successes (X) number of trials (N) and sample p (p-hat).
A line "Estimate of p(first sample) - p(second sample): [value of p-hat[first] - p-hat [second] ]
A confidence interval (if alternative was "not equal") - "C% confidence interval for p(first) - p(second)": ([lower bound],[upper bound]) or or cutoff (one-sided confidence interval) (if alternative was "less than" or "greater than")"C% upper [or lower] bound for p(first) - p(second)":[cutoff for one-sided confidence interval]
A text line "Test for p(first) - p(second) = 0 [or K, if you entered a K value] (vs [alternative]): Z = [z-value of test], P-Value = [p-value]"

B. If two-proportion data were entered in summary form the program will show:

A heading "Test and CI for two proportions"
Atable repeating the data entered, plus the sample proportions:
For each sample:
Sample number (1 or 2) number of successes (X) number of trials (N) and sample p (p-hat).
A line "Estimate of p(1) - p(2): [value of p-hat[first] - p-hat [second] ]
A confidence interval (if alternative was "not equal") - "C% confidence interval for p(1) - p(2)": ([lower bound],[upper bound]) or or cutoff (one-sided confidence interval) (if alternative was "less than" or "greater than")"C% upper [or lower] bound for p(1) - p(2)":[cutoff for one-sided confidence interval]
A text line "Test for p(1) - p(2) = 0 [or K, if you entered a K value] (vs [alternative]): Z = [z-value of test], P-Value = [p-value]"

C. For data entered in one column, with an indicator variable (subscript) in another column the program will show:

A heading "Test and CI for two proportions:[sample column], [subscript column]"
A line "Success = 1" to remind you how "success" was indicated.
A table with data on the two samples (labeled at the top):
For each sample:
Value of the subscript that identifies the sample [Note smaller subscript value will give the "first" sample], number of successes (X) number of trials (N) and sample p (p-hat).
A line "Estimate of p(subscript for first sample) - p(subscript for second sample): [value of p-hat[first] - p-hat [second] ]
A confidence interval (if alternative was "not equal") - "C% confidence interval for p(first subscript) - p(second subscript)": ([lower bound],[upper bound]) or or cutoff (one-sided confidence interval) (if alternative was "less than" or "greater than")"C% upper [or lower] bound for p(first subscript) - p(second subscript)":[cutoff for one-sided confidence interval]
A text line "Test for p(first subscript) - p(second subscript) = 0 [or K, if you entered a K value] (vs [alternative]): Z = [z-value of test], P-Value = [p-value]"

The printout does not give a yes or no answer for the test - you must determine that, based on the p-value and your decision criteria.

BACK TO INDEX

Last update 11/27/2000

Maintained by cpeltier@saintmarys.edu