Retired course
This course has been retired and is no longer supported.
About this lesson
The One-Sample and Two-Sample Test of Proportions are used with discrete data. These tests determine whether the percentage of a particular attribute being studied is similar to or different from the selected target value. These tests are illustrated using both Excel and Minitab.
Exercise files
Download this lesson’s related exercise files.
Test of Proportions.xlsx11 KB Test of Proportions - Solution.docx
222.5 KB
Quick reference
Test of Proportions
The Test of Proportions is for data sets with discrete data. The tests compare the percentage of a particular attribute found in the data against either a known target or the percentage of that attribute in another data set.
When to use
Use the Test of Proportions with discrete data, such as yes/no, true/false, or on/off. It is often used to determine if two data sets are different; either to discover an underlying root cause or as a before after test during the improve phase.
Instructions
The Test of Proportions is a simple test to determine if the percentage of an attribute in a data set is statistically different from a target percentage or from another data set. It is used both when determining cause and effect relationships and for determining the benefit of a solution implementation during the improve phase.
The One-Sample Test of Proportions tests the data set percentage against a known or target percentage. The Two-Sample Test of Proportions tests the percentages of each sample against each other.
Excel:
- Excel cannot perform the One-Sample Test of Proportions
- Excel requires several steps to perform the Two-Sample Test of Proportions.
- Ensure your discrete data is converted to integers – on=1, off=0
- Use the VAR function to find the variance for each of the data sets
- In the Data Analysis Menu, use the Z Test: Two Samples for Means function.
- Enter the data ranges and the variance values.
- Excel will calculate both a one-sided tail and two-sided tail P Value. The one-sided tail is for the Hypothesis test of greater than or less than. The two-side test is for the Hypothesis test of equal to or not equal to.
Minitab:
- Minitab calculates the One-Sample Test of Proportions
- Stat > Basic Statistics > 1 Proportion
- Enter the column with your data and enter your target percentage.
- Click on the Hypothesis test box
- Select the Option button to change the Alternative Hypothesis to a greater than or less then condition.
- Minitab calculates the Two-Sample
- Stat > Basic Statistics > 2 Proportion
- Select the format of your data (all data in one column or in two columns)
- Select your data columns
- Select the Option button to change the Alternative Hypothesis to a greater than or less than condition.
Hints & tips
- Minitab and Excel calculate slightly different P Values – but the difference is very small.
- The data values must be in integer format for Excel, but the data can still be text data in Minitab.
- The difference between one-sided tail and two-sided tail is based upon the Bell-shaped Curve. When the Hypothesis test is “equal to” or “not equal to” the test must consider both the upper portion of the curve and the lower portion of the curve. When the Hypothesis test is “greater than” or “less than,” only one side of the Bell-shaped curve must be checked.
- 00:05 Hi, I'm Ray Sheen.
- 00:06 You know, we've discussed hypothesis testing when
- 00:09 both the response variable and the independent variable are continuous.
- 00:12 Now it's time to look at the case when both are discreet,
- 00:15 and we'll start with a look at the test of proportions.
- 00:20 So let's look at our hypothesis testing decision tree.
- 00:24 We're still working with normal data, but
- 00:26 now we're considering the case when the data is discreet, both x and y values.
- 00:31 That means that we're working with counts instead of measurements.
- 00:34 And in this lesson we'll discuss one sample test of proportion and
- 00:38 the two sample test of proportions.
- 00:41 Before we go into how to run the test,
- 00:43 let's first explain what a test of proportions does.
- 00:47 Test of proportions is used with discrete or attribute data, so
- 00:50 the data will be counts of occurrences or true, false and on, off types of data.
- 00:56 The tests proportions will compare the percentage of items in the sample that
- 00:59 contain a particular attribute to another percentage, either from another sample or
- 01:04 from a baseline value.
- 01:05 The question is to determine if the proportion or percentage are the same, or
- 01:10 more precisely, if there are differences in the proportion, and
- 01:14 are the differences statistically significant?
- 01:16 This test is not testing means or standard deviation,
- 01:20 it is testing the percentage of counts in the category of interest.
- 01:24 The one sample test will compare the proportion to a target value.
- 01:27 It has been set based upon historic measurements or
- 01:30 the known value of another large population.
- 01:33 The null hypothesis will be that the sample proportion equals the target value,
- 01:37 nothing unusual is in the sample.
- 01:40 The alternative hypothesis will normally be that the sample proportion value
- 01:44 is larger or smaller than the target value.
- 01:47 The two Sample Test of Proportion does a similar comparison, except that the target
- 01:51 value is replaced with the proportional value found in a second data sample.
- 01:56 This test is normally used to determine if two samples are different or
- 01:59 are they from the same population.
- 02:01 It's very common to use this test with complaint or defect data and a before and
- 02:05 after comparison.
- 02:07 The two samples being before an improvement is introduced and
- 02:10 after an improvement is introduced.
- 02:12 The null hypothesis is always at the proportion of the two samples are equal,
- 02:16 which means that the subtracting one from the other results in 0.
- 02:20 The alternative hypothesis is that the proportions are not equal.
- 02:23 These set hypothesis are used in the analysis phase
- 02:26 to discover the differences that will lead to an understanding of the problem.
- 02:30 In doing the before and after type of comparison that is normally done in
- 02:33 the improve phase, we often want to show that the improve proportion is higher or
- 02:39 lower proportion than the original proportion.
- 02:41 In that case, the Null Hypothesis is normally that the two proportions
- 02:45 are equal, and the alternative hypothesis is that the new proportion is higher
- 02:49 than or lower than the base line proportion, and of course
- 02:53 the test is to determine if those differences are statistically significant.
- 02:57 Let's consider how we do the one sample test of proportions.
- 03:01 For our example, we'll consider the percentage of applications to college for
- 03:05 the current college year that have been accepted.
- 03:07 Historically the college has excepted 52% of applicants.
- 03:11 This year it was 57%.
- 03:12 Is the change significant?
- 03:15 The null hypothesis would be that this year's
- 03:17 percentage of applicants that were accepted is equal to the historic average.
- 03:22 The alternative hypothesis would be that this year's percentage
- 03:24 is higher than the historical average.
- 03:27 Excel does not perform this test, but in Minitab we select the stat pull down menu,
- 03:33 then select the Basic Statistics, and next select 1 Proportion.
- 03:38 That will bring up this panel.
- 03:39 Now select the column where your data's located.
- 03:42 We need to have a raw data so that Minitab has account on this sample size.
- 03:47 Recall that the sample size will impact the confidence interval.
- 03:51 Enter your target statistic in the window labelled hypothesis proportion.
- 03:55 If you select the option button, you can designate whether you want to test for
- 03:59 the relationship of either greater than or less than.
- 04:02 Then click okay, and the results will be found in the session window of Minitab,
- 04:06 with a P value that you can use to decide whether to reject the null hypothesis or
- 04:11 fail to reject the null hypothesis.
- 04:13 Now let's look at the two sample test of proportions.
- 04:16 We're comparing the proportions of an attribute between two samples of data.
- 04:20 In this illustration, the comparison is on the rate of on time
- 04:24 submittals of tax returns between 2016 and 2017.
- 04:28 Excel dos not provide this as a standalone function,
- 04:31 but we could still do this analysis on Excel, it just takes a few steps.
- 04:36 So there are several functions of Excel that,
- 04:37 when we string them together, can do the analysis.
- 04:41 One caution, make sure your data is in integer form,
- 04:44 because Excel will be doing calculations with it.
- 04:47 Start with the standard VAR or variance function for each data set.
- 04:51 Be sure to record those values for future use.
- 04:54 Next, go to the Data Analysis pull-down menu and select the z-test,
- 04:59 two samples for mean function and to the data range and
- 05:04 the previously calculated variances for each sample in the form that is displayed.
- 05:09 Also enter any difference that there's one you're expecting.
- 05:12 I normally set this one to zero.
- 05:14 Excel will give you a p value for both the greater than and
- 05:17 less than relationships Minitab is simpler.
- 05:21 Select Stat, then Basic Stats and then 2 proportion.
- 05:25 Select the format of your data, either all data in one column within the adjacent
- 05:30 column that specified which sample is associated with the data value, or
- 05:34 the data in two different columns where the sample is the column title.
- 05:39 Then select the appropriate data column and finally go to option button to change
- 05:42 the confidence level or to specify relationship.
- 05:46 The default is to check that they're equal, but
- 05:48 you can change that to make one greater than or less than the other.
- 05:51 The result is found in the session window with an associated p value.
- 05:55 Excel and Minitab will give slightly different results for p values.
- 05:59 But I find the differences are out of the third significant digit and are unlikely
- 06:03 to impact the decision of whether or not to reject the null hypothesis.
- 06:09 The one sample and two sample test of proportions are quick and easy tests that
- 06:13 help us understand the characteristics of a dataset made up of discreet data.
Lesson notes are only available for subscribers.
PMI, PMP, CAPM and PMBOK are registered marks of the Project Management Institute, Inc.