Monday, May 30, 2011

Mental Math: My Calculus Story

Here's an interesting quote from an even more interesting article about mental math (HT: Mark Thoma)
But the mental arithmetic gap has more subtle implications. Mental calculations often require intuition about, and comfort with, the use of fractions. Pre-calculator: 1/3+1/3=2/3. Calculator era: 0.3333....+0.3333....=0.6666.... Pre-calculator: "To multiply by twenty-five, divide by four and add two zeros (25*Y=1/4*100*Y)" Calculator: Multiply by twenty-five. Back in the day, fractions were easier than - or at least not much more difficult than - decimals. Calculators make fractions obsolete.
This is an interesting point that reminds me of my high school calculus class. When I took calculus, it was the first year that the class was taught using fancy TI-92 calculators. Because of some grant or benefactor, the teacher had enough fancy calculators for everyone to use and we were required to "work" some problems using the calculators.

I didn't like this policy one bit because I had my own less-fancy calculator (TI-85), which was a mere three years old at the time. Even though my calculator wasn't the most state-of-the-art piece of equipment, it seemed like such a waste to use a school-provided calculator when I had my own. I took it as a challenge to myself to figure out how to produce all of the plots, limits and calculations we had to perform using the calculator.

Because my calculator was less than ideal for this purpose, I had to learn calculus better than my classmates to figure out how to get the right answer. This is because we were given step-by-step instructions to use the TI-92 calculators. To use my inferior calculator, I had to convert the TI-92 instructions into math concepts and then figure out how to implement those concepts on a foreign piece of technology. I learned a lot about calculus in the process.

From this story, I think there are two observations to be made. First, calculators can spell doom for learning if they are misused in the classroom. Had I followed the leader to the TI-92, I could have avoided learning calculus whenever the problem involved (or allowed) the fancy calculators. Second, calculators can be extremely beneficial to learning if you use them the right way. I learned quite a bit about calculus when I had to translate the instructions out of TI-92ese into mathematics. I also learned quite a bit when I translated back from mathematics into TI-85ese. If this was part of the curriculum, everyone in my class could have benefited from having to be a translator of calculus.

Based on my calculus story, I take the linked article to be more of an indictment of mathematics teaching methods than an indictment of the calculator itself. It's true that many people have come to use calculators as a crutch and using calculators as a crutch crowds out alternative, beneficial ways of thinking. That said, new pieces of technology open up new possibilities for learning (i.e., being a calculus translator) that we couldn't imagine before the technology existed.

Sunday, May 29, 2011

A Simulation of a Card Trick

Following up on a thought-provoking post by Xan entitled All roads lead to science, I thought it would be interesting to run a simulation of the card trick he described. Here's Xan's description of the card trick:
  • I put a deck of cards down face up on the table. Meanwhile you think of a secret number between 1 and 10 -- for exposition let's say you pick 4.
  • One by one, I discard cards from the top of the deck. When we get to the 4th card -- and let's call it your special card -- you look at the number. For exposition, let's say your special card happens to be a 7. Then 7 secretly becomes your new number. Note that I don't know your special card.
  • I keep flipping cards, and 7 cards later, you have a new special card and number yet again. Note that I still don't know your special card.
  • This process continues -- me flipping cards at a constant rate, you secretly updating your special card and counting up to the next one -- until I decide to stop.
But I don't just stop on any card. I stop on your current special card. Which I'm not supposed to know.
What's the trick? After a while, your initial choice of secret number doesn't matter for what your current secret number is. This is because the sequences of secret numbers will eventually overlap (by chance). After this point, you would have the same secret number sequence because you follow the same rules. For this reason, the magician can pick his own secret number and follow the same process as you, eventually following the same sequence of numbers as you.

To verify how robust this logic is, I wrote a little program in R to simulate this process on a randomly generated deck of 150 cards. In the plot below, each pane is a different ordering of the 150 cards. Within each pane, there are 10 line plots that tell how many cards until it is time to update the secret number (one lineplot for each initial secret number).

In each simulation, the secret numbers start out quite different, but after about 100 cards or so, the secret number is the same regardless of where you started. In I playing around with a couple of different runs of this program, there is the possibility that you could end up in a different place after 150 cards (I found one set of cards for which this was true within 2 minutes of playing), but this is usually a lingering possibility that would vanish if we expanded the number of cards.

Even so, the problem with nonconvergence in these special cases is usually that one starting point doesn't conform to the others (yet). Even in this case, the magician's probability of being on the same sequence as you is significantly better than 1/10.

Cards and Exams

What do the topics of empirics versus theory, unveiling the mystery behind card tricks and exam-taking strategies have in common? Xan explains in an interesting post. Here's an interesting quote from the post:
I suppose it's an obvious point, in its many forms. Even when an exam seems to test rote memorization -- say by requiring students to reproduce proofs they've seen before -- it is far easier to "memorize" things when you understand the underlying logic. So it can still separate people out on the basis of their understanding. (Of course there can also be a pooling equilibrium where everyone gets everything right, and so forth).
This post plus all the linked posts are worth a read (and ponder).

Wednesday, May 25, 2011

Correlation is not Space Exploration (or is it?)

I was intrigued by Justin Wolfers' post about the new data mining tool, Google Correlate. Apparently, it works well, so I had to give it a try. My data? Weekly advertising revenue from my YouTube channel.

Needless to say, I was confused when I first read the results.

What does the cost of space exploration have to do with my economics YouTube channel? I have a video on cost minimization, but that's not quite space exploration. Of the top 20 correlated series (all with a correlation exceeding 0.826), three seemed tangentially related to my channel's content: fungible goods, assumptions of anova, and critical region statistics.

But, there was something oddly specific, obscure and intense about these keywords. Someone who searches these keywords is looking for knowledge and understanding -- perhaps for a report or an exam.

As an alternative, it is fun to see the flip side. The search terms have an entirely different flavor when we look at what is most strongly negatively correlated with my YouTube revenue (just by multiplying the column of data by -1).

Funtastic. I will have to play more with correlations like these. Expect more in the future.

Tuesday, May 24, 2011

When Half isn't Half (Or Why Judges Give 10s on the Final Night)

While watching tonight's finale of Dancing With The Stars, I noticed that the judges were being more lenient than usual. All three finalists received straight 10s and no sharp criticism. Even in the finals (the show before the finale), the judges scores were more compressed than usual.

Better Dancers Make it Farther. Or, each dancer improves enough as the season goes on that everyone is essentially the same skill level by the end. This is the simplest explanation. You start out with a wide distribution of talent and it compresses as the worst get eliminated and as the non-eliminated become better dancers. Naturally, this will lead to the judges scores rising over time and compressing.

That said, to my untrained eye, the judges were more lenient for a given quality of dancing. Tens are rare before the finals, but they're commonplace on the last week. Why be so lenient? I think it is mostly a combination of two factors.

Don't Rock the Boat. By the final week, judging cannot realistically provide feedback for future performances. As providing detailed nitpicks about the contestant's footwork isn't going to have the payoff for next week, the judges can relax and watch the show. Carrie Ann Inaba even said she forgot "she's supposed to be judging." No nitpicks ==> No demerits ==> Higher scores for everyone.

Let the Fans Decide. Consider some simple math. Half of the score is from the fan vote. The other half of the score is from the judges. This makes it sound like an even split, but it is not. If the judges give the same score to everyone, the only score that matters is the fan vote. More generally, the fan vote is more important because it varies more across contestants than the judges score does. By giving all of the contestants the same score (or even approximately so), the judges are effectively giving more discretion to the fans about who ultimately wins the dancing competition.

This last point shines light on how each season of DWTS proceeds. The judging math ensures that judges scores compress as the weeks roll on. As a result, the judges are never more important than on the first night and never less important than on the final night. What's the consequence? On Week 1, the show is about dancing more than it is about entertainment. On Week 10, the show is almost entirely about entertaining the television audience. If you like dancing entertainment, it is about the right formula for an entertaining program.

Saturday, May 21, 2011

An Interesting Bargain

This was from a contest from almost four years ago, but I found it to be a highly amusing strategy to bargain for extra time on earth:
So this particular joke wouldn’t guaranteee Mr. Vongsathorn a 150th birthday. Still, he’s identified a smart strategy, particularly in his additional suggestion to write a story instead of a joke. As he explained it in a follow-up email: “Create something like a book, but deliberately postpone finishing it. You have to actually not decide the ending. Because even when your brain has the creative potential to make something, it doesn’t really exist in a consumable, enjoyable form until you’ve actually made it. And that is what leaves the Prime Designer wondering what comes next.
If the Prime Designer goes for this strategy, what is keeping Xan from using it again at age 150 to guarantee an extra year of life? If nothing, what would ever bind Xan to divulging the punchline? And, presumably the designer knows this. I won't launch into a long post about credible commitments, but striking this bargain credibly seems to me to be the tricky part.

Monday, May 16, 2011

Agreement Manku

I agree with Paul
Such a mistake to target
volatile prices.

Or, in the actual words of Greg Mankiw,
As my regular blog readers know, Paul Krugman and I often do not see eye to eye. So, once in a while, it might be useful to point out those times when we actually agree.

In a recent post on commodity prices, Paul says, "Volatile prices are volatile, which is why they shouldn’t be used to determine monetary policy." I agree, and I suspect many other macroeconomists would as well.
I hear he likes haikus. I do too.

Sunday, May 15, 2011

Magic Maps

My friend Evan Miller (whom you may remember from posting about Groupon) recently wrote what looks to be an awesome data visualization program called Magic Maps. For a taste of what it can do, check out this video tutorial.

That program will only set you back $19.99 at the App Store. If I had a Mac, I would definitely be a customer. You can investigate further on Evan's product website here.

Thursday, May 12, 2011

Building Wealth Through Renting

This is a nice post that pushes against the conventional wisdom that building equity through home ownership unambiguously dominates renting. Here's my favorite quote from the article:
Living somewhere is always going to involve costs, just as education, health care and food involve costs. Financially, the decision to buy is basically a decision that your investment will increase in value by an amount sufficient to make up for all the additional costs of buying. (Put it this way: you’d never buy an apartment if you were staying in a city for just a week, in an effort to build equity. You’d rent — a hotel room.)

Thursday, May 5, 2011

"This is a paper about nothing"

Abstract in the title, paper here.

For some of the video inspiration behind the paper, here's trailer of clips from the show about nothing:

The abstract is shorter than a previous record holder for shortest abstract.