Link: Data visualization

Quantiles

In general, quantiles are the lines that divide data into equally sized groups.

  • The median (50% quantile or 0.5 quantile): The median is also a quantile because it splits data to 50/50.
  • 25% quantile: It cuts the data and 25% of data points are less than it.
  • 75% quantile: It cuts the data and 75% of data points are less than it.

Percentiles

Percentiles are just quantiles that divide data into 100 equally sized groups. In practice, the term is more flexible.

E.g. Even if the size is less than 100, we can still call the 50% quantile as 50% percentile.

Usage of quantiles and percentiles

Both quantiles and percentiles are not limited in above examples. We can call the data point based on its own group, such as 7% quantile/percentile.

quantile() in R

In R, the quantile() function provides different ways to calculate quantiles. The difference gets smaller when the data set is larger.