Calculating areas with sample means
So far we have calculated the probabilities of observations using mean and standard deviation values from the population. However, we can also calculate these observation probabilities using mean and standard deviation values from the sample. For instance, we could have a question along the lines of what is the probability that the sample mean of the beard length of 50 Scandinavian hipsters is larger or equal to 26 millimeters. Because in this example we are talking about a specific sample from the population, we make use of the sampling distribution and not the population distribution.
Because we make use of the sampling distribution, we are now using the standard deviation of the sampling distribution which is calculated using the formula \(\sigma / \sqrt{n}\).
This exercise is part of the course
Basic Statistics
Exercise instructions
- Calculate the probability that a sample mean of the beard length of 50 Scandinavian hipsters is larger or equal to 26 millimeters. Recall that the population is contained in the variable
scandinavia_data
. Take all the steps indicated by comments in the editor.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# calculate the population mean
population_mean <- mean(scandinavia_data)
# calculate the population standard deviation
population_sd <- sd(scandinavia_data)
# calculate the standard deviation of the sampling distribution and put it in a variable sampling_sd
# calculate the Z score and put in a variable called z_score
# cumulative probability calculation. Don't forget to set lower.tail to FALSE