Centering & Variation

Two questions we often ask before anything else in data analysis:
  1. Where is your data centered?
  2. How spread out is your data?
Below are some tools with basic measures we use all the time.

Measures of Centering

Some common choice for determining the center of a dataset are mean, median, and mode:
  • Mean -- Average of a dataset's values
  • Median -- Value of datapoint in the "middle"
  • Mode -- Most commonly appearing value in the dataset
For example, the mean, median, and mode of [1, 1, 3, 4, 5] are 2.8, 3, and 1 respectively. This first tool demonstrates all three as a dataset changes. In this case, the dataset is coming from a beta distribution. (If plot doesn't appear, try reloading page!)


Measures of Variation

Once we have a grasp on where a dataset is centered, we can ask how much the dataset spreads out around this center. A couple measures that use the mean as the center are mean absolute deviation \(\left(MAD\right)\), variance \((var)\), and standard deviation \((s)\). If data points \(x_i\) come from dataset with mean \(\bar{x}\), then we can define these three statistics as follows: $$ \begin{align*} MAD(x)&=\frac{\sum\limits_{i=1}^n|x_i-\bar{x}|}{n}\\ var(x)&=\frac{\sum\limits_{i=1}^n(x_i-\bar{x} )^2}{n-1}\\ s(x)&=\sqrt{var(x)} \end{align*} $$ All measure spread around the center, \(\bar{x}\), in different ways. To see these quantities in action, here is the normal distribution with mean 0: