Logs
Introduction
Like all things I have learned or not learned, I need a pages so I can say, yes I remember this.
Going in Gaussian Naive Bayes I was redirected to logs. This showed how log number lines show the size of the differences. If for instance we take 1 and 8, 8 is 8 times the distance from 1 but if we do this with 1/8th and 1 which is also 8 times the distance the number line does not show this. But a log number line does
![]()
Fold Change is defined as Ratio that describes a change in a measured value
Second Time around
So thought I might go around this again so I to not forget. The above information is probably the useful part of all this but a simple diagram demonstrates I do know this, I just forget.
![]()
To
The logarithm of 8 in base 2 = 3 Because 2³ is 8
And 3 is how many times you need to times the base by to get the value. The above image is trying to convey that
if you take the distance from 1 and 8, you can say 1 x 8 = 8 or 8 is 8 times bigger than 1 if you take the distance from 1/8 and 1 is also 8 times the distance.
So logarithms give you the magnitude of difference.
So what is
37 x 59
Well we convert this to be expressed as exponents
10¹.⁵⁶⁸² x 10¹.⁷⁷⁰⁹
So now with exponents you can add them together to perform the maths.
This works because an exponent *is* the distance from 1 on a multiplicative number line. Each step is “multiply by the base”. So adding exponents is the same as multiplying numbers, and subtracting exponents is the same as dividing numbers.
For example: 2⁰ = 1 → 0 steps of ×2 from 1 2¹ = 2 → 1 step of ×2 from 1 2² = 4 → 2 steps of ×2 from 1 2³ = 8 → 3 steps of ×2 from 1 2⁴ = 16 → 4 steps of ×2 from 1
So when you add exponents, you are literally adding multiplicative distance. That’s why log(a × b) = log(a) + log(b).
1.5682 + 1.7709 -------- 3.3391
Note the logs obtained were via a logarithm book to 4 significant figures. Using accurate logs e.g. 37 = - 1.568201724… will result in rounding errors.
Convert 10³.³³⁹¹ back to a natural number and you get = 2183
Below is a screenshot of the old antilogarithms table