1.3.6 · D3Probability & Statistics

Worked examples — Probability mass and density functions

1,986 words9 min readBack to topic

Before we start, three plain-word reminders so no symbol sneaks in undefined:


The scenario matrix

Every problem this topic can throw at you falls into one of these cells. The right column names the example that kills it.

# Case class What makes it tricky Killed by
A Discrete, finite, uniform just count Ex 1
B Discrete, non-uniform (weighted) outcomes have different weights Ex 2
C Discrete, find missing mass so normalization on a PMF Ex 3
D Continuous, find the constant normalization on a PDF Ex 4
E Continuous, probability of an interval integrate the density Ex 5
F Degenerate: single point of a continuous variable Ex 5 (part b)
G Continuous, go PDF ↔ CDF differentiate / integrate Ex 6
H Limiting behaviour: tail probability, improper integral Ex 7
I Density that exceeds 1 density ≠ probability Ex 8
J Real-world word problem translate words → math Ex 9
K Exam twist: mixed / piecewise glue two pieces, check continuity Ex 10
Figure — Probability mass and density functions

Discrete cases (PMF)


Continuous cases (PDF)

Figure — Probability mass and density functions
Figure — Probability mass and density functions

Word problem & exam twist

Figure — Probability mass and density functions

Recall

Recall One-line trap: density vs probability

Can a valid PDF have ? ::: Yes — density can exceed 1; only its area is capped at 1 (Ex 8).

Recall Degenerate continuous case

For continuous , what is ? ::: Exactly — zero width means zero area (Ex 5b).

Recall Which rule normalizes?

PMF vs PDF total-probability condition? ::: (discrete) vs (continuous).

Connections. Normalizing constants here reappear when you fit models by 1.4.02-Maximum-likelihood-estimation; the discrete PMF over classes is exactly what 2.1.05-Softmax-activation produces; the Gaussian density underlies 3.2.04-Gaussian-processes. Expected values built from these functions live in 1.3.08-Expected-value-and-variance, and the underlying objects in 1.3.01-Random-variables-and-distributions.