# (p.196) Appendix B: Logarithms

# (p.196) Appendix B: Logarithms

(p.196) Appendix B: Logarithms

Consider the expression 10^{2}; it is equivalent to 10 × 10, it equals 100, and it can be read as “10 squared” or “10 to the 2nd power.” In this expression, 10 is called the *base* and 2 the *exponent*. Raising a number (the base) to a power (the exponent) is called *exponentiation*.

*Logarithms* (“logs”) are exponents. We will start with base 10 logs because they illustrate the basic logic of logs, and they are relatively easy to understand. Then, we will turn to natural logs because they are important to understanding and interpreting generalized linear models (GZLMs) (see Cohen et al., 2003, and Pampel, 2000, for more detailed, but very readable, discussions of logarithms).

# Base 10 Logarithms

Look at Table 8.1. As you can see, 10 must be raised to the power of 1 to get 10, the power of 2 to get 100, the power of 3 to get 1,000, and so forth.

The log of a number (*x*) to the base 10 equals the power to which 10 must be raised in order to get *x*. The log of a number to the base 10 is written as *log* _{10}(*x*) = *y*, and read as “the log of *x* to the base 10 equals y.” The log_{10} of 100, for example, is written as: log_{10}(100)= 2, and read as “the log of 100 to the base 10 equals 2.”

Table 8.1 Log_{10} Examples

Base (b) |
log |
x |
---|---|---|

10 |
1 |
10 (10 |

10 |
2 |
100 (10 |

10 |
3 |
1,000 (10 |

10 |
4 |
10,000 (10 |

In short, when you take the log of a number you know the base and the number you are trying to take the log of (*x*), and you are trying to find the correct exponent.

Suppose for the moment that the values of 10, 100, 1,000, and 10,000 from Table 8.1 represent income in dollars. The corresponding logs of these numbers (1, 2, 3, and 4) have no intuitive or substantive meaning, so how do you get the original income numbers if you have the logs?

Look again at Table 8.1. As you can see, 10^{1} = 10, 10^{2} = 100, 10^{3} = 1,000, and so on. What we are doing here is raising the base of the log (10) to the value of the log (1, 2, 3, or 4) in order to get the original value of the number (10, 100, 1,000, or 10,000). That is, we “exponentiate” the log. This is known as the *inverse of the log*; sometimes it is called the *antilog*, and it is just the reverse of the log.

In short, when you take the inverse of a log you know the base and the exponent, and you are trying to find the original number (*x*).

# Natural Logarithms

The natural logarithm is used as the link function for the GZLMs discussed in this book. The natural logarithm is a little more difficult to think about, compared to base 10 logarithms. The reason it is a bit more difficult is that the base of the natural logarithm is *e*, where *e* is approximately 2.718 (*e*, after the mathematician Leonhard Euler). However, the basic ideas are the same.

Look at Table 8.2. As you can see, 2.718 must be raised to the power of 1 to get 2.718, the power of 2 to get 7.389, the power of 3 to get 20.086, and so on.

Table 8.2 Natural Logarithm (ln) Examples

Base (b) |
ln(x) |
x |
---|---|---|

2.718 |
1 |
2.718 (2.718 |

2.718 |
2 |
7.388 (2.718 |

2.718 |
3 |
20.079 (2.718 |

2.718 |
4 |
54.586 (2.718 |

*Note*: 2.718 is the approximate base of the natural logarithm.

The log of a number (*x*) to the base of the natural logarithm equals the power to which *e* must be raised in order to get *x*. The log of a number to the base of the natural logarithm is written as *ln(x)* = *y*, and read as “the log of x to the base of the natural logarithm equals y.” The natural logarithm of 7.389, for example, is written as: ln(7.389) = 2, and read as “the natural logarithm of 7.389 equals 2.”

As with logarithms to the base 10, when you take the natural logarithm of a number you know the base and the number you are trying to take the log of (*x*), and you are trying to find the correct exponent.

Look again at Table 8.2. As you can see, 2.718^{1} = 2.718, 2.718^{2} = 7.389, 2.718^{3} = 20.086, and so on. What we are doing here is raising the base of the natural logarithm (2.718) to the value of the log (1, 2, 3, or 4) in order to get the original value of the number (2.718, 7.389, 20.086, 54.598). That is, we “exponentiate” the log. This is the inverse of the natural log (called the **exponential function**), and it can be written as *e ^{x}*

**. For example, the base of the natural log raised to a power of 2 equals 7.39, and this expression can be written as**

*or exp(x)**e*= 7.39 or exp(2)=7.39, and read as “the base of the natural log raised to the power of 2 equals 7.39.”

^{2}As with logarithms to the base 10, when you take the inverse of a natural logarithm you know the base and the exponent, and you are trying to find the original number (*x*).