T-test for significant difference between two sets of percentages I have been asked to compare two percentages of pass rates for a national exam using a t-test to see if there is a significant difference. The data is such:
% pass for test takers in a program vs. % pass for all test takers in the country.
I have sample size for the program, but not for the country.
How would I set up this data and run a t-test? Is there a better test?
My proficiency is in SPSS.
 A: Since you don't have data for the national passing rate, only a supposedly known value, that would be treated as fixed, and a one-sample test would be used. You'd be comparing the one sample you have to the "known" population value. Since percent passing is based on a yes-no binary state of affairs, a one-sample proportions test would generally be the preferred option. The binomial test is the common name for the test.
Starting with just the counts of passes and failures and the population percentage or proportion to compare against, the easiest thing to do is to create a small data set with two variables and two cases. The test variable might be called Pass and have a value of 1 indicating passing and 0 indicating failure. The other variable might be called Count and would contain the numbers of people who passed and failed. After entering those two variables, you would specify Data>Weight Cases, and specifying weighting by the Count variable. This form of aggregated data entry simplifies entering of count data, but if you already have a data set with a 0-1 or other binary representation of passing vs. failure for individual cases, you can use that instead.
To run the binomial test, the available options depend on what version of SPSS you have. If it's earlier than the current 27.0.1, use Analyze>Nonparametric Tests>One-Sample. You specify the binary Pass variable as the test variable on the Fields tab. Click on the Settings tab, click Customize tests, check the first check box, and click on the Options button. In the resulting dialog, enter the population proportion against which to test your group's proportion, and make sure that the settings below will result in the correct category being modeled as a success for your data. You can also obtain confidence intervals for the population proportion represented by your observed grouup.
If you have Version 27.0.1, you also have the option of clicking on Analyze>Compare Means>One-Sample Proportions. This interface is specific to the one-sample proportion situation, so it's more straightforward. You can also get confidence intervals here, and there are different test options, including the same exact binomial or asymptotic Z tests available with Nonparametric Tests, plus additional options.
