Definition
Could you now summarise a data set, reason about uncertainty, multiply the matrices inside a neural layer and explain how gradient descent finds a minimum?
This review brings together Mathematics for AI: statistics (centre, spread, percentiles, correlation), probability (rules, conditional probability, Bayes' theorem, distributions), linear algebra (vectors, dot products, norms, matrices) and calculus (functions, derivatives and gradient descent), followed by a scored quiz.
In simple words
Read the recap table, try the matching activity, then take the quiz. Each answer comes with an explanation. If you miss one, go back to that topic.
Why it matters
These four areas are the language of machine learning. Every model you build later describes data with statistics, expresses uncertainty with probability, computes with linear algebra and learns with calculus.
How it works
| Area | Key ideas | Where in AI |
|---|---|---|
| Statistics | Mean, median, mode; variance and standard deviation; percentiles and IQR; correlation | Exploring and cleaning data, scaling features |
| Probability | Rules; P(A|B); Bayes' theorem; normal distribution | Classifier outputs, naive Bayes, uncertainty |
| Linear algebra | Vectors, matrices, tensors; dot product; norms and distance; matrix multiplication | Data representation, neurons, embeddings, layers |
| Calculus | Functions and graphs; derivatives; gradients; learning rate | Training with gradient descent and backpropagation |
Try it yourself
Match the tool to the task
Which idea from this module fits each task?
- Finding a typical salary in skewed data
- Updating the chance of disease after a positive test
- Ranking documents by meaning
- Computing a layer's outputs for a whole batch
- Deciding which way to adjust a weight
One step of gradient descent
Put the steps in order.
- 1Subtract learning rate × gradient from the weights
- 2Compute the loss
- 3Make predictions with the current weights
- 4Compute the gradient of the loss
Sublevel checkpoint
Audit a week of library records
The library counted daily loans. Its export contains Mon 8, Tue 12, Tue 12, Wed blank, Thu 16 and Fri 4. The librarian confirms that the second Tuesday row is a repeated export of the same count. Wednesday's scanner was offline. Keep a copy of the original rows.
- Write down what one row measures. Use a day as its key and flag the duplicate. Explain why a different library branch would need a different key.
- Write a loop or use a table to total the known counts. Find the mean and median for the observed days, recording the denominator you used.
- Sketch a chart with a gap on Wednesday. Can you tell whether loans rose or fell from Tuesday to Wednesday? Explain your answer to the librarian.
Common mistakes
- Memorising formulas without knowing when to use them.
- Confusing P(A|B) with P(B|A).
- Ignoring shapes when multiplying matrices.
Check yourself
Summary
- Statistics describes data; probability handles uncertainty.
- Linear algebra represents and transforms data; matrix multiplication powers neural layers.
- Calculus, through gradients and gradient descent, is how models learn.
Finished reading?
Sources: Mathematics for Machine Learning (Deisenroth, Faisal and Ong) · Khan Academy: Statistics and probability