ContentsThe library

Chance, Spread and What to Expect

A List, and a Number on Each Item

A distribution is nothing more than a list of the things that could happen with a weight on each, and the two rules the weights obey decide everything that follows.

Start with something that is going to happen but has not happened yet. A coin

about to be flipped, a word about to be generated, a request about to arrive at a

server. The first thing to write down is not a probability at all. It is a list

of the things that could happen.

That list has to satisfy two conditions, and almost every muddle in the subject

is a failure of one of them. It has to be complete: when the thing happens, what

happened must be on the list. And its items must not overlap: exactly one of them

can be what happened, not two at once. A list of the possible outcomes of a coin

flip is heads and tails. A list consisting of heads, tails, and an outcome

described as a high flip is not a list at all, because two of those can be true

together.

Only once there is a list do the numbers go on it.

FIG 1A distribution over four outcomes
Four outcomes, one of which will happen, with a weight on each. The picture is the whole of what a distribution is. Notice that nothing requires the weights to be similar in size, and that the interesting outcomes here are the small ones, which is usual.
FIG 2The two rules, and there are no others
an index running over the items of the list
the weight attached to the i-th outcome
how many outcomes the list has
add up what follows, over every item of the list
A list of numbers satisfying both lines is a distribution, and any list satisfying both lines is one. There is no further requirement. In particular nothing says the weights must be equal, nothing says they must change smoothly from one item to the next, and nothing says any of them must be small.

The second rule is doing more work than it looks. It says the list is complete,

in the language of the numbers rather than the language of the list: if the

weights add to less than one then something that could happen has been left off,

and if they add to more than one then something is being counted twice. Whenever

a set of weights refuses to add to one, the fault is almost always in the list

rather than in the arithmetic.

Events, which are just groups

Rarely is the question about a single outcome. It is about a group of them: will

the request fail in any way at all, will the generated word be a noun, will the

reward be positive. A group of outcomes taken together is called an event, and

its probability is the sum of the weights of the outcomes in it.

FIG 3The probability of a group
add the weight of every outcome that belongs to the group
the probability of everything outside the group
which is one minus the group's own probability, since the whole list sums to one
The second expression is the most useful line in elementary probability. Questions phrased as at least one of are usually much easier to answer by finding the weight of none of them and subtracting, because the group being left out is often a single outcome.

On the four outcome list above, the event that the request did not plainly

succeed is the last three items, with total weight six hundredths. Reading it the

other way, as one minus the weight of the first item, gives the same answer with

less arithmetic, and that shortcut gets more valuable the longer the list is.

FIG 4Which of these are distributions
firstsecondthirdlegal
a legal one0.20.30.51.0
sums to nine tenths0.20.30.40.0
has a negative weight0.70.5-0.20.0
all the weight on one ou0.00.01.01.0
The last column is one when the two rules hold and zero when they do not. The marked row is worth a second look: putting the whole weight on a single outcome is a perfectly legal distribution, describing something certain. Certainty is not the opposite of probability, it is a special case of it.

Where the numbers come from

This is the part that textbooks hurry past and that matters most in practice.

There are exactly two ways to obtain a set of weights.

The first is to count. Run the thing many times, count how often each outcome

occurred, and divide by the number of runs. This is what a measured failure rate

is, what a word frequency is, and what nearly every number in a machine learning

system ultimately rests on. It requires that the thing has happened many times

already, and it requires a willingness to say that those past occasions and the

future one are the same kind of event, which is a judgement and not a

calculation.

The second is to assume. Nobody has flipped this particular coin ten thousand

times. The weight of a half comes from a claim about the symmetry of the coin

itself. This is faster, applies to things that have never happened, and is only

as good as the claim behind it.

FIG 5How much a counted weight can be trusted
a counted weight here is barely better than a guessuseful, and the uncertainty shrinks slowly20004000600080000nothing counted, the weight is pure assumption100about one tenth of the weight, either way10000about one hundredth of the weightnumber of past occasions counted
Rough magnitudes for a weight near a half; the exact rule is derived in the last lesson of this course. The shape is the point: the uncertainty falls with the square root of the count, so a hundredfold increase in effort buys a tenfold improvement. Counting is reliable and expensive.

Neither source is more respectable than the other, but they fail differently. A

counted weight fails when the conditions change, so that the past occasions were

not the same kind of event as the future one. An assumed weight fails when the

assumption is simply wrong. The error worth naming is treating an assumption as

though it had been counted, which is what happens whenever a number arrived at by

reasoning is later quoted as though it had been measured.

Equal weights is a claim

The most common assumption is that every outcome on the list gets the same

weight. It feels like refusing to assume anything, a kind of neutrality, and it

is nothing of the sort.

The reason is that it depends completely on how the list was cut up. Consider a

part that either works or fails. Two outcomes, so equal weights give a half each.

Now notice that failure comes in two kinds, a clean stop and a silent corruption,

and write the list with three items instead. Equal weights now give a third to

working and two thirds to failing. The situation has not changed at all. Only the

list has, and the supposedly neutral assumption has moved the weight on failure

from a half to two thirds.

So equal weights is a definite claim, and it is a claim about the list as much as

about the world. It is a good claim when the items of the list are genuinely

interchangeable, as the faces of a well made die are. It is a bad claim whenever

the list was written by someone thinking about the problem, because the way a

person chops a situation into cases carries their sense of what matters, and the

uniform distribution then quietly encodes that sense as though it were knowledge.

What survives all of this is small and solid. A list. A weight on each item, not

negative, adding to one. Groups of items, whose weight is a sum. That is the

entire apparatus, and every remaining lesson in this course is built from it

without adding anything new.

Recap

  • A distribution is a list of outcomes with a number attached to each; the numbers may not be negative and they must add to one, and nothing else is required of them.
  • An event is a group of outcomes, and its probability is the sum of their weights, which is why every rule about events turns out to be a rule about adding.
  • The weights have to come from somewhere, either counted from things that happened or assumed, and treating an assumption as a measurement is the most common error in the subject.

This is the reading half

Starting the course gives you your own copy of it. Every idea on every page has problems standing under it, marked with a reason rather than a tick, and any sentence you do not believe can be opened and argued with. None of that can happen on a page nobody owns.

The contents

NextThe Number You Would Settle For →

The rest of this course

  1. 01A List, and a Number on Each Itemyou are here
  2. 02One Number Standing in for a Whole Listopening only
  3. 03The Second Number Every Average Needsopening only
  4. 04A Table Instead of a Listopening only
  5. 05What Is Left After the Newsopening only
  6. 06Four Times the Data for Half the Erroropening only
  7. 07Height Is Not Weightopening only
  8. 08The Number and the Bar Beside Itopening only

Read alongside