Showing posts with label math. Show all posts
Showing posts with label math. Show all posts

1.28.2010

The numbers don't lie. Except when they do.

On The Rachel Maddow Show today, they did a cute little segment where they played a fake game show called Pin the Debt on the Donkey whose purpose was to point out that Republican presidents in recent history have added much more to the national debt than Democratic presidents. To that end, they showed this graph.



I don't want to argue about this from a political standpoint, or imply that Rachel Maddow's staff got the numbers wrong* or anything like that. My issue with this graph is that the way the graph is designed deceives you into thinking Reagan spent way way more than anyone else. It's the kind of simple misunderstanding of math that Good Math, Bad Math is all about. First of all, some of these presidents were in office for 4 years, and others for 8. They put this in the "fine print" so to speak, but this is a graph! The point is to show information visually. They could have used the average increase per year, which is also readily available on PresidentialDebt.org. That graph would look like this:



(Sorry it doesn't look as fancy as Rachel's. Upper Harmonics' graphics department consists of, well, me and OpenOffice.org.) In this graph, things look a little more balanced, and you could argue that if Carter and Bush Sr. had gotten a second term, they would have increased the debt by about as much as they did during their first term, so it's a little more fair.

I don't think this is the biggest issue though. The real problem with this graph is that the numbers are percentages, not absolute numbers. This would be of no consequence if they were percentages of the same thing. But each number is a percentage of the national debt at the start of that president's term. So if you happened to be president after someone who (as Rachel points out) nearly tripled the national debt, you look much better in comparison. Not just because you're being compared to someone who spent a lot of money, but because your spending is being reported as a percentage of a higher number. If we look at each president's debt increase in actual dollars (actually, trillions of dollars), we get this:



Wow! You mean the first President Bush and President Clinton actually increased the national debt by the same amount? Yup. And both of them increased the debt by just a little less than Reagan did? Yes. But that's not really fair, you say. Clinton had two terms, and Bush only had one. Okay, let's look at each term, rather than each president, shall we?



This still illustrates the general point Rachel Maddow was trying to make: The worst four-year presidential terms of national debt increase in recent history were mostly during Republican administrations, and the best were mostly during Democratic ones. But I think the graph they chose to create didn't show the whole story as clearly as it could have.

You don't have to be an economics or math major to understand this. This is very simple math. A given amount of money may be a small percentage of one value, and an enormous percentage of another value. Comparing percentages the way they did on the show distorts the facts.

To be clear, I don't think Rachel Maddow or her staff were intentionally deceiving anyone or trying to distort the truth -- it sounds cliche but I'm really not trying to make this into a politcal thing. I suspect they just took the five easiest-to-spot numbers off of PresidentialDebt.org and quickly threw them onto a graph. So some of the blame should lie with that site, which made those numbers a bit more prominent than they should have been.

* Although, they rounded Bush Sr.'s number from 55.6% (direct from PresidentialDebt.org) to 55%. We could argue about the .5 rule all day, but I think we can all agree that 55.6 rounds to 56, right? Also, during the segment, she says George W. Bush grew the national debt by $4.9 trillion. The number is actually more like $5.04 trillion, which I assume is due to another rounding error. Either that or they got that number from another source that uses the actual inauguration days, instead of the end of the year, as the delineation between presidencies.

5.12.2008

Writing "code"?

My friend from freshman year, Elliot, has recently started a new blog, Anyone Can Code. I guess he's going to teach some programming courses over the summer, partly because he, like me, doesn't like the way most of the courses he's taken at USC have been taught. And because he believes that, well, anyone can code.

His first post on the Anyone Can Code blog lamented the people who are somewhat interested in computer science, but think they can't code. I've always thought that "people who can't do math" were just people who had terrible math teachers and never took them time to learn any math on their own. There isn't really anything wrong with this, but it's now become relatively socially acceptable to know almost no math. It's also socially acceptable to know literally no coding, since most people never take any computer science classes.

I've digressed a little, but the point I wanted to make here is that perhaps referring to programming as "coding" is not good for making it accessible to the general public. Code, in everyday language, is a message which is unreadable until a person or machine performs some kind of operation on it to decode it, so that humans can read it. Back in the days of punchcards, that may have been somewhat accurate, but now writing computer programs is (or at least should be) almost the opposite. You write down what you want the computer to do, in as clear and straightforward a way as possible. Then the computer compiles or interprets it, which is when it becomes completely unreadable. But the programmer isn't writing "code". They're just writing down a set of instructions, in another language. So maybe instead of "coding," we should look at programming as writing in another language. Because that's all programming languages are--they're just languages, where the rules of grammar must be followed much more strictly than in languages like English or Spanish.

Oh great, you say, so coding is just like learning a language, except with even more emphasis on grammar? Sounds lovely. Well yes, but there's very little emphasis on learning new vocabulary. In fact, most of the important words in most languages are actually words you already know. And the grammar rules are much clearer and completely unambiguous, especially in languages like Ruby and (from what I hear, although I haven't used it myself) Python, which were deliberately intended to be easier to use. I think Elliot is right that anyone can code. It doesn't mean everyone will find it fun. But if we stop thinking of code as "code," perhaps everyone will be able to do it.

1.20.2008

Spring Semester 2008

There's no better way to celebrate surviving the first week of class than going directly into the first three-day-weekend of the semester. And no better way to spend a Sunday afternoon on such a weekend than to blog about that week. These are my classes for the semester:

MATH 445: This class is going to be all about partial differential equations and such, but so far all we've done is Fourier analysis, which allegedly is an important step towards solving PDEs. My favorite parts of this class are the professor telling us that the required textbook kinda sucks, but we have to buy it anyway, and the fact that we spent almost no time on boring administrative stuff, instead diving right into Fourier series, deriving the formula for it, and then proving it converges, all in three lectures. For the first time in a USC math class, the homework is actually required, but there's none assigned yet.

EE 101: Very low-level digital logic stuff. Binary representations of numbers, and gates, or gates, etc. The "textbook" for this class is a course reader that only cost about $18, and since everything so far is fairly trivial, I've been reading ahead about how to build multiplexers and adders and such. Seems like this is going to be an easy A.

MUEN 308: Men's choir. I did this last spring, but I've never done it in the fall. I guess this is a pattern that could continue to work: Band in the fall, choir in the spring. Anyway, the director is redoing some pieces from last semester, which puts the new people (there are about five of us) a little behind. This was fun last year and it's looking like it will be fun again this year.

PHIL 262: This is my category I GE. The title is something about "Mind and Self." Since this is a philosophy class, I was worried it would be a little like this. And it might be, but I'm very optimistic about it, at this point. The professor told us we can call him Jake. "You do NOT need to call me Professor Ross. My father was Professor Ross. Well, my father wasn't a professor, but if he had been, then he would have been Professor Ross." What's more amazing, he actually listens when students ask questions, instead of assuming he knows what they're going to ask, then going on and on about something unrelated. Again, it's only the first week, and we've already examined five alleged "proofs" for the existence of God. Not an easy A, but it should be interesting.

CSCI 101: I had already heard from my friend Greg, who took this class last semester from the same professor, that the professor wouldn't be all that great, and it's looking like it's going to be a few weeks before we get into anything remotely challenging. Eventually, I might learn something, and it looks like another easy A.

Basketball Band: Another semester of Tony Fox. Joy. This week, we recorded this Foo Fighters song for some youtube contest. Every other week is going to be pretty lame in contrast.

Concert Band: This year's show is all Broadway songs, so I couldn't really pass this up. Still, I feel like the music is way over my head, so I'm going to have to practice a lot. Apparently, I'm allowed to reserve PIC rooms since I'm officially in this class, even though I'm not a music major. This could end up being a really rewarding experience.

Overall, I'm pretty excited about this semester, and I'm fairly confident that my GPA will go up when it's all over.

12.19.2007

One Small Step, I

There are only a few TV shows that I watch regularly, and most of them aren't showing new episodes right now, due to the writers' strike, or other reasons. So I've been watching some other things instead, including Star Trek: Voyager, because Spike TV shows it at a time when there's not much else on. The episode I watched today ("One Small Step") was about the natural desire to explore.

Quick summary: The crew encounters a strange and dangerous "spatial anomaly" which simply appears out of subspace. They realize the anomaly is probably the same one that caused the mysterious disappearance of the Ares IV ship and its commander, John Kelly, way back in 2032, during one of the Mars missions. They send the Delta Flyer inside the anomaly, where they find the entire Ares IV, basically intact, along with the debris of many other ships that have been swallowed up over the centuries. Everyone wants to go get the Ares IV, because it's such an important part of history, except Seven of Nine, who repeatedly insists that "History is irrelevant" and the mission is too dangerous. In the end, Seven herself ends up beaming aboard the ancient ship, and finding a wealth of data and video logs, recorded by John Kelly, from inside the anomaly, which have never been seen before by anyone. The entire crew, discovers that John Kelly, like themselves, was willing to risk his life in the name of collecting data and learning more about the universe. Seven discovers her own humanity as well, and begins to recognize the value of history, and of exploration for the sake of exploration.

Typing it out like that makes it sound a little corny, I admit. But the episode is basically about the natural human urge to explore the world, to seek out new civilizations, to boldy... well, you get the idea. At the risk of reading into it a little too much, the title is obviously meant to remind readers of a time not too far back in our own history, when the public's desire for space exploration was greater than it is now. (Or in 1999 when the episode was aired.)

Of course, there are good reasons for opposing space exploration, but I think the desire to explore is definitely lacking. And this isn't just about space. Any time you take a class, or even talk to a new person, it's an opportunity to explore something new, and many people don't see classes that way. Classes, it seems, are about getting good grades, rather than being an opportunity to inspire a sense of wonder in yourself.

Professor Bickers likes to inject a little of the history of physics into his lectures. You might call it a digression, and sometimes it is (Super-Professor! Able to leap from Coulomb's Law to the Grand Unified Theory, to Bose-Einstein Condensates, in a single aside), but I think it also gives you an appreciation for the process of science, and what you can achieve with two simple words: "I wonder..."

For example, this last semester, in Physics 162, he made a big deal about what he likes to call "the punchline of the course" how the Maxwell equations predict the propagation of electromagnetic waves, and how the speed of light "pops out" of the equations automatically. Sure, not everyone is going to be excited by that, or even have any desire to understand it. But the point is that Maxwell figured out there was a single missing term in one equation, and in doing so, he answered a very fundamental question about the universe: What is light?

It makes you wonder. Perhaps there's some equation now that's taken to be true, and is reprinted in textbooks all over the world, but anyone who's curious enough could come across it, and notice that it's not quite right, and develop a whole new theory. If your goal is just to memorize things and get a 4.0, this probably won't happen.