14
CHAPTER 1. DATA MINING
Similar identities hold when a is negative. That is, the limit as x goes to
inﬁnity of (1 −1
x)x is 1/e. It follows that the approximation (1 + a)b = eab
holds even when a is a small negative number. Put another way, (1 −a)b is
approximately e−ab when a is small.
Some other useful approximations follow from the Taylor expansion of ex.
That is, ex = P∞
i=0 xi/i!, or ex = 1 + x + x2/2 + x3/6 + x4/24 + · · · . When
x is large, the above series converges slowly, although it does converge because
n! grows faster than xn for any constant x. However, when x is small, either
positive or negative, the series converges rapidly, and only a few terms are
necessary to get a good approximation.
Example 1.7 : Let x = 1/2. Then
e1/2 = 1 + 1
2 + 1
8 + 1
48 +
1
384 + · · ·
or approximately e1/2 = 1.64844.
Let x = −1. Then
e−1 = 1 −1 + 1
2 −1
6 + 1
24 −
1
120 +
1
720 −
1
5040 + · · ·
or approximately e−1 = 0.36786.
✷
1.3.6
Power Laws
There are many phenomena that relate two variables by a power law, that is, a
linear relationship between the logarithms of the variables. Figure 1.3 suggests
such a relationship. If x is the horizontal axis and y is the vertical axis, then
the relationship is log10 y = 6 −2 log10 x.
Example 1.8 : We might examine book sales at Amazon.com, and let x rep-
resent the rank of books by sales. Then y is the number of sales of the xth
best-selling book over some period. The implication of the graph of Fig. 1.3
would be that the best-selling book sold 1,000,000 copies, the 10th best-selling
book sold 10,000 copies, the 100th best-selling book sold 100 copies, and so on
for all ranks between these numbers and beyond. The implication that above
rank 1000 the sales are a fraction of a book is too extreme, and we would in fact
expect the line to ﬂatten out for ranks much higher than 1000. Moreover, the
slope of the line in Fig. 1.3 is probably much too steep for describing book sales,
although a line that drops less precipitously would be close to what happens in
practice.
✷
The general form of a power law relating x and y is log y = b + a log x.
If we raise the base of the logarithm (the base doesn’t actually matter in the
equation), say e, to the values on both sides of this equation, we get y =
ebea log x = ebxa. Since eb is just “some constant,” let us replace it by constant
c. Thus, a power law can be written as y = cxa for some constants a and c.
