Sunday, August 23, 2009

A fight for Independence

Docula had a great comment on my last PSA and I'd like to touch a little on what he said.

Let's talk a little about statistical independence. Loosely speaking, we say two events, A and B, are independent, if knowing that event A occurs does not change the probability that event B occurs.
E.g. Let A = the event that I play Rock Band 2 tomorrow. Let B = the event that Fast Eddie eats a salad for lunch tomorrow. These events are logically independent since my video gaming habits are not going to affect Eddie's lunching habits.

A little more complicated: Suppose you have a standard deck of playing cards. Suppose you're going to draw two cards. Let A be the even that the first card drawn is black. Let B be the event that the second card drawn is black.
Are these events independent?



Well, the probability that A occurs, denoted P(A), is 26/52 = # of black cards / # of cards total = 1/2

What's P(B)?

Well, if you drew a red card on the first draw, then P(B) = 26/51 (26 black cards but only 51 cards left)
If you drew a black card on the first draw, the P(B) = 25/51 (25 black cards (since you got one on the first draw) out of 51 cards left)

So P(B) changed DEPENDING on what you got on the first draw. So P(B) DEPENDS on what happened with A. Hence, these two events are dependent.

So why is this sometimes counter-intuitive? Suppose that I have a fair coin. By fair I mean that on each flip, the coin is as likely to land heads as it is to land tails. P(heads) = .5 = P(tails). Coin flips are independent. If I flip a coin and it lands heads then it's no more or less likely to come down heads on the next flip. Easy to say, but in practice this throws a lot of people off. Let's say I plan to flip a coin 10 times. The first 9 flips all come down heads

H H H H H H H H H

I pause for a moment and say, "what do you think it will land on the next, and last, flip?" We all (including me) have the urge to say "Tails! For the love of Buddha this string of heads is improbable!" This sentiment was dangerously echoed by some gamblers I observed when working at Treasure Island Resort and Casino. These gamblers would sit by the electronic roulette machine with notepads and they would write down the color and number of each outcome of the spin of the virtual roulette wheel. They would then attempt to use this information to help them predict the next outcome. At the most basic level of statistics just discussed, this would be a good strategy if the events were....drum roll please....dependent. If the spins of a roulette wheel were dependent then knowing something about previous outcomes could give you some information about future outcomes.
But...just like a coin flip, the spins of roulette wheel are INdependent. If that weren't true, then you would have to believe that the little wooden ball (or computerized wooden ball) somehow remembers what it has landed on and in the future will act upon that knowledge. If these men saw the ball had landed red 5 times in a row, they would probably bet on black for the next spin. This is FOLLY! Just because I flip 9 heads in a row doesn't mean the last flip is more likely to be tails. The coin doesn't remember that it just landed heads up 9 times in a row.

People have a false intuition about this empirical law called the Law of Averages, which, roughly put, states that thing even out after a while. I might get more into that in a different post, as it deserves it's own clever title.

Some real world applications? If you win the lottery using your favorite 10 digit number, there's no reason why you shouldn't keep playing that number afterwards.



If you haven't already, please, for me, watch (or read) Tom Stoppard's Rosencrantz and Guildenstern are Dead. It's the funniest, cleverest thing you'll ever put your eyes on. The first ten minutes are a beautiful homage to probability theory.






p.s. something to think about. suppose that people flip coins for fun. you know, for choosing between two movies, dates, desserts, colors of ties, etc. Suppose that the average coin is flipped 100 times in it's lifetime. Meaning someone flips the coin then buys something with it and the next person to get that coin flips it for some reason or another etc. Now, do you think that somewhere out there is a coin that's always landed heads? It's been passed around from person to person and no one single individual would notice, but could there be a coin out there that's been flipped 100 times and every time the coin has come down heads? How many coins would there need to be in circulation for this to have a better than 50% chance of happening? Is this coin magical?

Wednesday, August 19, 2009

The Ghost in the Machine

I was just typing an email to my Cousin, when Gmail started to lag. I would type in a word and at about 1/4 the speed, the letters would appear on my screen. I paused the think about what I was going to say next, then typed out a whole sentence very quickly. I sat back in my chair and watched as the letters popped up one by one, about a letter a second. It made me feel strange, as though I were in some 1980's movie where the fledgling programmer has created an artificial intelligence program and is reading it's birthing cry. Luckily, the words that appeared on the screen were the words that I typed and not something like [skynet online].


And now for one of my random thoughts:

I just watched an episode of Buffy the Vampire Slayer in which Cordelia, heartbroken and furious, lays the blame for all her misfortune on Buffy and in her anger makes a wish. "I wish Buffy Summers had never come to Sunnydale!" Little did she know that the new girl in school was a wish-granting spirit with a man-hating streak. So spirit girl grants Cordelia's wish and Cordelia is whisked away to...you guessed it...a dystopian parallel present. Lesson learned: the Hellmouth is fraught with spirits wishing to dish up a steaming plate of irony. The parallel "What if?" reality at which Cordelia arrives is pretty much the worst of all possible worlds and she soon finds herself dead. I guess, Giles finds her dead... When dystopian Giles guesses what's happening he sets about to cancel the wish. Sidenote: vampire-cum-goth Xander and Willow make a super hot couple.
D-Giles "saves" the day by smashing an artifact,



thus reinstating the original Buffy-full reality.

My point: In so many fantasy and/or sci-fi stories, parallel realities get revoked, destroyed, squished or (and they should have a word for this) made to have never existed. What happens to those people? In back to the future 2, Marty creates a split in the space-time whatchamacallit and a dystopian Hill Valley comes into existence. He then fixes the space-time thingerdo and the future goes back to whatever it "should" have been. What about all the people in that splinter? What about all the babies born of unions that didn't happen in the "correct" future. All over the world people were just going about their lives, and who knows, maybe everywhere else people are happy and free and someone has invented an interstellar spacecraft. Shouldn't Marty be guilty of the murder of billions of people? Worse yet, what if they don't die, but their existence is revoked. Surely it is better to die than to have never existed at all. The thought makes me shudder.

Now back to my favorite flavor of dystopian realities:

Sunday, August 16, 2009

More cowbell than you can handle

Free Energy Music Video

I'm sorry, my little linux powered netbook doesn't want to let me ebed the video. Therefore, follow the link to watch my big brother's first official music video. I'm so proud of him and I want to you all to feast your ears on this carpe diem anthem of love.

I promise I won't forget any of you once I ride my brother's coattails to rock-star nirvana.

Thursday, August 13, 2009

Definitions



Does anyone else find this ad a little strange? The wait is over? You can preorder your Zune now and WAIT until September 15th to actually get it. Maybe I'm just arguing semantics. I mean, if, perhaps, you were waiting for the opportunity to preorder an iPod wannabe, then yes, your wait is over. However, if you're one of those people, I bet you really enjoy having cake as well.

SP out.

Tuesday, August 11, 2009

Public Service Announcement

So here's a fun idea, why don't I write about a couple of interesting facets of statistical thinking?

From my personal statement, part of my application to grad school:
Midway through my first probability course I began seeing the world in a different way. Absolutes gave way to probabilities, certainty to estimation, and placid acceptance to examination. Phrases like “mutually exclusive” crept into my daily parlance and the salad bar became much more interesting when order mattered.



To illustrate an interesting principle, let me summarize a problem from the Statistics: Concepts and Controversies lab book. I can't remember the actual numbers, so I'll make some up. The problem is a critical look at an article put out by the Associated Press. The article is basking in the improbability of a certain event. The event is that the past 16 births at the local hospital in some small town in Indiana have all been boys. Well, surely, if the probability is about 50% for either gender, we should have seen about 8 boys and 8 girls, right? The probability is not difficult to calculate. Assuming that the sexes of the babies were independent, the probability of 16 boys in a row is .5 to the 16th power. 0.5^16 = 0.00001525. If you were a gambler you wouldn't bet on it, right?

So the question is this: Is this story newsworthy?

Counter intuitively, the story is not newsworthy (in a statistical sense).

Why isn't the story newsworthy? Four years ago, according to the 2005 census, there were 7,569 hospitals in the USA. In every hospital across the country, children are being born. Is it so unlikely that one of those hospitals gets a run of male births? Think about it another way. Let's say you go to a baseball stadium with 7,568 of your closest friends. You all crowd onto the field and each of you pulls out a coin. I call out "go" over the loudspeaker and everyone starts to flip his or her coin. Each of the 7,569 people flips a coin 16 times and records the number of heads and tails.

After everyone's finished, someone in the middle of center field yells out "Holy Balls, I just got 16 heads in a row!"
Is this so unusual? Do you grab this guy, throw him in your trunk, and make him play craps for you in Vegas? For legal (and statistical reasons) I wouldn't. The punch-line is that if you work on a large enough scale, even outcomes with very small probability will eventually occur. Now, if you do the math, the probability that at least one person gets 16 heads in a row (or at least one hospital gets 16 males births in a row) is about 89%. That means that if I wanted to, I could find a hospital almost every day that had this exact same, "newsworthy," event.

About 10 years ago, a man won the lottery...for the 2nd time. Holy shit, you may exclaim, certainly Baby Jesus has blessed this man above all others. Ye, let us make a shrine to him and rub its bronze nose for luck before we watch the powerball drawing. Again, faulty logic. The fact is that many people play the lottery, and, in fact, many people who win the lottery keep playing afterwards. If you get enough repeat players, eventually one of them is going to win again. Some statistician claimed it would be about every 10 years, and about 8 years later someone else became a repeat lotto winner.


Now I'm getting long winded, but I want to give one more example of how this logic applies. Say that you're talking to a new coworker and after a while you find out that you both had golden retrievers as kids and that BOTH of you have sisters named Julia. Is this crazy? Are you soulmates? People ask me, what's the probability that you meet someone at random and you both have sisters with the same first name? It's not quite the correct question. You see, if you talk for long enough, you're bound to find something in common. So when you do, you tend to forget about the dozens of things you don't have in common, and fixate on what you share. That's fine, since that's how we develop interpersonal relationships, but it's not nearly as "weird" or "spooky" as it might appear to be.

blah blah blah, i'm done. did anyone find this interesting?

Thursday, August 06, 2009

mama said knock you out

*whew* I just completed the first segment of Riddick. As insanely difficult as it was, it did a lot of things really well. The game did some beautiful things with light and shadow, there were also some genuinely funny moments.
Such as when you acquire a giant mechanized walker called the "heavy guard." You become a juggernaut of gatling weilding rocket launching fury. The armor talks to you during the segment giving advice to the "pilot" in a deep roboty voice.
armor: "Battle Analysis: Walk over smaller organic targets to conserve ammunition"
"Battle Analysis: Pilot should read instruction manual before operating Heavy Guard."
At the very end of these often hilarious recommendations you get
"Battle Analysis: Pilot should turn off auto Battle Analysis suggestions."

Kudos to you, oh creators of Escape from Butcher Bay. Now, on to the second (and final) portion: Assault on Dark Athena.

Something has been on my mind recently. What's up with the expression "You can't have your cake and eat it too." ?
I mean, I think I understand the meaning. It means one action is mutually exclusive of the other and both are equally desirable. You have to make a choice, you can either have your cake, or you can eat your cake, but you cannot do both. So this begs the question, who the hell wants to have some cake, but not eat it? I mean, do people really sit at the kitchen table with a huge slice of chocolate cake (presumably with a tall glass of milk) and debate this?

Inner monologue:

Hmmmm, this looks like delicious cake, I can't wait to eat it. But wait! If I eat the cake then I can't have the cake. Oh no! I am at an impasse since I do so enjoy simply possessing this piece of cake. Oh God why have you forsaken me?!?!?

I doubt it. So it seems like the only reason one would get cake would be to eat it. Right? So these two actions are not equally desirable, at least for me. There might be some weird cake hoarding fetishers out there, at which point the actions become unbalanced but in the other direction.

Can somebody please suggest an alternative to this phrase? Something like, you can't go out with a girl and sleep with her sister at the same time.

Anyway, we all know that the cake is a lie.