Lesson Overview
In mathematics, statistics, programming, and artificial intelligence, calculations must be done carefully. A small mistake in one step can affect the final answer. Sometimes the error comes from misunderstanding the type of number being used. Sometimes it comes from rounding too early. Sometimes it comes from using a formula correctly but interpreting the result poorly.
This lesson helps learners understand what calculation errors are, how they happen, and how to reduce them. The lesson also introduces rational and irrational numbers, rounding rules, and the difference between accuracy and precision, because all of these ideas affect how we work with data and mathematical results. The module source specifically places these topics under KM-02-KT05: Error in calculations.
Learning Outcomes
By the end of this lesson, learners should be able to:
- explain what a calculation error means
- distinguish between rational and irrational numbers
- explain what a rounding error is
- apply standard rounding rules correctly
- explain the difference between accuracy and precision
- understand why careless calculation affects statistics, programming, and AI results
1. What is an error in calculations?
An error in calculations is the difference between the correct value and the value obtained after a mistake, approximation, or limitation in the calculation process.
This does not always mean someone did “bad maths.” Sometimes the error happens because:
- A number was rounded
- Too few decimal places were used
- a calculator or computer stored an approximation
- The wrong order of operations was followed
- A formula was applied incorrectly
- A value was measured imprecisely
Simple example
Suppose the actual value is:
3.14159265
But you write:
3.14
That is not completely wrong, but it is less exact. The gap between the actual value and the rounded value is an error caused by approximation.
Why this matters
In everyday maths, a small error may not seem serious. But in:
- engineering
- finance
- data analysis
- machine learning
- software development
small errors can grow into bigger ones.
A tiny error repeated thousands of times can become a very real problem. That’s maths being dramatic, but for good reason.
2. Rational and irrational numbers
The source material for this section explains that a rational number is a number that can be written as a fraction p/q, where p and q are integers and q \neq 0. It also explains that irrational numbers cannot be written as a simple fraction and have decimal expansions that do not terminate and do not repeat.
2.1 Rational numbers
A rational number is any number that can be expressed as a fraction of two integers.
General form
\frac{p}{q}, \quad q \neq 0
Where:
- p is an integer
- q is an integer
- q is not zero
Examples of rational numbers
- \frac{1}{2}
- \frac{3}{4}
- -\frac{5}{2}
- 6, because 6 = \frac{6}{1}
- 0.75, because 0.75 = \frac{3}{4}
- 0.333…, because repeating decimals can be expressed as fractions
Important idea
A rational number may appear as:
- a whole number
- a fraction
- a terminating decimal
- a repeating decimal
Example
0.5 = \frac{1}{2}
0.777777… = \frac{7}{9}
So even if a number is written as a decimal, it can still be rational.
2.2 Irrational numbers
An irrational number is a number that cannot be written as a fraction of two integers.
These numbers:
- never end
- never repeat in a fixed pattern
Examples of irrational numbers
- \pi = 3.14159265…
- \sqrt{2} = 1.41421356…
- e = 2.7182818…
2.3 Why this matters in calculations
Knowing whether a number is rational or irrational matters because irrational numbers are often approximated.
For example:
\pi \approx 3.14
or
\sqrt{2} \approx 1.41
These approximations make calculations easier, but they also introduce error.
Example
Find the circumference of a circle with radius 7:
C = 2\pi r
Using \pi = 3.14:
C = 2(3.14)(7) = 43.96
Using a more exact value of \pi:
C \approx 43.9823
The answers are close, but not identical. That small difference is an approximation error.
3. Repeating decimals and calculation accuracy
The learner guide also discusses repeating decimals and shows that increasing the number of digits can improve accuracy, but still may not produce an exact value if the number goes on forever.
A repeating decimal like:
0.333333…
is rational, because it can be written as:
\frac{1}{3}
But when a computer stores it as:
0.3333
or
0.333333
it is using an approximation.
Example
\frac{1}{3} + \frac{1}{3} + \frac{1}{3} = 1
But if we use rounded decimals:
0.33 + 0.33 + 0.33 = 0.99
Now the answer is slightly wrong.
That is a great example of how rounding can create error, even when the original maths is perfect.
4. What is rounding error?
The source material defines rounding error as the difference between a rounded-off numerical value and the actual value.
A rounding error happens when a number is shortened to fewer decimal places or significant figures.
Example 1
Actual value:
5.6789
Rounded to 2 decimal places:
5.68
Rounding error:
5.6789 – 5.68 = -0.0011
The rounded result is close, but not exact.
Example 2
Suppose a machine records a weight as:
12.486 kg
If a report rounds it to:
12.5 kg
the rounded number is easier to read, but the exact value is lost.
4.1 Why rounding is used
Rounding is useful because it:
- makes numbers easier to read
- simplifies reports
- reduces the amount of memory used by computers
- helps communicate results clearly
But rounding must be used carefully.
If rounding is done too early in a long calculation, the final answer may become inaccurate.
4.2 Premature rounding
Premature rounding means rounding before the final answer is reached.
That is a common source of avoidable error.
Example
Calculate:
(2.36 \times 4.81)
Exact multiplication:
2.36 \times 4.81 = 11.3516
If we round too early:
- 2.36 becomes 2.4
- 4.81 becomes 4.8
Then:
2.4 \times 4.8 = 11.52
Now compare:
- more exact answer: 11.3516
- rounded-too-early answer: 11.52
That difference may seem small, but it can matter a lot in science, finance, or AI training data.
Best practice
Keep as many digits as possible during the working steps, then round at the end.
5. Rounding rules for statistical calculations
The source material says that with traditional rounding, if the number after the chosen place is less than halfway, round down, and if it is exactly halfway or greater, round up.
Standard rounding rule
When rounding a number:
- if the next digit is 0, 1, 2, 3, or 4, round down
- if the next digit is 5, 6, 7, 8, or 9, round up
Examples
Round 3.42 to 1 decimal place
The second decimal digit is 2, so round down:
3.42 \approx 3.4
Round 8.67 to 1 decimal place
The second decimal digit is 7, so round up:
8.67 \approx 8.7
Round 15.5 to the nearest whole number
The decimal part is 5, so round up:
15.5 \approx 16
5.1 Statistical example
Suppose the average score of a class is:
72.46
Rounded to one decimal place:
72.5
Rounded to the nearest whole number:
72
Different rounding levels can change how results are presented, so it is important to know what level of precision is required.
6. Accuracy and precision
The source material explains that accuracy is how close a measurement is to the true value, while precision is how reproducible or consistent measurements are.
These are not the same thing.
6.1 Accuracy
Accuracy means closeness to the true or accepted value.
Example
If the correct length of an object is 10 cm, and you measure:
9.99 cm
that result is very accurate.
6.2 Precision
Precision means consistency. If you repeat a measurement several times and get almost the same answer each time, the measurements are precise.
Example
You measure the same object four times and get:
- 8.2 cm
- 8.2 cm
- 8.3 cm
- 8.2 cm
These results are precise because they are close to one another.
But if the actual length is 10 cm, they are not accurate.
7. Error caused by wrong order of operations
The learner guide also notes that PEMDAS helps, but can fail when people apply it too literally or misunderstand how an expression is written.
Example
Evaluate:
1 + (6 – 4)^3
Correct steps:
- Brackets: 6 – 4 = 2
- Exponent: 2^3 = 8
- Add: 1 + 8 = 9
Correct answer:
9
If someone ignores the order of operations, they may get the wrong answer.
This kind of error is not a rounding error. It is a procedure error.
7.1 Why PEMDAS can still confuse people
Expressions like:
6 \div 2(1+2)
often cause arguments because people read them differently. The source material warns that these kinds of expressions can be misleading and are often badly written in the first place.
Lesson point
Good mathematics is not only about calculation. It is also about writing expressions clearly.
When writing formulas for learners or systems:
- use brackets properly
- avoid ambiguous notation
- make the intended grouping obvious
8. Error in computing and AI
This lesson belongs to a module that prepares learners to understand mathematics and statistics for AI, machine learning, deep learning, and data analytics.
So let’s connect the lesson to AI directly.
8.1 Computers do not always store exact decimals
Some decimals cannot be stored exactly in binary form.
For example:
- 0.1 may not be stored exactly as 0.1
- it may be stored as a very close approximation
That can lead to surprising results in programming.
Example
A programmer may expect:
0.1 + 0.2 = 0.3
But in some systems, the answer may display as:
0.30000000000000004
That happens because of how numbers are represented internally.
8.2 Why this matters in machine learning
Machine learning models depend on calculations such as:
- averages
- distances
- probabilities
- gradients
- loss values
If values are rounded badly, scaled badly, or measured badly, the model can produce weaker predictions.
Example
Imagine training a model using ages:
- 21.8
- 21.9
- 22.1
- 22.0
If all values are roughly rounded to:
- 22
- 22
- 22
- 22
the model loses detail.
That lost detail may reduce the model’s ability to learn patterns correctly.
9. Worked examples
Example 1: Rational or irrational?
Classify each number:
a) \frac{7}{8}
b) 0.125
c) \sqrt{3}
d) 5
Solution
- \frac{7}{8}: rational
- 0.125: rational, because it can be written as \frac{1}{8}
- \sqrt{3}: irrational
- 5: rational, because 5 = \frac{5}{1}
Example 2: Rounding correctly
Round 12.476 to:
- 1 decimal place
- 2 decimal places
Solution
To 1 decimal place:
- look at the second decimal digit: 7
- round up
12.476 \approx 12.5
To 2 decimal places:
- look at the third decimal digit: 6
- round up
12.476 \approx 12.48
Example 3: Accuracy and precision
A scale should read 50.0 kg.
Readings taken:
- 49.9
- 49.9
- 49.8
- 49.9
Discussion
These readings are:
- precise, because they are very close to each other
- also fairly accurate, because they are close to 50.0 kg
- Example 4: Premature rounding
Find:
\frac{10}{3}
Exact form:
3.333333…
If rounded too early to 3.3, then multiplied by 3:
3.3 \times 3 = 9.9
But the true exact relationship is:
\frac{10}{3} \times 3 = 10
That shows how early rounding creates an error.
10. Key lesson summary
In this lesson, learners studied error in calculations and saw that errors can happen for different reasons. Some errors come from approximating irrational numbers. Others come from rounding too early, misunderstanding number types, or applying mathematical rules carelessly. The source documents for KM-02 specifically include rational numbers, rounding error, rounding rules, and the difference between accuracy and precision as part of this topic.
Main ideas to remember
- Rational numbers can be written as fractions.
- Irrational numbers cannot be written as simple fractions.
- Rounding error is the difference between the rounded value and the actual value.
- Round only when necessary, preferably at the end.
- Accuracy means closeness to the true value.
- Precision means consistency of repeated results.
- Small errors in maths can become big problems in computing, statistics, and AI.
- 11. Short activity for learners
Ask learners to do the following:
Activity A: Classify the numbers
Identify whether each number is rational or irrational:
-
0.75
-
\pi
-
\sqrt{16}
-
\sqrt{5}
-
2.222…
Activity B: Round correctly
Round these values:
- 6.284 to 2 decimal places
- 15.95 to 1 decimal place
- 101.444 to 2 decimal places
Activity C: Accuracy or precision
A measuring tool gives these results for a true value of 20 cm:
-
18.1, 18.1, 18.2, 18.1
Ask:
- Is it precise?
- Is it accurate?
- Why?