Discrete vs Continuous Variables

The two kinds of random variable need different machinery, and the difference is sharper than it first appears.

Discrete: probability sits at points

A probability mass function gives the probability of each value:

A probability mass function
p(x)=P(X=x),xp(x)=1p(x) = P(X = x), \qquad \sum_x p(x) = 1

Every value carries a real probability and they sum to one. Densities do not behave this way.

Each p(x)p(x) is a genuine probability, so it lies between 0 and 1, and the values sum to 1. Expectation and variance are sums:

E[X]=xxp(x)Var(X)=x(xμ)2p(x)E[X] = \sum_x x\,p(x) \qquad \text{Var}(X) = \sum_x (x - \mu)^2 p(x)

Continuous: probability sits in intervals

Here the probability of any single value is zero. Not negligible, exactly zero. There are uncountably many possible values, so no individual one can carry positive mass without the total exceeding 1.

The rest of this lesson is for subscribers

Unlock every lesson in Fundamentals of Probability and Statistics, and every other premium course.

Subscribe to continue

Test your knowledge

Questions are only available to subscribers.

Keep reading Fundamentals of Probability and Statistics

41 lessons in this course, and every other premium course, on one subscription.

  • Every lesson in every course, with the worked examples and interactive simulators
  • Graded questions on every lesson, with explanations for the wrong answers as well as the right one
  • The trainers, timed assessments and brainteaser library that go with them