AQA 7517, section 4.5.1.7
Different kinds of number suit different jobs. The two main uses are counting and measurement.
Counting uses natural numbers
Counting answers "how many?" for things that can be separated into whole items. The answer is a natural number: 0, 1, 2, 3...
You can't have 2.5 students or apples in a bowl. These are discrete quantities, which means there are gaps between the possible values.
Examples:
- the number of students in a class;
- the number of items in a shopping basket;
- how many times a loop has repeated.
Measurement uses real numbers
Measurement answers "how much?" for quantities that vary smoothly. The answer is a real number, which may have a fractional part.
These are continuous quantities. Between any two values there are more possible values.
Examples:
- height: 1.78 m;
- time: 3.62 seconds;
- temperature: 21.5 °C;
- mass, speed and distance.
Comparison
| Counting | Measurement | |
|---|---|---|
| Question | How many? | How much? |
| Type of number | Natural number () | Real number () |
| Kind of quantity | Discrete | Continuous |
| Exact? | Yes | Only as accurate as the measuring device |
| Example | 24 students | 1.62 m tall |
In programming
Counts are usually stored as integers, and measurements as floating point numbers.
students = 24 # counting: an integer
height_m = 1.62 # measurement: a float
average = 1.7486 # a measurement derived from others
A measurement can never be perfectly exact, because it is limited by the precision of the instrument (and by the number of bits the computer uses to store it). A count of 24 students, however, is exactly 24.
Worked example
Task: state whether each quantity would be stored using a natural number or a real number: (a) the number of goals in a match, (b) the speed of a car, (c) the number of pages in a book, (d) the length of a road.
- (a) Counting, so a natural number.
- (b) Measurement, so a real number.
- (c) Counting, so a natural number.
- (d) Measurement, so a real number.
Exam tip: explain your choice. Say "counting uses natural numbers because the quantity is a whole number of items", and "measurement uses real numbers because it can take any value, including fractional ones".
Check yourself
Which type of number is used for counting, and which for measurement?
Natural numbers for counting, and real numbers for measurement.
Why can't the number of people in a room be 3.5?
It is a count of whole items, so it must be a natural number.
Give two examples of quantities that would be stored as real numbers
Any two measurements, such as height, mass, time, temperature or speed.