Variability measures
Measures of central tendency represent the center point of values in a dataset. Measures of variability represent the extent to which a distribution is stretched or squeezed.
The measures of variability give you a fuller picture of the data at hand during the interview. The most popular measures of variability are variance and standard deviation.
In this exercise, you will once again work with the cats
dataset from the MASS
package. The dataset has been preloaded for you as cats
.
The dataset contains information on the sex, heart weight, and body weight of domestic cats. The value "F"
in the Sex
column indicates a female cat, and the value "M"
indicates a male cat.
This exercise is part of the course
Practicing Statistics Interview Questions in R
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Subset female cats
___ <- subset(___, Sex == ___)
# Compute the variance of Bwt for females
___(___)