An R Introduction to Statistics

Point Estimate of Population Mean

For any particular random sample, we can always compute its sample mean. Although most often it is not the actual population mean, it does serve as a good point estimate. For example, in the data set survey, the survey is performed on a sample of the student population. We can compute the sample mean and use it as an estimate of the corresponding population parameter.


Find a point estimate of mean university student height with the sample data from survey.


For convenience, we begin with saving the survey data of student heights in a variable height.survey.

> library(MASS)                  # load the MASS package 
> height.survey = survey$Height

It turns out not all students have answered the question, and we must filter out the missing values. Hence we apply the mean function with the "na.rm" argument as TRUE.

> mean(height.survey, na.rm=TRUE)  # skip missing values 
[1] 172.38


A point estimate of the mean student height is 172.38 centimeters.