Showing posts with label Random. Show all posts
Showing posts with label Random. Show all posts

Monday, April 13, 2009

Hyperbole? Nah.

From the Citi Field opening day program:

"There was no lack of shattering news events in the year 1969. There was the Jets Super Bowl III victory, the Woodstock Festival and Concert, Lyndon Johnson leaving office and the ascendancy of Richard Nixon to the Presidency, the implementation of the first artificial heart and Neil Armstrong's walk on the moon.

But for sheer drama and surprise, nothing could match what happened on October 16, the date the expansion New York Mets sent shock waves through the baseball world by defeating the Baltimore Orioles for the World Series Championship."

Man walked on the fucking moon...but that's got nothin' on the Mets winning a World Series.

Saturday, March 14, 2009

God is Not Dead

This is a thought that just occurred to me, so I'm going to make this one quick and pretentious; I suspect my reach is exceeding my grasp, but let's give it a try anyway.

A few days ago, Jon Stewart interviewed Jim Cramer and took him to task for his, and CNBC's, failure to see the financial crisis coming; more specifically, for their continued insistence that everything was just fine when in fact, obviously, things weren't. While CNBC clearly completely failed to correctly read the economy, I don't understand why anyone would expect them to, when the investment bankers who actually had billions of dollars riding on the economy couldn't see it coming, either. I mean, seriously; if the chairmen of Bear Stearns, Lehman Brothers, AIG, et al, couldn't foresee their future bankruptcy, how could a cable channel with considerably less interest in the banks' continued health see it coming?

The truth is that no one could see it coming, and this is what people find so hard to accept. So much of life is random and unpredictable, and yet we continually insist on trying to put a framework and predictability onto it. And, so, I would say that Nietzsche was wrong when he said, "God is dead." When he said that, he meant that humans are no longer able to believe in some grand cosmic order, or overarching structure, and are doomed to resort to relativism and nihilism (Wikipedia has a good summary). However, to me, it appears the opposite is true. Humans instinctively believe there is an overarching order; when a financial crisis strikes, it seems impossible that it could not have been foreseen, and if anyone didn't predict, it must be due to their ineptitude, not to any inherent unpredictability. People are frightened by the idea of a true chaotic randomness, and continually resist it. Until they accept it, God will never die.

Friday, March 13, 2009

iTunes updated their visualizer

I don't know how long ago they did it, but my roommate and I just noticed. I figured I'd take this opportunity to point out that the absolute best iTunes visualizer song, hands down, is "Rhapsody in Blue" by George Gershwin. Try it.

Thursday, February 5, 2009

Bill Gates is crazy

Bill Gates released mosquitoes at the TED conference.

I have to say, I'm very disappointed with this news. If someone as rich and powerful as Bill Gates is going to go batshit insane, there are way cooler ways he could do it. For example, he could call a press conference and say, "President Obama, I understand the need to protect American lives from foreign threats, but this involves putting American lives at risk. In light of this, I'm proud to present you with a new combat brigade of 10,000 troops...made entirely out of butter," and then he'd pull back a curtain to reveal 10,000 soldier sculptures, each uniquely hand-crafted out of Land O'Lakes Sweet Cream.

Or he could build a gigantic airplane hangar, and pay guys to hang out there all day, firing off automatic weapons and practicing karate, and if anyone asks him what it's for, he'd respond, "To kill James Bond." If it was pointed out to him that James Bond is a fictional character, he'd say, "That's not what the Major told me."

Or he could say, "Ladies and gentleman, in the future, we'll purchase more and more consumer goods from vending machines. Ladies and gentleman...the future is now. I present to you the first gerbil vending machine."

Or he could build a complete replica of a small town from the 1950s in the middle of the Nevada desert and hire people to smoke pipes and lead normal lives working in factories and soda fountains, just like the good old days...except none of them would wear any pants.

Anyway, I think I've made my point: if Bill Gates is going to go off the deep end, he should just commit and really do it like only he can. Releasing mosquitoes is weak sauce.

Wednesday, February 4, 2009

Rock, Paper, Scissors, and Game Theory

Game theory has long been a fascination of mine, and I'm finally getting a chance to take a class on it here at NYU. We recently had a class where we found the mixed-strategy Nash equilibrium for rock, paper, scissors (RPS), and it made me curious about Nash equilibria for other variants of RPS, which are manifold.

First, of course, I'm going to have to explain some these game theory terms that I'm throwing around. The essence of game theory is exploring decision-making when the outcome of your decision is dependent on someone else's decision. When this is in a two-player game, it's often expressed through a payoff matrix, like so:



This is a payoff matrix for RPS. The left column shows the moves for player one, and the top row shows the moves for player two. The payoffs to each player are listed in the cells, with the format [Player 1's payoff, Player 2's payoff], where a 1 represents a win, a -1 represents a loss, and 0 represents a tie.

Now that we have a payoff matrix, we'll want to find an equilibrium. Specifically, we're going to look for a Nash equilibrium. A Nash equilibrium exists where both players are pursuing a strategy such that neither can improve their payoff if the other play continues to pursue the same strategy. It is obvious that there is no "pure strategy" Nash equilibrium for RPS; that is to say, there's no possible equilibrium where each player plays one move all the time. If player 1 always throws scissors and player 2 always throws rock, player 1 can improve his payoff by always throwing paper instead. However, if he does this, then player 2 can improve his payoff by always throwing scissors, and so on.

When a game has no pure strategy Nash equilibrium, we search for a mixed-strategy Nash equilibrium. A mixed strategy is a grouping of pure strategies, with a proportion assigned to each for often it should be played. In the case of RPS, there is a mixed-strategy Nash equilibrium where each player plays each strategy one-third of the time. This is intuitively unsurprising; each move will win, lose, or tie one-third of the time each.

Another variant of RPS is Rock, Paper, Scissors, Lizard, Spock, which, in an effort to reduce ties, expands upon the original RPS ("RPS Classic", I suppose) by adding in lizard, which eats paper and poisons Spock, but is crushed by rock and decapitated by scissors, and Spock, who vaporizes rock and bends scissors, but is poisoned by lizard and disproved by paper (he is fictional, after all). The payoff matrix for rock, paper, scissors, lizard, Spock is as follows:



It is somewhat more interesting than the classic RPS chart, and certainly does cut down on the number of ties (the probability of a tie is reduced from 1/3 [3/9] to 1/5 [5/25]). However, the Nash equilibrium is essentially the same as for the original RPS: both players play each strategy 1/5 of the time. It's the same game, just slightly expanded.

However, there is another five move variant of RPS that actually adds an additional strategic wrinkle: Rock, paper, scissors, fire, water. In this variant, the original rules hold, except fire beats everything except water, and water, in turn, loses to everything except fire. The payoff matrix looks like this:



The game is said to come with the stipulation that fire can only be used once in one's life time, but this is silly, as the Nash equilibrium can be shown to be, actually, each player playing fire one-third of the time, water one-third of the time, and rock, paper, and scissors each one-ninth of the time. The reason for this is that it's really become a balanced game between three actions, where the three actions are fire, water, and RPS. Fire beats RPS, which beats water, which beats fire. Each of these actions should be played one-third of the time, but "playing" RPS properly means playing rock, paper, and scissors each one-third of the time, and 1/3*1/3=1/9.

The reason I bring this up, and have made such a long blog post about such a ridiculous topic, is because I find this result to be interesting, and worth thinking about, because it is counterintuitive. While water would seem to be arguably the least valuable move, because it only defeats one other action while the other four defeat at least two actions, it actually should be played three times as often as rock, paper, or scissors, even though those would seem to do more. It is solely because the one action that water beats, fire, is the most powerful that water is so valuable move. I think there is a useful lesson to be had here when considering counterintuitive value and pricing. Unfortunately, I don't think I know that lesson yet.

Tuesday, February 3, 2009

Perche no?

In New York and Boston, the subway trains run on the right, just like the cars do.

In London, the subway trains run on the left...just like the cars do.

In Rome, however, the cars run on the right and the subway trains run on the left. I feel like that's a perfect metaphor for Italy.

Saturday, January 24, 2009

Let's talk about abortion!

When I started writing this blog, I wanted to try to avoid talking about politics. However, I find that is the sort of thing I'd talk to myself about often, so I decided there's not much point in keeping it away from the blog. While I'll make reference to my beliefs, I'm going to try to keep political posts focused less on beliefs themselves than on how they're perceived in the public sphere, which I think is an accurate description of this post. Besides, no one reads this blog anyway, so I don't really have anyone to offend.

So, abortion. I do consider myself pro-abortion, and I use that term rather than another one for reasons I'll get to. I do believe the government shouldn't step in to tell women they can't have abortions...but I'm not militant about that belief. That is to say (and if someone actually read this, they'd probably be offended), I'm not going to stand up and say, "How dare you take away the right to kill a fetus?!" It's really a judgment call on my part to be pro-abortion, and it's not something I can back up with rigorous documentation or appeal to facts; really, it's mostly a gut feeling. I'm wary about the intrusion of government power, and I feel banning abortion would go too far. Other people might feel it doesn't go too far, and I can respect that. I can't get all offended that someone feels that way.

But my views on abortion go beyond that. Not only can I not get militant about it, I don't even really care about it that much. I am far more interested in economic policy, foreign policy, hell, even gay marriage, than I am in abortion policy, because I feel that on the grand scale of things, it just isn't that important. (Perhaps that's why I feel the government shouldn't bother with it.)

This brings me to why I've decided to reject the labels "pro-choice" and "pro-life". First of all, needless to say both labels are just spin, and I don't like spin. I try to be a no-bullshit type of guy. People who are pro-abortion say they're "pro-choice" because being pro-abortion, well, first of all, just sounds sadistic, but second of all, "pro-choice" just sounds downright American. We should be able to choose for ourselves. And people who are pro-life could call themselves "anti-abortion", but you never want to identify yourself as "anti-" anything; you want to be for something! And what better to be for other than life? I mean, who's anti-life, other than serial killers?

But what I really don't like about the labels "pro-choice" and "pro-life" is that they try to be about more than they really are; they try to expand the issue. Being "pro-choice" means you're in favor of the choice to have (or not have) an abortion, but the implication is that you're in favor of choosing, in general, rather than being barred from making the choice. Well, that's all well and good, but does being in favor of the choice to have an abortion really say anything about how much you want to let people make their own choices? How many people think women should get to choose to have an abortion, but shouldn't get to choose whether they can smoke in a bar or restaurant? How many people believe in choice for abortion, but not for paying into Social Security? I submit there is no correlation between the two; being "pro-abortion" doesn't necessarily mean being "pro-choice".

And the same is true for "pro-life". People who are opposed to abortion regularly explain their opposition in terms of "protecting the sanctity of human life," and believing that "all life is sacred." Well, y'know, I think I'm a pretty "pro-life" guy, in a sense; I believe in respecting other people's lives, and enjoying my own life; I think life is worth living, and believe every day I wake up is a great one. In short, I don't think that being for abortion makes one any less "pro-life". Beliefs about abortion have a connection to beliefs about life, but it does not have to be a defining one; frankly, I think it's a rather tenuous one.

So I think we should abandon the terms "pro-choice" and "pro-life", and stop trying to pretend this whole thing is more than it is. It's really just about one thing, abortion, so let's say it's about abortion. You're either pro-abortion, or anti-abortion. Now, those who would call themselves "pro-choice" may object to the label pro-abortion because it implies being in favor of the act, when many pro-choice activists are opposed to the act, but think government shouldn't ban it. I understand this objection, and I would say "pro-allowing people to have abortions", but, sorry, it's just too damn long :-p. (I don't think the pro-life activists would really have a problem with the designation "anti-abortion".) At any rate, I'm trying to get away from the connotations of these words and just focus on the denotations. If someone says "pro-abortion", we all know what that means. It's not a good PR term, but frankly, I think we should all get away from the PR mentality; hell that's what I meant above, when I criticized "pro-choice" and "pro-life" as spin terms, and that I try to be no-bullshit. To me, no-bullshit pretty much means you're not going to try to sugarcoat what you think just to make it sound better to people. Let's call things what they are, and that's what I'm going to do: from now on, I'm done saying "pro-choice" and "pro-life", and I'm just going to stick to the accurate terms: "pro-abortion" and "anti-abortion".

Sunday, January 4, 2009

NFL Overtime

The Colts-Chargers game yesterday went into overtime, which in the NFL is still sudden death. Sudden death, of course, gives a huge advantage to the team that wins the coin toss, and sure enough, the Chargers won the toss and scored on the first possession to win the game.

This led me to wondering, of course, just how much of an advantage winning the toss gives you. I did some research and found out that since regular season overtime was implemented in 1974, teams winning the toss had won approximately 52% of the games and teams losing won approximately 44%, with the rest ending in ties (if there is no score during the 15 minute overtime period, the game ends in a tie). However, the percentage of OT games won by the team winning the toss has grown closer to 60% since 1994, when the kickoff was moved back from the 35-yard line to the 30-yard line. This change has increased the chances of scoring on a possession.

One suggestion for improving NFL overtime is to move the kickoff back to the 35-yard line for overtime. I decided to model overtime games to see how much this would help.

It is fairly easy to construct a model based around the probability of scoring on a possession. Assume for now that the teams are evenly matched and have an equal chance of scoring on any given possession, and call their chance of scoring a probability P. Scoring on a possession wins the game, so their probability of winning the game is the sum of the probability they'll score on any of their possessions. The probability they'll score on a given possession is P times the probability that no one has scored and ended the game yet, which is (1-P)^2n, where n is the number of possessions the team has had. This creates an easily solvable geometric sum, which can be seen in this chart:



As you can see, reducing the probability that the team will score on a given possession (which is what moving the kickoff line back up would accomplish) does reduce the advantage of winning the toss, but no matter how low you reduce it, the team that wins the toss is still favored.

Proponents of the sudden death overtime say that losing the toss is no problem because your defense should be able to stop the drive. This should be obviously fallacious, but as a different way of looking at it, I modeled the case where the team that wins the loss is worse than the other team, and by this I mean, is less likely to score in a given possession. Here's a chart for the odds of winning, given their probability of scoring in a given possession, for a team 20% less likely to score on a possession (NB. When I say 20% less likely, I mean 20 percent, not 20 percentage points, i.e. if the team that won the toss has a 35% chance of scoring on a possession, the other team has a 42% chance, not a 55% chance.)



As you can see, even if the team winning the toss is significantly worse than the other team, their odds of scoring on a possession need to be brought down to 15% or less for them not to be favored to win!

Another overtime method suggested is the "two possession rule"; that would involve each team getting at least one possession in overtime, and then it would revert to sudden death. While this still favors the team winning the toss, it is not nearly as much as an advantage. Here's the chart for evenly matched teams (NB. that I was unable to account for the differences in scoring field goals and touchdowns, so I just modeled the case where both teams have to score a touchdown--which has been suggested as a variant of the two possession rule):



The blue line represents sudden death, and the red line represents the two possession rule. As you can see, the team winning the coin toss has a fairly low advantage for a wide range of scoring probabilities. What's particularly interesting is that for cases where the team losing the toss is better, there's a range where the probability of the team winning the toss winning the game goes down even as their probability of scoring on a possession goes up. To make it really obvious, take the case for a team that is 50% better losing the toss:



As you can see, the red line has a clear dip in it. This is because as the probability of scoring on a given possession goes up, it produces two countervailing forces. On one hand, it increases the chances of winning, for obvious reasons. But because of the way I've set the model up, it also increases the chances of the other team scoring even more, which reduces the first team's chance of winning. In the sudden death case, the first force dominates over the entire range. However, in the second case, the latter force dominates for much of the range. Again, a lot of this is wrapped up in the arcana of how I set up the model, but it makes one point clear: under the two possession rule, how good the team that loses the toss is becomes a lot more relevant.

Here's a link to the spreadsheet I made: NFL Overtime

Friday, January 2, 2009

"If it saves just one life, it's worth it."

A few years ago, the town I live in built a stoplight at an intersection where a high school girl had died in a car accident. While they were building it, I drove past there with a friend of mine and his mother. When he commented that there was really no need to build a street light there, his mother said, "If it saves just one life, it's worth it."

Now, it's possible that his mother knew how much it cost to build and maintain a streetlight there, and decided one life would be worth it, but it's far more likely that she meant that any expense is justified if it saves "just one life"; i.e., lives have an infinite value. This, of course, is absurd, because it would imply we should devote all of our resources towards saving lives. This, in turn, becomes even more absurd, because there are various places towards which resources must be directed to save lives (food, shelter, healthcare, etc.), but if lives have an infinite value, it becomes impossible to efficiently determine just how these resources should be allocated towards saving lives. Infinite values do not work well in a market.

In short, it's clear that lives do not have an infinite value, and there must be some finite value we could place on a life. There must be some dollar value that it's not worth spending, even "if it saves just one life". However, as a society we're extremely uncomfortable placing a finite value on a life, and try to treat all lives as having infinite value, even though this is an untenable position. It is, I think, not difficult to see how many political disagreements can and do stem from this dilemma.

Wednesday, December 31, 2008

That one song...

I've heard that the part of the brain that processes smell connects directly to the hippocampus, the part of the brain that deals with memory. This supposedly means that certain smells can very quickly evoke powerful memories. I have experienced this a few times, but never quite that strongly, and I only ever noticed it after I heard that about the hippocampus. What does really bring me back are songs, but only certain songs. I noticed this listening to the song "It's the End of the World as We Know It" by R.E.M. the other day. There are certain songs, and that's one of them, that somehow manage to transport me to a different time, and have a certain quality about them that seem to connect me to something greater than myself that's simultaneously very powerful and completely illusory. What's particularly remarkable about that song, and many others like it, is that it's not a song I've ever had on CD or on my iPod; it's not one I ever listened to regularly at any point in my life, and yet it seems incredibly linked to my past. I wish I understood what this quality that certain songs have is, but all I know is that it exists: there is some bizarre way to make a song seem like it was part of my life even though it never was.

I've indicated elsewhere in this blog that I've tried songwriting and failed miserably, but whenever I hear a song like the one I just described, I wish that I could write just one song like that in my lifetime.

Friday, December 26, 2008

If someone had asked me...

“On a lighter note, do you wish your daughter would have married a better defensive coordinator?”

I would've replied, "Does your wife wish she hadn't married a total twat?"

Sunday, December 21, 2008

Consistency

In the course of my recent intense scholarly study of The Who, I've realized two things.

A) a ton, maybe even the majority, of Pete Townshend's songs use basically the same three chords (the I, IV, and flat-VII, if you're curious). "I Can't Explain", "Magic Bus", "Bargain", "Won't Get Fooled Again", "5:15", "Dreaming From the Waist", "Who Are You", and others are all basically written around those same three chords.

B) All of these songs not only sound distinct and unique, but they're all really excellent songs.

When I was under the illusion that I could actually write music, I was always trying to look for something new to do musically, something that no one had ever done before. I've since realized that it's more important to have something to say.

Wednesday, December 17, 2008

Left-handedness

I am a left-handed guitar player, which is a rare thing. Left-handers account for about 10% of the general population, but left-handed guitarists (defined as those who actually play guitar left-handed, not lefties who play guitar right-handed) constitute a much smaller proportion of the guitar playing population. This is mainly because left-handed guitars are so hard to find, which is of course a self-perpetuating prophecy, as left-handed guitars are even harder to find when so many lefties don't bother learning how to play left-handed. Anyway, the point is, I did learn to play guitar left-handed, and consequently, I have a hell of a time finding guitars. I learned to play left-handed mainly because I'm such a stubborn and prideful southpaw. That is to say, left-handedness is really important to me. I'm not entirely sure why, but I've always been very proud of the fact that I'm left-handed, and I refuse to sell myself short in any left-handed endeavor. My first guitar was actually a right-handed guitar that I re-strung to be left-handed. The funny thing is that although I intended to restring it from the beginning, it was about a month and a half before I finally did. Until then, I started learning to play right-handed, then started over again from scratch and learned to play lefty once I had restrung the guitar. That's how determined I was to be a left-handed guitar player.

And so, almost 9 years later, I am quite proud and happy as a left-handed guitarist, and I'm, ultimately, glad that I chose to learn the way I did. That said, it is such a pain in the ass to find left-handed guitars that I almost wish I learned to play right-handed. Almost. Of course, it's maybe a good thing that I've been prevented from blowing too much money on guitars; who knows how many I would've bought by now if I didn't have to find left-handed ones. But it's not just about buying guitars. Every time I go to a guitar store and want to try out different models, there are only about 3 or 4 I can really play, and that's at a big guitar store. Or whenever I go hang out with someone and they have a guitar, I can't very well borrow theirs to play on, because I can't play it. It's quite frustrating.

What this all adds up to is I recently asked myself what advice I would give to a left-hander who wants to learn to play guitar. Would I suggest they go the easy, conformist way and just learn to play right-handed? Or would I suggest they stick it to the man and learn to play lefty? I decided that it's all about how important left-handedness is to you. If, like me, you consider your handedness to be a tremendously important, defining characteristic, well, clearly you should stick with that. If you don't, then just take the easy way out.

Saturday, December 13, 2008

Creating a blog to try to make myself write regularly

So, I have a lot of conversations with myself. I don't think I'm unique in that regard. Usually when I'm sitting around doing nothing (which is most of what I do), I'll start contemplating something, and for me, contemplating means asking myself questions, and creating an interlocutor in my head who questions me. Sometimes it gets so bad that I'll refer to myself in the 1st person plural. Anyway, this is only tangentially related to my main point. I feel I have a talent for writing. Furthermore, I feel writing is an occupation I would enjoy. However, I don't seem to have the temperament for it, so I want to try to force myself to write on a regular basis, and so I'm going to try to force myself to write down the conversations I have in my head. Hopefully the next time I have a conversation with myself, in my head, I'll tell myself, "Hey, Polak, stop doing this in your head and start writing it down," and then I will write it down here, repeat ad infinitum, and end up writing regularly. It probably won't work, because I have a hard time ever making myself do stuff. Even if it does work, it probably won't be interesting, but that's not the point. The point is habit first, and then (hopefully) the interesting will follow. I hope this works.