Title: Categorical variables: estimating the proportion of a characteristic
Course: UGQuants (SSPS) > Section: Probability

Categorical variables: estimating the proportion of a characteristic

The following printout from SPSS looks at the proportion of the European Social Survey 2010 UK sample who voted in the last national election: we get this through the frequencies command (after excluding people not eligible to vote and people who did not answer the question from the analysis by defining them as missing values).

Table 1 Voted last national elections?

Source: ESS5 (UK) unweighted data

Unfortunately, SPSS does not routinely report the standard error for a proportion. There are two things we can do.

The first is simply to calculate it ourselves using the formula we saw in the previous module and used in the self-test questions. Remember to use proportions (out of one) and not percentages (out of one hundred):

Proportion (p) who voted = 1671/ 2321 = 0.72

SE (p) = √(p*(1-p)) / √n

= √(0.72* (1-0.72)) / √2321

= √0.202 / √2321  = 0.449 / 48.18 = 0.00932

For a confidence interval of 95% we need to include cases within 1.96 standard errors.

So we can be 95% certain that the proportion of smokers in the population will be:

0.72 ± (1.96 * 0.00932)

0.72 ± 0.018

0.702 to 0.738

Or, we could say that between 70.2% and 73.8% of the population eligible to vote actually did vote. (We could check our figures against the official voter turnout statistics, now.)

Alternatively we can get SPSS to produce this for us, although we have to be a little creative and let SPSS think that our proportion is the mean of a continuous variable. While frequencies and crosstabs tell us the proportions (in terms of percentages), they do not provide us with confidence intervals. To obtain these, we can use the descriptives menu and explore command, but first we must alter the values given to our nominal categories so that the category whose proportion we want to estimate takes the value 1 and all other non-missing cases takes the value 0.

Can you see why?

If we re-set the values like this, the mean for our variable of interest will correspond to the proportion of cases taking this value since it will equal the number of cases taking the value one divided by the total number of non-missing cases in the sample.

We change the numerical values of the categories ideally with the help of the ‘transform > recode into different variable’ command. We would keep 1=yes but would change value 2 to value 0=no and define all other values as missing values again.

Here are the results. Ignore the other statistics in the output, as most are meaningless for a non-continuous variable.

Table 2 confidence for the proportion of voters

Source: ESS5 (UK) unweighted data