5

My limited understanding is quantile and quartile are some sort of similar but totally different ways of measurement. I googled but could not find an easy to understand explanation. There is a D3 related question here but no answer yet.

My specific question is when we should use quantile instead of quartile or vice versa? I appreciate for any lay term explanation or trivial example. Thanks!

Community
  • 1
  • 1
ngungo
  • 4,892
  • 4
  • 29
  • 36

2 Answers2

8

The cumulative density function gives you the probability of a random variable being on or below a certain value.

The quantile function is the opposite of that. i.e. you give it a probability and it tells you the random variable value.

So the median is the value of the quantile at the probability value of 0.5.

A quartile is the value of the quantile at the probabilities 0.25, 0.5 and 0.75.

So, in general, you can use the quantile. The quartile is a special case.

Bathsheba
  • 231,907
  • 34
  • 361
  • 483
3

From Wikipedia:

Quantiles are values taken at regular intervals from the inverse of the cumulative distribution function (CDF) of a random variable. Dividing ordered data into q essentially equal-sized data subsets is the motivation for q-quantiles; the quantiles are the data values marking the boundaries between consecutive subsets.

The 4-quantiles are called quartiles.

jxstanford
  • 3,339
  • 3
  • 27
  • 39