Probability and distributions
Read a discrete distribution as a probability vector that sums to 1, and compute simple probabilities.
What the animation says
Every word needs a number
The cat sat on the... Before a model writes the next word, it scores every word it knows. Mat: quite likely. Floor: less likely. Banana: almost never. That is tens of thousands of numbers at once, and they all share one whole of certainty. Picture a pie that stands for one hundred percent. Each possible word gets a slice. A slice of one quarter means: draw the next word many times, and this word comes up about twenty-five times in a hundred.
Two rules, one missing slice
Slices obey two rules. No slice is negative, and no slice is bigger than the whole. And all the slices together make exactly one. A list like this is called a discrete distribution, or a probability vector. Here is the model's list: mat point five, floor point two, sofa point one, other point one five. Bed is hidden. Using only the rules, what must bed be?
An event: add its slices
Bed is point zero five: one minus everything else, which is point nine five. Now ask about a group of words. A group of outcomes is called an event. What is the chance the next word is mat or floor? Light up both slices and add: point five plus point two, point seven. Each outcome counts only once, even if you name it twice. Your turn: what is the chance the next word is sofa or bed?
Not happening, and many draws
Sofa or bed is point one five: the two slices added together. Now the chance the next word is not mat. That is everything except mat. You could add four slices, or just take mat away from the whole: one minus point five, which is point five. Probabilities also predict counts. Imagine drawing the next word a thousand times. Drag the marker to about how often floor should appear.
What to remember
A discrete distribution is one number per outcome. None is negative, and together they make exactly one. For an event, add the slices of its outcomes, each counted once. For something not happening, subtract its chance from one. And a hidden value is whatever is left of the whole.
Sharing out one whole unit of certainty
A distribution is a list summing to 1
Next word after 'The cat sat on the'
What to remember
On Bytewise this lesson comes in small steps with a check at the end, and the app brings it back right before you would forget it.
Bytewise
All courses