I3 · Mathematics for AI

Module Review and Assessment

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.

15 min Intermediate · Sublevel Beginner Jump to the activity

What you need: The earlier topics of this module.

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

AreaKey ideasWhere in AI
StatisticsMean, median, mode; variance and standard deviation; percentiles and IQR; correlationExploring and cleaning data, scaling features
ProbabilityRules; P(A|B); Bayes' theorem; normal distributionClassifier outputs, naive Bayes, uncertainty
Linear algebraVectors, matrices, tensors; dot product; norms and distance; matrix multiplicationData representation, neurons, embeddings, layers
CalculusFunctions and graphs; derivatives; gradients; learning rateTraining 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.

  1. 1Subtract learning rate × gradient from the weights
  2. 2Compute the loss
  3. 3Make predictions with the current weights
  4. 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.

  1. 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.
  2. 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.
  3. 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

Question 1

1. Suppose the library later recovers Wednesday's count of 15. What is the corrected daily mean?

Question 2

2. Which measure of centre is most robust to outliers?

Question 3

3. Standard deviation is…

Question 4

4. A correlation of −0.9 means…

Question 5

5. A disease is rare and a test has a 5 per cent false-positive rate. A positive result means…

Question 6

6. About what share of normally distributed values lie within two standard deviations of the mean?

Question 7

7. The dot product of [1, 2, 3] and [4, 5, 6] is…

Question 8

8. A (32, 4) matrix times a (4, 10) matrix gives…

Question 9

9. Why standardise features before k-nearest neighbours?

Question 10

10. If the learning rate is far too large, gradient descent…

Question 11

11. What does the derivative of the loss with respect to a weight tell you?

Question 12

12. A test gives a p-value of 0.03 with a significance level of 0.05. What should you conclude?

Question 13

13. Which coin flip has the highest entropy?

Question 14

14. An eigenvector v of a matrix A satisfies…

Question 15

15. Why does backpropagation rely on the chain rule?

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