OCR H446, section 2.1.1 (c)
An abstraction is a simplified picture of reality. It is useful, but it is not the same as the real thing. Understanding the gap between the two is an important skill.
"All models are wrong, but some are useful." (George Box, statistician)
How an abstraction differs from reality
| Reality | Abstraction (model) | |
|---|---|---|
| Detail | Enormously detailed | Simplified: only chosen details kept |
| Accuracy | Exact | An approximation |
| Complexity | Very complex, with many interacting factors | Manageable |
| Behaviour | Messy, unpredictable, with exceptions | Follows simple rules |
| Change | Changes continuously and in unexpected ways | Only what is programmed changes |
| Size | Impossible to store completely | Small enough to store and process |
Differences in detail
- What is left out. The model ignores some features completely. A model of traffic that includes cars and roads might ignore pedestrians, weather and road works.
- What is simplified. Continuous things become discrete: time is split into steps, space into grid squares, and real numbers are stored as approximations.
- Assumptions. The model relies on assumptions that may not always be true, such as "all drivers behave the same way".
- Randomness. Real events involve chance that is hard to model.
Examples
A map
A map shows roads and towns, but not every tree, bin or pothole. It is out of date as soon as something is built. It shows a 3D landscape on a flat surface, which distorts distances and shapes. A hiker who relies on the map without looking at the actual ground could be misled.
A weather forecast
A forecast uses a simplified model of the atmosphere, with data from a limited number of weather stations. Tiny differences in the starting data can lead to very different results days later. So forecasts become less reliable the further ahead they look.
A computer model of a bank account
The model has a balance and a list of transactions. It ignores the owner's circumstances, so it can't tell that a large withdrawal is for a genuine emergency and not fraud.
A video game physics model
A game uses simple physics so that it can run at 60 frames per second. A car in a game doesn't have real tyre wear, engine heat or road surface. It feels realistic, but would be useless for designing a real car.
Floating point numbers
A computer stores real numbers as floating point, which is an abstraction of the real numbers. It can't store all of them exactly, so 0.1 + 0.2 isn't exactly 0.3. The abstraction of a real number doesn't match reality perfectly (see 1.4.1 (g)).
print(0.1 + 0.2) # 0.30000000000000004
Problems when a model is mistaken for reality
- Wrong answers. If a crucial detail has been left out, the model's results can be wrong. A financial model that ignores the possibility of a crash can lead to huge losses.
- Over-confidence. People trust the model too much, because a computer produced it, and forget its assumptions and limits.
- Bias. A model built from incomplete data (for example one group of people) can be unfair or inaccurate for others.
- Out of date. The real world changes, but the model doesn't unless it is updated.
- Wrong level of abstraction. Too little detail gives useless answers. Too much makes the model slow or impossible to build.
Choosing how much detail to keep
There's always a trade-off:
The right level depends on the purpose. A model should have just enough detail to give answers that are good enough for what it is used for.
Checking a model against reality
To judge how good a model is:
- Compare its predictions with real results (validation). Does the forecast match what happened?
- Test with extreme and unusual cases.
- List the assumptions, and check whether they hold.
- Update the model as new information arrives.
Worked example
Task: a simulation predicts how long a queue will be in a bank, using the average rate of customers and the average time to serve each one. Describe how it differs from reality, and what might go wrong.
- Differences: real customers arrive in bunches (lunchtime), some take far longer than average, staff take breaks, some customers give up and leave, and a machine might break. The model uses averages and a fixed number of tellers, and treats all customers the same.
- What might go wrong: at a busy time the model might predict a 2 minute wait when the real wait is 15 minutes, because averages hide peaks. The bank might then understaff the branch.
- Improvement: add time-of-day patterns and a range of service times, check the predictions against real queue data, and tune the model. The model is then more accurate, but more complex.
Exam tip: for this point, say what the model leaves out or simplifies, and what effect that has, for example "it ignores bunching of customers, so it underestimates queues at busy times". Always mention that a model is an approximation that depends on assumptions.
Check yourself
Give two ways in which an abstraction differs from the real thing
Any two of: it leaves out detail; it simplifies or approximates; it depends on assumptions; it may be out of date; it follows simple rules where reality is messy.
Why are weather forecasts less reliable the further ahead they look?
The model is a simplification, built on limited data, and small errors in the starting data grow over time and lead to very different results.
What is the danger of trusting a model too much?
It may leave out something important, or rely on assumptions that don't hold, so its results can be wrong, and decisions based on it can be harmful.
How can you check how good a model is?
Compare its predictions with real results, test extreme cases, check its assumptions, and update it as new data arrives.