Probability
Probability tells you how likely something is. A language model does not know the next word. It gives a probability to every word, then picks one. In this lesson you learn the few ideas of probability that AI uses, and you run them in NumPy.
New words
- Probability
- A number from 0 to 1 that shows how likely something is.
- Outcome
- One possible result, such as heads on a coin or a 4 on a dice.
- Independent events
- Two events where the first result does not change the second.
- Conditional probability
- The chance of one event when you already know another happened.
- Distribution
- A list that gives the probability of every possible outcome.
- Softmax
- A function that turns any list of scores into probabilities that add to 1.
- Temperature
- A setting that makes a model play safe or take more risks.
What you will learn
- Where does probability show up in AI?
- How do you find a probability?
- Why is a probability between 0 and 1?
- What happens when you repeat it many times?
- What if two things happen together?
- What is conditional probability?
- What is a distribution?
- How do temperature and softmax work?
- Try it: spin the next-word wheel
- Common mistakes
- Explain it to a friend
- Key takeaways
10 quiz questions at the end.
The full lesson, with interactive demos and the quiz, opens after you sign in with Google. It is free.