Chance, Spread and What to Expect
One Number Standing in for a Whole List
Last timeWeights on a List of Outcomes
Expectation collapses a distribution to a single number by weighting each outcome by how likely it is, and the two rules it obeys do most of the work in every later course.
A distribution is a whole list of numbers, and most of the time a single number
is wanted instead. If a request might take one millisecond or two hundred, what
is the time it takes? There is no honest single answer, but there is a standard
one, and it is the one every later course uses.
Take each possible value, multiply by the weight on it, and add.
- the quantity in question, whose value is not yet known
- the value it takes if the i-th outcome happens
- the weight on that outcome
- the expectation, read as the expected value of X
Apply that to the four outcome request from the previous lesson, with times of
one, eight, thirty and two hundred milliseconds and weights of ninety four,
four, one and a half, and a half hundredths. The sum comes to about two point
seven milliseconds. Two things about that number are worth noticing immediately.
The first is that it is not close to the common case. Ninety four percent of
requests take one millisecond, and the expectation is nearly three times that,
because the rare two hundred millisecond outcome contributes a full millisecond
all by itself despite happening once in two hundred times. Expectation is
sensitive to rare extremes, which is a feature when the extremes genuinely matter
and a trap when somebody reads the number as a description of a typical request.
The second is that two point seven is not a time any request takes. No outcome on
the list has that value.
It is a centre, not a forecast
The expectation of a fair six sided die is three and a half. The die has no face
showing three and a half and never will. The number is the balance point of the
distribution: if the weights were physical masses placed at the values along a
line, the expectation is where the line would balance.
That is worth holding onto because the word expected suggests a prediction, and
it is not one. The expected number of heads in three flips of a fair coin is one
and a half. The expected number of accidents at a junction next year might be
nought point seven. Neither is a possible outcome. What the expectation promises
is something about averages over many repetitions, which is the subject of a
later lesson in this course, and nothing at all about any single occasion.
The lesson stops here
4 more paragraphs to go
You have read the opening. The rest of the argument, the problems that check whether it landed, and the lines worth keeping at the end all come with a plan.
The first lesson of every course in the library reads the whole way through, free, so you can see exactly what the rest of them are.
See the planThe contentsThis 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