1.3.6 · D1Probability & Statistics

Foundations — Probability mass and density functions

2,620 words12 min readBack to topic

Before you can read the parent note, you must own every symbol it throws at you. We go one symbol at a time. Nothing is used before it is drawn — so on this page the symbols , , , , and appear only after their own section builds them, never before.


0. The starting picture: an experiment

Picture a bag. Every marble in the bag is one outcome . The whole bag is .

Figure — Probability mass and density functions

Why do we need this? Because "probability" is meaningless until we agree on the full list of things that could happen. is that list.

  • Coin flip: — two marbles.
  • One die: — six marbles.
  • A height in cm: every real number in some range — infinitely many marbles, packed with no gaps. Hold that thought; it is the whole PMF-vs-PDF split.

1. Probability — the "how likely" score

The dot in is a placeholder — you drop an outcome or an event into the parentheses.

Picture a slider running from (impossible, far left) to (guaranteed, far right). Every event's probability is a mark on that slider.

Rule 2 is the seed of two facts you will meet later: once we have the "add-them-all-up" symbol (Section 6) it becomes the PMF's total-equals-one law, and once we have the "area" symbol (Section 7) it becomes the PDF's total-area-equals-one law. We are not allowed to write those two equations yet — their symbols are not built. We only plant the idea here: everything together weighs 1.


2. Event, and "disjoint" — why probabilities add

Picture two circles drawn inside the bag that do not overlap.

Why does the parent note keep combining probabilities of separate outcomes? Because separate outcomes are automatically disjoint, so their scores just add up. This single fact powers the dice example (), and its infinite version is what makes the running total over all values behave.


3. Random variable — turning outcomes into numbers

Read as: "outcome is labelled with the number ."

Figure — Probability mass and density functions

Why bother? Because math works on numbers, not on the word "Heads". is the translator: "Heads" , "Tails" . Notice in the figure that two different outcomes can land on the same number — that is exactly why probabilities get combined onto a value.

See 1.3.01-Random-variables-and-distributions for the full story of .


4. The subscript and the two functions: and

Now that these names exist, we are allowed to use them from here on. Mnemonic below to keep the letters straight.


5. Discrete vs continuous — the picture that splits the topic

Figure — Probability mass and density functions

This is the heart of the whole parent topic. Discrete adds up bar areas; continuous measures areas under a curve. The next two sections build the exact symbols for each.


6. Summation — "add these all up"

Now we can finally state Rule 2 of Section 1 in discrete costume: all the masses add to one, Picture stacking the unit-width bars from the discrete panel; when their areas all pile up they total exactly . (This is also where countable additivity from Section 2 earns its keep: the list of values may be infinite, and the infinite sum still lands on .)


7. Integral — "add up infinitely many slivers" (area)

We need because continuous outcomes cannot be listed one-by-one; there are too many, packed with no gaps. can't run over them. So we ask a different but analogous question: what is the area?

Figure — Probability mass and density functions

Look at the figure: we chop the interval into thin rectangles of width . Each rectangle's area is a little chunk of probability. As shrinks to zero the jagged tops smooth into the curve, and the sum of rectangle areas becomes the exact area .

Now Rule 2 in continuous costume finally has all its symbols: the total area is one,


8. The limit and

Picture the rectangles in the last figure getting thinner and thinner until their staircase top hugs the curve perfectly. The limit is that perfect-hug value. This is why the parent's discrete-to-continuous derivation says .


9. The CDF and the derivative

The parent uses . That needs two new pieces: the function and the derivative.

Picture walking along a hill: the derivative is how steep the ground is under your feet.


10. and — the decay/bell-curve engine

Picture a quantity that keeps shrinking by the same fraction every step — hot coffee cooling, a battery draining. The parent's exponential PDF and the Gaussian's both ride on this shape: common values are near the peak, extremes fade away exponentially fast.

The Greek letters that ride along: ("lambda") = a rate (arrivals per second); ("mu") = the centre/mean; ("sigma") = the spread; = variance. Their full meaning lives in 1.3.08-Expected-value-and-variance and 1.3.09-Common-probability-distributions.


Prerequisite map

Outcome and sample space

Probability P

Events and disjoint

Countable additivity

Random variable X

PMF sum p equals 1

Integral as area

PDF integral f equals 1

Derivative slope

CDF running total

CDF and density link

Exponential e

Exponential and Gaussian PDF

PMF and PDF topic 1.3.6

Each arrow means "you must own the left box before the right box makes sense." Follow them top to bottom and you arrive at the parent topic fully equipped. Downstream, these feed 1.4.02-Maximum-likelihood-estimation, 2.1.05-Softmax-activation, and 3.2.04-Gaussian-processes.


Equipment checklist

Cover the right side; can you answer before revealing?

What is in plain words?
The sample space — the bag of all possible outcomes of the experiment.
What does return and what are its two rules?
A number in ; rule 1: ; rule 2: over the whole sample space it totals .
What is countable additivity?
For any list of disjoint events — even infinitely many — the probability of "any of them" equals the sum of their individual probabilities.
What is a random variable ?
A function attaching a real number to each outcome, .
Difference between capital and little ?
is the whole random rule; is one specific value it may output.
When do you use (PMF) vs (PDF)?
for discrete (isolated values, real probabilities); for continuous (packed values, a density).
Are all variables strictly discrete or continuous?
No — mixed variables exist (e.g. a probability lump at plus a smooth density elsewhere); the clean two-box split is the starting map, not the whole territory.
In the discrete bar picture, why does bar height equal the probability?
Only because the bars are drawn with width ; strictly it is the bar's area (height × width) that is the probability mass.
Why is for a continuous variable?
A single point has zero width, so zero area under the PDF.
What does compute, and what must it equal?
The total probability over all discrete values; it must equal .
What does compute?
The area under the density between and , which equals .
Why can a PDF value exceed 1 but a PMF value cannot?
PDF is density (per-unit-length); only its area is a probability, so heights are unrestricted. PMF values are probabilities themselves, capped at .
What is ?
The cumulative distribution function, — the running total of probability up to , rising from to .
What does give and why?
The density — the slope of accumulated probability; steep climb = high density.
What shape does draw?
Exponential decay: starts at , falls fast then flattens toward .