Centrality measures
The primary purpose of descriptive statistics is to provide a summary of the data. Descriptive statistics might prove useful if you need to quickly get a grasp of the data at hand during the interview.
The most recognized types of descriptive statistics are measures of central tendency, also known as centrality measures.
In this exercise, you will work with the cats
dataset from the MASS
package.
The cats
dataset contains the following variables:
Sex
- sex,Bwt
- body weight, andHwt
- heart weight
of domestic cats.
By calculating central tendency measures, you'll be able to answer questions about the skewness of the data.
Recall the relationship between the mean and the median in skewed distributions:
The dataset has been preloaded as cats
.
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.
# Compute the average of Hwt
___(cats$Hwt)
# Compute the median of Hwt
___(___)