Courses / Mathematics I
Data Analysis and Probability

Random Variables and Distributions

Mathematics I 230 words Free to read

Random Variables and PMF vs PDF

A random variable turns random outcomes into numbers, letting us do math with chance. It maps qualitative results to quantitative values.

TypeValuesProbability RuleTotal Sum / Area
DiscreteCountable / separateProbability mass function P(X=x)P(X = x)Sum to 1
ContinuousAny value in a rangeProbability density function f(x)f(x) via areasArea is 1

For continuous variables, P(aXb)=abf(x)dxP(a \le X \le b) = \int_a^b f(x)\, dx.

Common pitfall: For a continuous variable, the probability of any single exact value is zero (P(X=c)=0P(X = c) = 0). Probability lives in intervals, not points; a point has zero width and zero area.

Six equal bars for a mass function; one shrinking sliver for a density

Expectation and Variance

Two core numbers summarise a random variable:

Expectation is linear: E[aX+b]=aE[X]+bE[aX + b] = a\,E[X] + b, and E[X+Y]=E[X]+E[Y]E[X + Y] = E[X] + E[Y] for any variables, whether independent or not.

Variance is not linear: Var(aX)=a2Var(X)\operatorname{Var}(aX) = a^2\operatorname{Var}(X). Crucially, variances add (Var(X+Y)=Var(X)+Var(Y)\operatorname{Var}(X + Y) = \operatorname{Var}(X) + \operatorname{Var}(Y)) only for independent variables.

Practise this lesson

The explanation above is free to read. The graded practice for this lesson lives in the Tryals app.

11practice questions
2interactive scenes

Data Analysis and Probability