Jose Drost-Lopez

Archive for the ‘Math’ Category

Gladiator 5k pits young against old, men against women

In Math, Personal on June 2, 2011 at 5:42 am

Gladiator 5k Race Times (secs)

Two Saturdays ago, a Gladiator 5k took place in Cary, NC. It was a foot race with a few mandatory obstacles like high walls, nets, tunnels, and a mud pit. I had good fun as a participant. Though I scraped up my knees and I was unimpressed by the puddle of water designated as a “mud pit,” the thrill of leapfrogging 10-foot wooden walls outdid my complaints. Individual results were posted soon after the race in a big table. Though I’m not one to pore over tables, I did notice that one of the women who beat me was 42 (congrats!). I sent my mom an email to inspire her with that information. But surely I was giving her false hope? That question led me to unleash my stats software (JMP) in search of the associations between age, sex, and finishing time. I started with age:

Race Time By Age

The red line is a linear fit (least squares regression) with a slope of 3.16 seconds per year of age. Warning: since that line only explains 0.4% of the variation in race times (RSquare = .004), it really sucks at describing the data. The line would have sucked even more had I not removed three clear outliers—the slowest racers by far—who were in their 20s and 30s. So a linear model was mostly useless here; age and performance had essentially no association across competitors as a whole. If that doesn’t surprise you a bit, it should. After all, look at the ages of the competitors:

Age Distribution (n = 771)

As you can see, there was plenty of dispersion from the mean of 32.3 years (Standard Deviation = 8.4). We’re not just talking about a few fast 40-something and 50-something year-olds: Half of the 771 competitors were between 31 and 59 years of age. Somehow they fared about as well as the younger half in the 14 to 30 range, although the very fastest and very slowest racers were young. My guess is that the older group had a more athletic background than average, compensating for the mild slowing effect of aging. In fact I now suspect that in most amateur races the older competitors will have the same average speed as their younger counterparts due to self-selection effects.

Does a similar story about the compensating effect of self-selection apply to the women racers? No: the differences between the sexes were very noticeable. Here are the histograms of the female and male times, where the heights of the bars again reflect frequencies.

Female Times (N = 372, 1 outlier excluded)

Male Times (in sec, N = 395, 3 outliers excluded)

Above the bars, the median and mean are marked with a line and diamond; there was a 5 and 4 minute difference between them. I’d attribute most of that difference to physiology. The distribution for female times was roughly symmetrical whereas the male distribution was right-skewed. There are many ways to interpret this, but my tentative guess is that relatively slow men were more interested in the event than relatively slow women. This guess fits with the marketing style of the event, which emphasized toughness in a way that I think appealed more to guys. Just to nail home the idea that sex predicted performance more systematically than age, compare these two graphs (on the same scale):

Race Time By Sex

Race Time By Age Block

The red boxes enclose the middle 50% of the race times and the red middle line marks the median time. The boxes match much more closely on the right (between age groups) than on the left (between sexes). Of course, matching up box-and-whisker plots isn’t a precise business, so I sought a final verdict with the “difference value” (d), equal to the difference in group means divided by the standard deviation including both groups. For sex, d is 0.56, which Lise Eliot calls “medium”-sized. For age group, it is 0.03, which is tiny. To give some perspective, the d value for height difference between sexes is about 2.6. For scores on standardized science tests, or on evaluations of verbal fluency, d is about 0.35. Since I’m wading into mildly scandalous territory, I’ll throw in the usual caveat: differences within sexes are always much larger than differences between sexes. Only trivial exceptions come to mind (e.g., number of breasts or testicles). An additional, more specific caveat is that males and females at the race almost surely weren’t representative of the American or global population. If for some twisted reason all adults in the U.S. were forced to compete in a Gladiator 5k, I bet females could really give males run for their money in average time because a higher percentage of males are overweight.

The fun in graphing and analyzing data is that previously obscure patterns reveal themselves in fine detail. Even if this Gladiator data isn’t especially intriguing for those of you who weren’t there at the race, I hope I’ve reminded you of the power of statistics to organize information. Next time you find yourself fishing morsels out of a table, especially if that information has a personal connection to you, try graphing it!


Chasing perfection: a tale of sequential decision-making

In Math, Personal on May 29, 2011 at 2:54 am

Now *that's* my kind of piano teacher.

My grandest ‘real-life’ use of probability theory until recently was to estimate my odds in Risk and poker. Then, while skimming a math-themed book, I singled out a principle that will shape how I will spend $6,000 and about 200 hours of my life in the upcoming year. As far as the math goes, it doesn’t matter whether I’m referring to getting a girlfriend, a pet, an apartment, or a job. But at the moment I am actually picking a piano teacher. The teacher-picking theorem I have in mind is based on an oversimplified scenario that has an optimal strategy. Trying to apply it has been interesting. But before I reflect on my story, let’s glance at what the math says.

Sequential decisions

Start by imaging a series of candidates, among which we want to choose the very best. We have to assess candidates one at a time, and we have to decide whether to accept or reject them immediately after inspecting them. The candidates come to us in random order, so that the first one we assess is just as likely as the last one to be the best. The optimal strategy in this setup is to inspect about 37% (or exactly 1/e) of the candidates and then accept the next one that is better than the first 37%. This approach is optimal (i.e., mostly likely to snag the best option) because 37% of candidates is just enough to estimate which ones are exceptional without rejecting too exceptional ones.

“Sequential decision making,” as this scenario is sometimes called, first came to my attention in a psychology study. When healthy people do computerized sequential decision tasks—sometimes simulating job interviews or shopping—they tend to jump the gun. However, this study in Germany found that people suffering from depression tend to wait longer and more closely approximate the best strategy. While this line of research has interesting implications for the causes and origins of depression, my main personal reaction was a sense that I probably don’t sample enough options in my life decisions. A prime example heads off my piano story: I picked a piano teacher a two months ago by emailing a music professor I did not know and taking his recommendation. Out of 30 available teachers listed in a directory for my area, I ended up ‘sampling’ only 1/30 ( 3.3%) of them. That’s all the more suboptimal because with piano teachers I can choose earlier candidates, which justifies sampling a larger fraction of teachers than in “37% rule” I’ve described. My only defense is that the recommending professor seemed to be familiar with the candidates, so he probably ruled out some of the least compatible candidates.

The experiment

Fast forward to two weeks ago; I was now looking for a new piano teacher. Emboldened by my pet theorem, I emailed nine teachers (about 30% of my options) based on what little information I found online. It was not hard to pick four of the more interesting teachers to meet in person. I have now met three out of those four and I feel glad with my approach, but I am still making sense of the challenges involved. The main challenge is making fair comparisons. I started my search by de facto rejecting all the teachers I did not email based on little or no information; then I rejected some email respondents based on unreliable cues in their messages; and, in the final step, I made snap judgments from meetings that were subject to confounds like mood, time of day, shared expectations, and who knows what else. My two conclusions here are that (1) quality-assessments are imprecise, especially when they involve judging a match between people and (2) “counting” how many candidates have been “assessed” is subjective unless they all receive similar attention under similar conditions.

My next big hitch is about social emotions, not strategy. Specifically, my meetings so far were all at some point comically awkward, because in each case I did not want to admit how widely I had casted my net. I vaguely mentioned “considering my options” and, at most, I acknowledged meeting one other teacher. Although I don’t feel ashamed about my attempts to find a good match, I don’t want to upset teachers who might frown on my approach. After all, no one likes being compared to others or facing rejection. Thus I tried to treat each teacher as my top choice without making false promises. Looking to the future, I also wonder if more awkward situations will develop. Will any teachers gossip disapprovingly of me? Will I bump into “rejected” teachers at future recitals? These questions suggest that trying out multiple teachers has had a minor “emotional cost” for me. I imagine this type of cost could be much heavier in other choice processes like child adoption.

My final complaint with my piano teacher experiment is that it has been resource-intensive. The time and effort spent emailing, driving to and meeting people has felt subjectively like “too much.” The root of this complaint is that sequentially finding the best piano teacher in my area is not my only goal in life. I have other uses for my time, energy, and gasoline, like finding a part-time job, catching up with friends, and sleeping. Therefore I constantly have to weigh the value of finding a slightly better teacher against improving some other aspect of my life. At some point, my search is no longer worth it (economists, read: diminishing returns or increasing opportunity costs). The inevitable trade-offs we all face could partly explain, from both evolutionary and practical perspectives, why we tend not to sample quite enough alternatives to make the ‘optimal’ choice. Satoshi Kanawaza makes a related point about dating in densely populated cities like New York—at some point there are so many eligible bachelors around that meeting or speed-dating 37% of them is infeasible. We usually settle for “good enough,” and most times we have to.

Murky math and puppy paradoxes

These reflections should make clear that an idealized model of sequential decision making cannot replace mental assets such as good intuition, resourcefulness, and common sense. In spite of the apparent certainty of the “37% rule,” its most useful lesson for daily choices is vague: get a good sense of the candidate pool. In my search for piano teachers, the easiest way to scope out the field has been to contact a lot of teachers directly. But other ways to do that include asking experts or reviewers and drawing on relevant past experiences.

Unfortunately, knowing our options can be just as counterproductive as it is helpful for some highly subjective decisions. As Sheena Iyengar and Barry Schwartz are fond of pointing out, we humans are susceptible to “choice overload.” When we see too many retirement plans or job offers, we take irrational shortcuts and sometimes we feel less satisfied with whatever pick we make. For some of us (depending on culture, personality, and exact circumstances) the most adorable puppy possible is one of the first we see. If beauty is in the eye of the beholder, then the beholder is liable to get fatigued and jaded by alternatives.

It's easiest to have the puppy pick you.

It’s no surprise that marrying a mathematical theorem like the 37% rule with the complexity of human decision-making requires a laundry list of caveats. But even with the caveats, mathematicians and other logical sorts are on hand to help us if we ever get the urge to approximate “rational” thinking. The rest of the time, our unconscious brains can run a decent autopilot for us—and thank goodness for that.

(Disclaimer: I disavow myself of any responsibility, moral or legal, for terrible choices of piano teachers or puppies that result from your reading this post).