# Ballparking

This page has a collection of resources from a talk given by Stuart Reges and Whitaker Brand at the 2017 CS4HS workshop at the University of Washington.

There seems to be an increasing awareness that it is important for students to be able to make what are known as back of the envelope calculations or ballparking. This fits in with a general goal of developing number sense on the part of our students. Having students work on ballparking exercises in groups is also a useful way to encourage what are sometimes referred to as the 21st century skills of collaboration, communication, critical thinking, and creativity.

An influential computer scientist named Jon Bentley wrote about this in a column he used to write known as Programming Pearls. The full column is available in pdf format and is also available as a web page. Engineers have long known of this kind of problem as a Fermi problem because the physicist Enrico Fermi felt that it was essential for engineers and scientists to develop these skills (see, for example, this list of Fermi problems). The NY Times bestselling book Superforecasting: The Art and Science of Prediction by Philip Tetlock and Dan Gardner also discusses the usefulness of solving such problems.

Stuart mentioned that he often uses a tool developed by his colleague Marty Stepp to "shuffle" a list of names. This can be used to assign groups or to randomly pick people to win prizes or to be called on in class. Anyone can use the tool. It is available on this page.

Here are some sample questions we discussed:

- How many molecules are there in the human body?
- How many gas stations are there in the US? (Microsoft interview question)
- How many hotels are there in the US? (Google interview question)
- How many cows are there in Canada? (Google interview question)
- How long would it take to sort 1 trillion numbers? (Google interview question)
- How many golf balls can fit in a school bus? (Google interview question)
- How many flights leave SeaTac airport every day?
- How many piano tuners are there in the entire world?
- How many slices of pizza do college students in the US consume each month?
- How many contestants have appeared on the TV show "The Price is Right"? In other words, how many times has the announcer on that show told someone from the audience to "Come on down."

Our colleague Hélène Martin reports that colleagues at Garfield got some interesting results from a challenge asking students to approximate the amount of candy in a jar. The handout is available here.

Stuart mentioned that his favorite estimating trick is that:

2There are many computer science algorithms where the number of steps performed for an input of size n will be approximately equal to the log^{10}≈ 10^{3}

_{2}(n). So for a thousand items, it takes 10 steps. For a million, it takes 20. For a billion, it takes 30. For a trillion, it takes 40. And so on. We like that kind of behavior where you have a small number of steps to perform even when the numbers get very large.

Bonus challenge: Stuart posed a related challenge. Suppose that you were stranded on a desert island and you wanted to have a log table. Not a physical table made out of logs, although that would seem more practical. We want a table showing the logarithm in base 10 for the numbers 1 through 10. If you didn't have a calculator or computer or slide rule or math book with you, how could you compute the logs in base 10? Two are really easy (the logs of 1 and 10). And one of them is easy given Stuart's favorite approximation mentioned above. And how do you get the others? Hint: the number 7 isn't very friendly (old math joke: Why is 6 afraid of 7? Because 7 8 9), but the square of 7 is your friend if you're thinking about approximations (what is it close to?). Stuart's answer can be found here.

Computer scientists are more oriented towards integers and powers of 2, but a
lot of people care about real numbers and natural logarithms. Another
interesting approximation that can be used for powers of *e* is that:

Interestingly enough, since this relatese^{3}≈ 20

*e*to a number involving 2 and 10, you can use this approximation in conjunction with the other one to do all sorts of computations.

Stuart Reges