← All articles
BlogRevision and Lecturer Resources

How to use worked examples to understand complex AI theories

Revision and Lecturer ResourcesBy Sotiris Spyrou·Published 2026-07-30
How to use worked examples to understand complex AI theories

How to use worked examples to understand complex AI theories

To use worked examples to understand complex AI theories, you must manually calculate a single algorithm step using small, simple numbers to observe how mathematical inputs change the outputs. This reverse-engineers abstract concepts into concrete mechanics, allowing you to see exactly how hyperparameters and data interact before you write any code.

When you sit down to revise machine learning, staring at a page of Greek letters will only get you so far. University lectures often present algorithms in their most generalised mathematical form. While mathematically precise, this format is terrible for building intuition. If you try to memorise equations without seeing how the variables behave in practice, you will struggle the moment an exam question asks you to apply the theory to an unseen scenario. A worked example acts as a bridge between high-level theory and practical application. By stepping through the numbers yourself, you build the mechanical understanding required to explain the concept confidently under exam conditions.

Deconstructing abstract mathematics into concrete steps

Let us look at gradient descent. The formal definition involves updating weights by subtracting the product of a learning rate and the gradient of a loss function. In a lecture slide, this is a single elegant line of calculus. However, in an exam setting, you are often asked to explain why a model fails to converge or how the learning rate affects the trajectory. You cannot answer this well by just quoting the formula.

You build that understanding by taking a trivial function like f(x) = x squared and running two steps of gradient descent by hand. Choose a starting point like x = 4 and a learning rate of 0.1. Calculate the derivative, multiply it by the learning rate, and update your starting value. You will see your new x is 3.2. Now, do it again with a learning rate of 1.5. You will see x jump to negative 8, overshooting the minimum entirely.

This manual process teaches you the theory of divergence and convergence far better than reading a paragraph about it. You literally see the numbers explode. When an examiner asks you to evaluate the impact of a high learning rate, you are no longer regurgitating text. You are describing a mechanical process you have directly observed, which results in a much clearer and more accurate exam answer.

Tracing tensor shapes and matrix operations

Dimensionality is a major stumbling block in deep learning exams. Students often understand the general idea of passing data through layers but lose marks because they cannot specify the exact shape of the data at each stage. Exam questions frequently present a custom architecture and ask you to determine the number of parameters or the output dimensions of a specific layer.

A worked example is the only reliable way to master this. Take a simple two-dimensional convolution. Do not just look at an animation online. Draw a four-by-four grid of numbers, define a three-by-three filter, and manually calculate the dot products across the spatial dimensions. Include a stride of two and add zero padding. As you map the inputs to the outputs on paper, the formula for calculating output dimensions becomes completely intuitive rather than a string of variables you have to memorise.

The same applies to fully connected layers. If you multiply a batch of 32 inputs with 10 features by a weight matrix, writing out the matrix dimensions explicitly (32x10 multiplied by 10x5) proves why the output must be 32x5. Our Full Marks Press Neural Networks guide covers this with worked exam questions, showing exactly how to lay out these dimensional checks to guarantee you pick up full marks for architecture analysis.

Identifying edge cases and algorithm failure modes

University exams test your judgement. Examiners want to know if you understand when an algorithm will fail. Theories often assume well-behaved data, but real-world data is noisy. Worked examples allow you to simulate these failures in a controlled environment, giving you the practical evidence needed to critique an approach.

Consider the K-Means clustering algorithm. The theory states that it partitions data into K distinct clusters by minimising the variance within each cluster. That sounds perfectly reasonable until you apply it to a dataset with a severe outlier. If you sketch a two-dimensional plane with five points clustered together and one point far away, and then manually assign centroids, you will see the problem immediately. The algorithm will likely dedicate an entire cluster to the single outlier just to minimise the squared distance penalty.

By working through this edge case, you internalise the sensitivity of K-Means to outliers. When an exam question asks you to select and justify an appropriate clustering method for noisy sensor data, you can confidently explain why K-Means might be inappropriate. You can contrast it with density-based methods like DBSCAN using the mechanical failure you observed in your worked example as the foundation of your argument.

Building intuition for hyperparameters and information gain

Decision trees rely heavily on concepts from information theory, specifically entropy and information gain. The equations feature logarithms and probabilities, which can look intimidating. Students often try to bypass the maths and just memorise the fact that decision trees split data to maximise purity. This surface-level knowledge falls apart when a mark scheme requires you to calculate the best split for a tiny dataset.

To grasp this, create a dataset of ten items: six positive and four negative. Calculate the initial entropy. Then, test a theoretical split that divides the data into two branches. Calculate the entropy of the new branches and subtract this from the starting entropy to find the information gain. The act of punching the logarithms into your calculator forces you to see how the mathematical penalty for mixed classes operates in practice.

If you repeat this process for a different split, you will immediately see which one yields a higher information gain. You are no longer taking the lecturer’s word for it. You have proved it to yourself. In an exam, you will not panic when asked to evaluate a split because you have already performed the exact same operations during your revision, building a deep familiarity with how the formula behaves.

How to answer this in an exam

When you are sitting in the exam hall, the way you present your mathematical and theoretical knowledge is closely scrutinised. Mark schemes for AI modules do not just reward the final correct number. They reward the demonstration of the correct process. If you make a minor arithmetic error but show a perfect understanding of the algorithmic steps, you will often secure the vast majority of the marks.

To secure these marks, structure your answers to mirror a good worked example. State the formula you are using before you plug in any numbers. Clearly define what each variable represents in the context of the specific question. Show the intermediate values. If you are calculating a single step of backpropagation, write down the local gradient before you multiply it by the upstream gradient. This makes it incredibly easy for the examiner to follow your logic and award partial credit.

Furthermore, always add a sentence interpreting your result. If you calculate an information gain of zero, briefly state that this means the proposed split provides no predictive value. Connecting the raw calculation back to the high-level machine learning theory proves that you have the judgement required of a competent practitioner, which is exactly what top-tier marks are reserved for.

Frequently asked questions

How many worked examples should I do per algorithm? Two or three high-quality manual calculations are usually sufficient. The goal is to understand the mechanics, not to turn yourself into a human calculator. Once you can predict how a change in inputs affects the output, you can move on to the next topic.

Should I use code or pen and paper for worked examples? Use pen and paper for your initial revision. Writing out the steps forces you to slow down and confront every part of the equation. Coding hides the intermediate steps behind functions, which defeats the purpose of the exercise.

What if I cannot find a worked example for a specific theory? Create your own using trivial numbers. Invent a dataset with three rows and two features. Walk it through the mathematical definition provided in your lecture notes. The simpler the numbers, the easier it is to track the theory.

Do exams require me to memorise complex formulas? It depends on your university, but generally, core concepts like gradient descent, entropy, and basic probability rules must be memorised. More complex or obscure formulas are sometimes provided in an appendix. Always check your specific module handbook for guidance.

To see exactly how these techniques translate into top grades, you can download a free copy of our exam strategy guide at fullmarkspress.com/free.

Revising this for an exam? The Full Marks Press guides cover it with worked exam questions and mark schemes. Get a free copy.

ShareXLinkedInWhatsApp
Sotiris Spyrou

Practitioner and author at Full Marks Press, a Verity AI imprint.