Median (2-Quantile)
  • is a type of Central Tendency
  • is a type of p-quantile i.e.:
  • is the middle value of a distribution, separating it into 2 equal areas
  • the median of a random variable 𝑋 is a value 𝑚 such that:

Median - Population vs Sample

  • population median (𝑀) is a number that is exceeded with a probability no greater than 0.5 and is preceded with a probability no greater than 0.5
  • sample median (𝑀̅) is a number that is exceeded by at most a half of observations and is preceded by at most a half of observations

Computing Median

continuous

  • 𝑀 = 𝐶𝐷𝐹-1(0.5)

discrete, 2 cases:

  • interval of roots - often the middle of this interval is reported as the median
  • no roots - smallest 𝑥 with 𝐶𝐷𝐹(𝑥) ≥ 0.5 is the median

Example Computation

Continuous Case

exponential distribution

  • 𝐶𝐷𝐹(𝑥) = 1 - 𝑒𝜆𝑥 for 𝑥 > 0
  • 𝐶𝐷𝐹-1(𝑥) = 𝑙𝑛(1/(1 - 𝑥)) / 𝜆
  • 𝐶𝐷𝐹-1(0.5) = 𝑙𝑛(1/(1 - 0.5)) / 𝜆
  • 𝐶𝐷𝐹-1(0.5) = 𝑙𝑛(2) / 𝜆
  • 𝑀 = 𝑙𝑛(2) / 𝜆
Discrete Case

binomial distribution

𝐶𝐷𝐹(𝑛, 𝑝, 𝑥) = 𝛴0≤𝑖≤𝑥[(𝑛 Choose 𝑖)𝑝𝑖(1-𝑝)𝑛-𝑖]

two cases for binomial distribution