Tuesday, January 13, 2015

The seductive power of mathematics

kw: book reviews, nonfiction, mathematics, mathematical thinking

We are nearly two weeks into the new year, and this is my first post of the year. It is not because the book was extra-hard to read, but that the year itself has begun extra-busy! Actually, though the book was long (437 pp + 15 pp notes), I spent less time reading it than many shorter ones because math is of great interest to me.

More than 2/3 of those who read that first paragraph will respond, "But not to me", and be tempted to stop right there. I hope you will continue anyway, because the author's design is to show how we all use mathematical thinking and can benefit from a better acquaintance with it. Theoretical mathematician Jordan Ellenberg has written How Not to be Wrong: The Power of Mathematical Thinking.

Contrary to popular thought, Mathematics isn't mainly about numbers. If you break the word down it means "The Studies of Learning". Note the "s" on "mathematics" and on "studies". The field has hundreds of branches, thus where an American would, in our streamlined way, speak of "math", the English speak of "maths". Being American, I'll go the American way. Only two of the many disciplines under the "math" umbrella explicitly involve numbers.

For most of us, our introduction to math began with arithmetic and the "plus table" and "times table". Though even grade schoolers are now permitted to use calculators in class, it is useful to know how to do simple sums and multiplications in one's head. At the very least, when you punch in some numbers and get a result, you are more likely to detect a punching-in error if your mind is at least estimating the result in the background.

The second numerical branch of math is Number Theory, which deals with properties of whole numbers. A big sub-field is Prime numbers, which we will return to later on. But most people who might read this have been exposed to additional branches.

At least in Western and Westernized societies, facility in basic arithmetic was needed to advance through Plane Geometry, Algebra, Trigonometry, Analytical Geometry (sometimes just called Charting), and Calculus. Before the early 1960s Calculus was not introduced to high school students, but the teacher of my senior class in Analytical Geometry was one of the first to finish the school year with a few weeks of instruction in basic Calculus. Now at least half a year is taught to most high school seniors.

So if you had all those courses, think back: most of the work was learning to use certain symbols and sets of symbols in a consistent way. Working out problems using numbers was less important than the proper use of those symbols. That's why the teacher kept harping on "Show Your Work!". Also, particularly in Geometry, formal proof methods were introduced, primarily because visual proofs are easier to comprehend than the symbolic proofs that are the stock in trade of "higher math" (that is, stuff for college juniors and beyond, and only in technical disciplines).

Most of us shudder at that word, "proof". Few understand it. It takes a certain kind of mind to construct a useful proof. My brother, a working mathematician for some years, whose name I shall call Rick, had two friends at college; call them Tom and Harry. They all took some rather gnarly "higher math" courses together, and did lots of formal proofs. Another friend described them thus:
"Send Tom into a room with a mysterious machine in it having several large gears, a big flywheel and other bulky items of unknown import. He is requested to make its wheel turn. By putting a shoulder to the largest gear and pushing very hard, he is able to make it turn, slowly. He leaves and Rick enters. He noses around a bit and finds, behind the machine, a crank with a long handle. Fitting the handle into a convenient socket, he is able to turn the wheel more easily. He leaves and Harry enters. He looks around further, sees the crank, but keeps looking until he finds a button. He presses the button and a motor somewhere makes it all run."
"Pushing the right button" represents concocting a useful proof. I like visual proofs, and you can see one that proves the Pythagorean Theorem here. Remember the Pythagorean Theorem? It pertains to a right triangle, one for which one angle measures 90°. If the two sides that meet at that right angle have lengths represented by a and b, their relationship to the third side, of length c is c² = a² + b². In words, we say that the sum of the squares of the lengths of the two legs of a right triangle equal the square of the length of the hypotenuse (the third side). Pythagorean triples are sets of three whole numbers that can be used to produce a right triangle, such as 3, 4, 5 (3²=9, 4²=16, 5²=25, and 25=9+16). Try with 5, 12, 13 and 8, 15, 17.

So if math isn't primarily about numbers, it sure uses them a lot. But the power of most branches of math lies not in the use of numbers, but in the core concept of math: Operators. To illustrate, when we learn the Plus Table, we are actually learning to use an operator, the +, the addition operator. With a little more thought and practice, we also learn the operator, the subtraction operator. Similarly, the Times Table helps us learn the ×, the multiplication operator, and later the ÷, or division operator. Even later we learn the exponentiation operator, which has several symbols, but the ² is the special one for squaring (multiplying a number by itself). And, we soon learn the , the square root operator, and allied symbols for taking other roots. And on and on it goes. In the middle of learning Algebra, we learn of Polynomials, and how the + and and × seem to attain superpowers to add and subtract and multiply these groups of many symbols, as though they were unitary in themselves. Calculus adds further superpowers, while adding a further set of operators. Sure, these operators work on numbers, but that is baby steps compared to the symbols and sets of symbols (and so forth) that they also work on.

Very few have a mind like Harry's. Most of us don't need one, just as most of us don't need to be an automobile mechanic to be able to drive a car. However, a certain amount of mechanical smarts can make us a better driver. Dr. Ellenberg's notion is to make us a little better at thinking in operational terms, like a mathematician. Then we might be "less wrong" about many things. And the title provides a clue to the author's aim. The kind of mathematical thinking that underlies most of the examples is Statistical thinking.

The book has five sections. First is Linearity. The most amusing example is found in its third chapter, "Everyone is Obese". A soberly-written article came out a few years ago that can be summarized thus:

  • In about 1972 half of Americans had a BMI of 25 or greater. (Body Mass Index over 25 is "overweight" and beyond 30 is classified as "obese", at least in government literature)
  • Twenty years later, the number of overweight Americans was 60%.
  • By 2008 just under 75% had a BMI of 25 or more.
  • At this rate, all Americans will be overweight by 2048.

If you chart these three points and project a straight line through them, it will cross 100% at 2048. But do you see the fault in this reasoning? Firstly, the "line" one wants to project isn't very straight. The percent of overweight first goes up 10 points in 20 years, then another 15 points in 16 years. Do get from 2008 onward, do you project the next 25 points (100% - 75%) over 50 years, or closer to 25 years? The authors of the study projected an average of the two shorter-term rates and got there in 40 years. But why didn't they say, "Well, the rate of obesity increase has nearly doubled more recently. Maybe it will continue to speed up, and double again. Then the (now curved) line will hit 100% in just 12-13 more years, and we'll all by fat by 2020."

The real case is that, while many people are prone to gaining more weight as their prosperity increases, it isn't so for everyone. I seem to be like the majority, easily gaining weight; my wife is not, and has weighed between 98 and 108 pounds for the whole 40+ years I have known her. And she never diets. If my wife and I are still around in 2048 (we'll be over 100), I am pretty certain that she, at least, will not be obese. My BMI stays around 28-29, and is more likely to go down than up as I exceed the age of 85 or so. And our very fit son, who will almost certainly be alive in 2048, is very, very unlikely ever to have a BMI greater than 24.

The Earth is round, but we treat it as flat for most everyday uses. Straight lines serve us well. But look at a survey of Sections in the central plains. A Section is a square mile, very hearly. On a perfectly flat Earth, every Section would have exactly 640 acres. But on U.S. Geodetic Survey maps you'll see a correction every six miles further north you go. Only the southern row of Sections has something close to the full 640 acres. The northern row of a 6-by-6 Section Township has Sections with about 639 acres, because the curvature of the Earth has drawn together the meridians used to lay out the survey, by five feet near 40°N.

The takeaway point of the first section: Very few phenomena in nature proceed in a straight line forever. Keep that as a maxim in your mental bag of tricks.

The second section is titled "Inference". Here is the largest mass of material related to proofs. But it is presented in a much more entertaining way than you'd find in a college math course (or even your Middle School Geometry class). He begins with the legendary Baltimore stock broker, something I call the Binary Scam.

You get a piece of junk mail (these days, spam e-mail) with the bold statement, "Using my special stock evaluation system I predict Apple stock will rise tomorrow." The next day, Apple's stock price indeed rises, and soon another missive arrives: "See it at work. The stock will rise again the next day." It does so, and a third message now predicts a drop, which indeed happens. After a couple of weeks— and the messages now include a "Click here to invest" button—the fellow has been right ten times out of ten. You are ready to invest!!

What don't you know? You don't know that the first message went to more than 100,000,000 people. Half of them got a message saying the stock would go, not up, but down! Those 50 million or so never got the second message, but half of those who did, got one saying the opposite of the one you received. And so it goes. After 10 "predictions", the field has been cut by a factor of about 1,000. (Strictly speaking, by exactly 1,024, the tenth power of two). This leaves 100,000 or so people who tend to think this guy has a system that really, really works. If even 1% of them invest with him, that could be millions of dollars. And on day 11 he might just be in Switzerland or somewhere with those millions, and a "dead" address with no forwarding.

There is a variation of this, in which, even though half the people on day 5 got a "prediction" that "failed", they get a special message: "As you can see, nothing is perfect, but I think you will be pleased when the system continues to produce a high rate of correct calls." Guess what? Our psychology is such that a larger number of those folks will invest!

Inference is all about doing your best to gather more information, and when you have done so, remembering what Donald Rumsfeld said (I paraphrase), that we make decisions based on what we know, and try to take account of what we don't know, which is in two parts: the Known Unknowns and the Unknown Unknowns. The more "wonderful" an opportunity seems, the more likely it is that the unknown unknowns are so much bigger than what you know and what you know you don't know, that you are at best guessing while wearing a blindfold.

He closes the section with a cogent explanation of Bayesian Inference, which is quite a bit different from ordinary statistical thinking. Though it is more powerful than the kind of inference used in a typical scientific journal article, it takes a different kind of thinking, and I confess I can't use it numerically without having a text open to guide me. This is evidently true of scientists in general.

I promised a return to prime numbers. The first several prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23, and 29. Prime numbers have no divisors, no factors (1 doesn't count). You can see that 4 of the first 7 natural numbers are primes. Then they start to thin out: 4 of the next 12, then 2 of the next 10. Something called the Prime Number Theorem states that the number of prime numbers, P, less than some large number N, is equal or less than N/ln(N), where ln refers to the Natural Logarithm. Look it up if it interests you. Here we can test it with the 10,000th prime number, 104,729. P=10,000 and N=104,729. N/ln(N)=9060.28 and some more digits. The millionth prime is 15,485,863, and the calculation on these numbers yields 935,394 (and some decimals), about 6.5% lower than a million. For really big numbers, the theoretical number gets quite close.

What the Prime Number Theorem tells us is that prime numbers thin out steadily, and somewhat predictably, the further out we go on the number line. But they never die away completely. There may not be a high density of primes between 100 quadrillion and 101 quadrillion, but there are still a lot of them, roughly 25 trillion. However, this is very thin indeed, with only one number out of 40 being a prime at this level, on average.

Why should this be useful? Prime numbers are at the core of modern encryption, which is used by your bank to send a secure message or payment to another bank whenever you make a credit card transaction or write a check. Your password is also encrypted. The encryption method uses a long number made up of two or more long prime numbers. The rarity of long primes means there are lots of long numbers to choose from, that are hard for a computer program to figure out whether they are prime or not, and what their factors are. 101 quadrillion is only an 18-digit number, and your bank is using numbers of 85 digits or longer. Just cracking an 18-digit "composite number" (in the industry this means a long number with only two prime factors of roughly equal size) requires doing several million divisions. Today's computers can do that in a few seconds. But an 85-digit composite? No machine yet built can determine its factors in less than a few billion years. And when machines get millions of times faster? We'll just go to 200- or 400-digit encryption.

Well, there are three sections of the book to go. "Expectation" is about using probability methods to figure out how likely something is. The weather forecaster uses an expectation method to say that the chance of rain tomorrow is 40%. But particularly for weather, expectation is not like it is when rolling dice or playing roulette. If a 6-sided die is make properly (most are pretty close), each number will come up 1/6 of the time if you roll it many times. Of course, if you make only 12 trials, you are very likely to find three instances of a particular number and only one or none of another. The 1-out-of-6 expectation starts to get accurate only for a few hundred rolls at least. And here is a key point. If you roll a 2. How likely is it that the next roll will be a 2? The same as the first time, 1 out of 6. But we don't think that way, which leads to all kinds of grief at the craps table! We think a 2 is less likely than it was the first time. Not so.

In weather, expectation works a bit differently. Weather systems are not usually solid lines of rain clouds, but storm cells with space between. If an advancing storm front is made up of storms 3 miles wide with 2 miles between them on average, then the 60% chance of rain really means there is a 100% chance of rain over 60% of the area. (Dr. Ellenberg doesn't state it this way. This is my example)

There is a very entertaining chapter on the lottery, and how certain lotteries can be beaten. But don't expect a how-to on getting rich at your state's expense. When a lottery is ill-conceived enough to be beaten, you still might have to fill out half a million lottery tickets to take advantage of the odd statistics, and thus risk half a million to a million dollars in the process. And there is always a chance that every one of those tickets will be a loser, even though if you play that lottery several times you are certain to come out ahead. There are easier ways to make a buck, for certain! Being the Baltimore stock broker, for example, if you don't mind exile at some point. But lotteries can be thought of primarily as entertainment for imaginative people, and as a tax on folks who can't do math. The state takes 30%-40%, so they only pay out 60-70 cents on each dollar taken in.

Fourth is "Regression", and this word has two meanings. One is a formal process of figuring out the best line to cast through a set of points that are correlated, but not perfectly so. One chapter talks about this kind of regression, but the main point in this section is that extraordinary results are usually not followed by more extraordinary results. The classic example is adult height in a family. Suppose a couple are both extra-tall; the man may be 6'-4" and the woman a 6-footer. Average heights in America are 5'-10" for men and 5'-4" for women. Knowing only this, if the couple has four children, when they are grown, do you expect all four to be extra-tall? While there is some chance that at least one boy might exceed the father's height, it is most likely that the four will be taller than average, but not extremely tall. Conversely, if a man and woman are very short, their children will also probably be shorter than average, but it is unlikely that they will be even shorter than their parents.

This is called Regression to the Mean. Human height is partly driven by genetics, but also partly by dietary factors, and partly by chance such as getting a disease that stunts growth, or conversely over-stimulates the pituitary leading to extreme height. There are numerous factors that influence height, and they are more likely to average against one another than cause additive extreme results. It is the same for sports performance. A basketball player who usually hits 55% of his free throws may hit his first 3. Does that mean he is likely to have a 100% season? Nope. There's that straight line again. We actually see that most ball players do better in the first half of a season than the second half, from a combination of tiredness and injuries coming in later on. Yet a few players will "rise through the months". Bookmakers make a lot of money from bettors who don't think through these things. In fact, a great principle is stated in a chapter on gambling: If you find gambling exciting, you're going about it wrong. Those who do best at gambling actually gamble the least. They find ways to make the largest number of sure bets and the fewest number of risky bets. You might want to read a book by Amarillo Slim on the subject before your next casino visit.

The final section is "Existence". Pundits predict a lot of things. It turns out, and clear numerical examples demonstrate, that such things as "public opinion" seldom exist. Voting seems a straightforward matter. It is, when there are only two candidates in a race, or only a yes/no question to be decided. Add a third choice, and it all goes out the window. Some lawmakers were wise enough to require a run-off election where no candidate gets a clear majority in a race with 3 or more. But even this doesn't guarantee you'll really get "the people's choice", and several entertaining examples, some historical and some theoretical, show what that means. Suffice it to say that, like the 3-body problem in astronomy—which is unsolvable!—3-way political races are impossible to craft into a perfect system. Just ask Al Gore…

The "power of mathematical thinking" is at its root a call to back off and think more broadly than a subject at first appears. For example, recall the tall family mentioned above. Suppose I told you an additional fact, that both the man and his wife were the tallest of several siblings, and the only one in each family who was taller than their parents? Would that change your estimate of their children's heights? If it would, you are thinking in a more Bayesian way, which isn't a bad thing at all!

And I find that I've written so much without looking at a single one of the pages I'd dog-eared. I like it when an article flows. Good way to start the year.

No comments:

Post a Comment