# Helping kids understand the math of unfair algorithms – inspired by a Cathy O’Neil talk

Last week I saw Cathy O’Neil talk at Harvard:

Part of the talk was on how algorithms – and black box algorithms, in particular – can create unfair outcomes. O’Neil goes into this topic in much more detail (but also in a very easy to read and understand way) in her book Weapons of Math Destruction.

The talk was part of a conference honoring Harvard math professor Barry Mazur who was O’Neil’s PhD advisor. At the end of the talk one of the questions from the audience was (essentially): What can someone who has a focus on academic math do to help the public understand some of the problems inherent in the algorithms that shape our lives?

O’Neil said (again, essentially) that a good approach would be to find ways to communicate the mathematical ideas to the public in ways that were not “gobbledygook.”

Although I’m not an academic mathematician, this exchange was on my mind and I decided to try out a simple idea that I hoped would help the boys understand how small changes lead can lead to very unequal outcomes. There are no equations in this project, just our new ball dropping machine.

First I asked to boys to look at the result of several trials of the machine dropping balls and tell me what they saw. As always, it is really interesting to hear how kids describe mathematical ideas:

Next I tilted the board a bit by putting a thin piece of plastic under one side. I asked the boys to guess what would happen to the ball distribution now. They gave their guesses and we looked at what happened.

One nice thing was that my younger son noticed that the tails of the distribution were changed quite a bit, but the overall distribution changed less than he was expecting:

I’m sorry this part ran long, but hopefully it was a good conversation.

To finish up the project I tried to connect the changes in the tails of the distribution with some of the ideas that O’Neil talked about on Thursday. One thing that I really wanted to illustrate how small changes in our machine (a small tilt) led to large changes in the tails of our distribution.

I hope this project is a useful way to illustrate one of O’Neil’s main points to kids. Algorithms can create unfairness in ways that are hard to detect. Even a small “tilt” that doesn’t appear to impact the overall distribution very much can lead to big changes in the tails. If we are making decisions in the tails – admitting the “top” 10% of kids into a school, firing the “bottom” 10% of employees, or trying to predict future behavior of a portion of a population, say – that small tilt can be magnified tremendously.

It may not be so easy for kids to understand the math behind the distributions or the ways the distributions change, but they can understand the idea when they see the balls dropping in this little machine.

# When is proof appropriate?

Got this question on twitter last night:

It was a nicely timed question because I had just talked through two problems that had given the boys trouble earlier in the day. Each of the problems essentially asked the kids to find the largest / smallest solution to a specific problem. Both times the boys were able to find a single solution, but weren’t really sure if the solution they had found was the largest / smallest.

I think that Cathy O’Neil’s piece about what math teaches you applies to the situation my kids were struggling with yesterday:

Mathematicians know how to admit they’re wrong

This piece helped me understand one way that mathematicians see the world that is different than the way most non-math people see the world. In fact, the idea she lays out here is probably one of the most important things that I’ve come to understand in the last couple of years:

To be a really good mathematician you need to be a skeptic and to walk around with a metaphorical gun to shoot holes in other people’s arguments. Every time you hear a reasoned explanation, you look for the cases it doesn’t cover or the assumptions it’s making.

And you do the same thing with your own proofs to help yourself realize your mistakes before looking like a fool. Because putting out a proof of something is tantamount to asking for other people to shoot holes in your argument.

I obviously don’t know the right age to introduce formal proof, but what O’Neil explains in the next paragraph is one of the beginning features of proof / mathematics that I’m trying to work on a little bit with my kids:

For that reason, every proof that one of these young kids offers up is an act of courage. They don’t know exactly how to explain their thinking, nor do they yet know exactly how to shoot holes in arguments, including their own. It’s an exercise in being wrong and admitting it. They are being trained to get shot down, to admit their mistake, and then immediately get back up again with better reasoning. The goal is to get so good at being wrong that it doesn’t hurt, that it’s not taken personally, and that it’s even fun to be wrong and to improve your argument.

So, with that introduction, here are the two problems.

First up my older son talking through Problem 23 from the 1997 AJHME

This problem asks you to find the largest numbers which has two specific properties. It is hard for him to see that any number than 17 meets the requirements and it takes a while, in O’Neil’s language, for him to see how to shoot holes in the 17 argument.

Next is my younger son talking through a problem from an old MOEMs test. This problem asks for the lowest possible value of a high score. Working during the day he found several different possible values of the high score, but struggled to find a way to determine the lowest value. Working through the problem in the evening, he finds a really nice way to explain the problem:

So, I don’t have the slightest idea what the right age to introduce proofs to kids, though I’m pretty sure it is older than 4th and 6th grade! I do, however, really like the ideas about proof from Cathy O’Neil’s post I linked above. Working on explanations and working on a little bit of skepticism about their own work seems like a nice way to help them start down the path to understanding mathematical proofs.

# Cathy O’Neil on Trig

Cathy O’Neil published this awesome piece about trig on her blog yesterday:

Fuck Trigonometry

It created quite a conversation. Yay!

Her husband’s comment at the end of the post caught my attention and I spent most of yesterday sort of daydreaming about his point:

When I mentioned my hatred of trigonometry to my husband, he countered with an argument that wasn’t mentioned so far. Namely, that we have really no reason to teach high school kids any given thing, so we just choose a bunch of things kind of at random. Moreover, he suggested, if we remove trig, then meeting people at an airport would just elicit some other reason for hating math. We’d be simply replacing trig with some other crappy topic choice.

I think I’m leaning towards agreeing with him. I’m certainly not sure I could make a convincing argument about why trig *needs* to be taught. In fact, with 3D printing and maybe even Zometool sets becoming cheaper and easier to find, my vote would probably be to try more fun geometry projects before diving into trig. Our Gosper curve project, for example, is something that I think kids would find more entertaining that trig identities:

Exploring the Gosper Curve

The passion in the conversation around Cathy’s post also surprised me a little – I didn’t realize that so many people had such strong feelings about trig! Most of the internet math flame wars I see are about addition or fractions – watching people fight about trig was so refreshing 🙂

Thinking back to my high school trig class with Mrs. Kovaric yesterday I honestly couldn’t remember really having any strong feelings one way or another. Without any strong opinions to fight about (ha ha) I started thinking about some fun math ideas related to trig that I’d learned either in high school or in college. Not reasons to teach trig, for sure, but definitely more fun than memorizing identities!

(1) The Extended law of Sines

One idea everyone sees in trig class is the law of sines – in any triangle ABC, A / Sin(A) = B / Sin(B) = C / Sin(C). Pretty neat relationship, but if these three expressions are all equal to each other is their value special? Turns out that it is:

(2) Stewart’s theorem

This is a cool theorem which gives the length of a line segment from a vertex of a triangle to the opposite side. As with the extended law of sines, this theorem is something that I found in Geometry Revisited in high school. The proof (that I know) involves the law of cosines:

Also, the law of cosines came up in a surprising way in an introductory geometry talk I had with my older son this past school year. This conversation was an unexpected (to me) way that you could talk about the ideas behind the law of cosines in geometry class:

When we accidentally derived the law of cosines

(3) The sum of the inverse squares

Using the Taylor series for Sin(x) and the fact that the roots are integer multiples of $\pi$, you can prove that:

$1 + \frac{1}{4} + \frac{1}{9} + \ldots + \frac{1}{n^2} + \ldots = \frac{\pi^2}{6}$

It was incredibly cool to learn that there was a known formula for all of the inverse even powers (solved by Euler in the 1700s, if I remember right), but that a closed form for the odd powers greater than 1 was not known. This is a neat example of an unsolved math problem that high school students can understand and even play around with a little. I’ve always hoped to see a closed form solution for the sum of the inverse cubes.

Another fairly famous trig-related sum problem that blew me away in high school is this incredible sum:

Let $x_n$ be the $n^{th}$ positive solution to the equation $x = Tan(x)$. Find $\sum \frac{1}{(x_{n})^{2}}$

The particularly amazing thing about this problem is that you can find the sum even though you can’t write down a closed form for any of the expressions that are in the sum!

(4) A surprising integral

I went to college planning on majoring in aerospace engineering – that’s what you do with math, right 🙂

Sitting in an introduction to complex analysis class my freshman year, I ran across this interesting little problem:

Seeing this problem made me want to major in math rather than engineering – it was absolutely amazing to me that $\pi$ and $e$ could be connected in such a seemingly mysterious way.

(5) Circles on a sphere

This one is the one and only time that I’ve used trig directly at work (probably more than 10 years ago, though I don’t remember the exact timing).

One of the guys in our office who thinks about hurricane insurance had a list which gave the latitude and longitude of the center of every hurricane that hit North America for the last 50 or so years. The list had coordinates for the center in time increments of 6 hours. The question he wanted to answer was relatively simple: given a specific latitude / longitude (say Miami or New York City, or something) how many Hurricanes had come within a given distance of that city (50 miles, 100 miles, . . . .).

He’d tried to write a really quick and back of the envelope program to answer this question but it was giving answers that seemed really wrong. To calculate distance correctly you need a little bit of trig because you have to factor in how far north you are. Adjusting the distance formula for a given latitude helped him get to the right answer. There were a few other little math-related tricks in the program, too, such as checking whether or not the path between two points came within the desired distance even if the endpoints were outside of the distance. Without trig, the distance calculations in this project were easy to get wrong.

Anyway, not a list of reasons to teach trig, but rather just a few fun trig-related things that Cathy’s post got me thinking about. Hopefully slightly more fun than memorizing identities 🙂

Although if you’ve made it this far and do like trig identities, though, a recent Terry Tao post should be right up your alley:

A “cute” differentiation identity

Cathy O’Neil and Numberphile have two really great posts about math today.

O’Neil first:

Don’t know if WordPress will preserve the link from Twitter or not, so just in case here a direct link to the post:

Billionaire money in mathematics

One point that really struck me is this paragraph:

“My suggestion is that we should think about representing ourselves in this PR campaign, if we have one to wage, and we should focus efforts on things that would improve NSF funding instead of getting us addicted to private funding. And it should be a community conversation where everyone participates who cares enough.”

Next is a great video interview of Ed Frenkel by Numberphile on the subject of why people hate math:

This fantastic interview is here:

This whole video resonates with me – I wish we could put the whole world on pause for 10 minutes for everyone to watch it!

Maybe I’m must looking more carefully these days, but I’m happy to see a growing number of great public advocates for math.  Cathy O’Neil, Ed Frenkel, and Numberphile are among my favorites.