Distribution modeling

Random Variables and Distributions

Model uncertain outcomes with discrete or continuous random variables, read probability distributions, and compute expected value and variance for interpretation.

How this page is maintained

Written for learners, checked against the sources below, and reviewed every year. Last reviewed July 22, 2026.

Short answer

A random variable assigns numbers to outcomes of a random process. Its distribution tells how probabilities are allocated across values. For discrete variables use a probability mass function, and for continuous variables use a density where areas represent probabilities.

  • Expected value is a long-run weighted average, not necessarily an observed outcome.
  • For continuous variables, probability at one exact point is 0.
  • Choose a model family that fits data generation assumptions.

Discrete and continuous variables

Discrete random variables take countable values, such as number of late arrivals in a day. Their probabilities sum directly across values.

Continuous variables, such as time or height, are modeled with a density curve. Probabilities are areas under the curve across intervals.

Mean and variance of a random variable

For a discrete variable X, expected value is E(X)=sum[x*p(x)]. Variance is Var(X)=E((X-mu)^2), often computed as E(X^2)-mu^2.

These quantities summarize long-run location and variability of the process, and they support later inference methods such as the CLT.

  • Check that discrete probabilities are nonnegative and sum to 1.
  • For normal models, use mean and standard deviation to set interval probabilities.
  • Do not interpret density height itself as probability.

Expected value of support calls per hour

X is number of support calls in one hour with probabilities: P(0)=0.2, P(1)=0.4, P(2)=0.3, P(3)=0.1.

  1. Confirm probabilities sum to 1: 0.2+0.4+0.3+0.1 = 1.0.
  2. Compute expected value: E(X)=0*0.2+1*0.4+2*0.3+3*0.1.
  3. Evaluate E(X)=0+0.4+0.6+0.3=1.3.
  4. Interpret as long-run average calls per hour, not an exact hourly prediction.
Result: The expected number of calls is 1.3 per hour.

Common mistakes

  • Treating expected value as the most likely single outcome.
  • Using a continuous model for coarse count data without justification.
  • Forgetting that continuous point probability is zero.
  • Using probabilities that do not sum to 1.

Try one

If X is continuous, what is P(X=5) exactly?

0. For continuous variables, probabilities apply to intervals, not exact points.

Sources

Learn this with a tutor

Tell LearnLive what you already know and what you need to do with random variables.

Build this course