3.3 Cummulative Distribution Functions (Discrete)

  • A cummulative distribution function (CDF) is esentially the cummulative sum of a PMF, from , up to a certain value.

  • Definition: Let X be a discrete random variable. The CDF of X is FX(x)=P[Xx]

  • Example:

Let X be a random variable with PMF pX(0)=1/4,pX(1)=1/2,pX(2)=1/4, then, its CDF is:

FX(0)=P(X0)=pX(0)=1/4
FX(1)=P(X1)=pX(0)+pX(1)=3/4
FX(2)=P(X2)=pX(0)+pX(1)+pX(2)=1

states <- c(0, 1, 2)
probs <- c(1/4, 1/2, 1/4) 
plot(
  states, probs, type = 'h', 
  ylim = c(0,1), main = "p_X",
  xlab = "X states", ylab = "States probabilies"
) 

plot(
  states, cumsum(probs), type = 's',
  ylim = c(0,1), main = "F_X",
  xlab = "X states", ylab = "States cummulative probabilies"
)

  • There are technical reasons for why CDFs are easier to work with than PMFs, but, an important one is that the CDF allows us to use mathematical integration.