Point Estimate of Population Proportion
Multiple choice questionnaires in a survey are often used to determine the the proportion of a population with certain characteristic. For example, we can estimate the proportion of female students in the university based on the result in the sample data set survey.
Find a point estimate of the female student proportion from survey.
We first filter out missing values in survey$Sex with the na.omit function, and save it in gender.response.
> gender.response = na.omit(survey$Sex)
> n = length(gender.response) # valid responses count
To find out the number of female students, we compare gender.response with the factor ’Female’, and compute the sum. Dividing it by n gives the female student proportion in the sample survey.
The point estimate of the female student proportion in survey is 50%.