Thursday, December 26, 2013

Correlation and Causation (It's Kind of a Big Deal)

My sister sent me a link to an article titled "Earn more money, when you have more sex, study says (seriously!)" Being a math teacher herself, she had some doubts about the article's claims. She linked me to the study on which the article was based and passed along her thoughts on its methods:
Is it me, or are the guy's statistical interpretations (from the journal article) not all correct? Sketchy claims include: 

"For both sexes, in Panel I, we observe that a one standard deviation increase in sexual activity increases hourly wages by 3.2%, other things being equal." 

"The importance of the sexual activity variable can also be assessed by the fact that if we regress a single wage equation without the sexual activity variable, the R^2 is 0.821, while if we consider the sexual activity variable (as in Table 5), the R^2 is 0.842. In other words, the wage estimation becomes more precise if we consider the sexual activity variable." 

Um, R^2 always goes up when you add an additional variable, that's why we use adjusted R^2?

Not to mention the implied causation claim. I am not surprised at the correlation since there's a documented positive correlation between being married and having higher income, but really "Earn more money when you have more sex"?
My sister hit the nail on the head with the R-squared thing. To quote the stats textbook I keep in my cubicle for the purpose of making my coworkers think I'm smart, "in practice, the best model found by the R-squared criterion will rarely be the model with the largest R-squared." Adding additional explanatory variables to a regression equation will always increase R-squared, whether or not those variables are truly significant. Adjusted R-squared takes into account the number of explanatory terms already present in the model, and is often a better way to determine which variables are worth retaining in a regression equation-- it helps temper the impulse to cram in as many explanatory variables as possible. I would not interpret an increased R-squared as conclusive evidence that the sexual activity variable is worth retaining in the final regression equation.

The causation claim raised my suspicions as well. It's very difficult, often impossible, to prove causation in an observational study like this one-- there are a million confounding variables out there. "Correlation doesn't prove causation" has become the go-to comeback favored by science fans the world over. It's an easy shot to take at almost any of these attention-grabbing, "studies show" headlines. It's so easy it could feel like a cheat code for sounding smart, if it weren't so often true and applicable.

This excellent needlepoint design is sadly sold out on Etsy.

Friday, September 27, 2013

Homestuck Revisited

I made a mistake.

A huge, HUGE rookie mistake.

Remember this drawing from the Homestuck Post?



It was more correct than I was about the probability of a female-female conversation occurring in a group of size N containing F females.

Friday, August 23, 2013

Was Hot Fuzz a Documentary?

An unconscionably long time ago, Abhi posted a link on my Facebook wall to a study about the comparative dangers of living in the city versus living out in the country, with the instructions "BLOOOOG! GOOOOOO!" I meant to write about it a lot sooner, but, you know. Annual family reunion/beach vacation, so like, nothing productive happening THAT week. Now that my vacation's over and my sunburn's faded enough that I can wear shirts again, it's high time for some bloggin'!



The National Geographic article is split into five "surprising" facts about country living versus city living, "surprising" mostly because they run counter to some conventional wisdom about safety. Following their lead, I'm going to use this study's findings to address three key quotes from the cinematic masterpiece on the relative dangers of small town life, Hot Fuzz.

SANDFORD'S FINEST

Friday, July 19, 2013

The Lottery Reloaded

So my company offers clients mathematical analysis of trends and probabilities. We also have an office lottery pool. Make of that what you will.




Tuesday, July 2, 2013

The Homestuck Bechdel Analysis

Before we begin this post, I feel it prudent to make a confession. It's probably not even a confession, since it's likely that everyone knows it already-- more like an admission of guilt regarding a crime of which I have already been accused, or at least suspected. There is... a web comic. No! Not a web comic, exactly, or at least, not only a web comic. There is a long, multi-arc narrative spanning a wide range of different styles of expression, including traditional web comics, interactive puzzle-solving games, gorgeous animation scored by a multitude of experimental musicians, long-winded chat logs delving into the nature of causality, and equally long-winded chat logs probing the nature of alien reproductive biology. There is a thing called Homestuck, and it is a silly thing that I love dearly.



Friday, May 24, 2013

Texting and Driving and Error and Ethics

Recently, my friend Abhi suggested that I do a "controversial" blog post on texting while driving, specifically about "how dangerous is it actually?" This was in response to a recent American Academy of Pediatrics study that found nearly half of teens reported texting while driving, and that the behavior was very strongly associated with other risky behaviors like drunk driving and infrequent seatbelt use. To quote Abhi's suggestion from Facebook:
I haven't seen the studies, but I'm guessing there's a huge selection bias in incidents reported where texting "led" to an accident, because you condition on searching for texting by seeing the accident. The cases where texting doesn't lead to an accident don't get reported. To take an absurd example to illustrate the point, I bet you'd find a similar correlation for accidents and having previously had a soda. Or Chewing gum. Or *wearing seatbelts*. I'll bet you that in 90% of accidents that occur people were wearing seatbelts *grins*.
I have no doubt that Abhi's intentions were benign, but I found the suggestion unsettling. I responded by saying that I didn't want to encourage texting while driving, and he questioned why I should feel bad about investigating a mathematical claim. Well, it's complicated. I'll try to explain.

Wednesday, May 8, 2013

Alfnak Alfventures

Hey there readers! Quick post about an interesting Skyrim mod I played through recently. You can find "Alfnak Ruin" here, along with the results of the (no longer active) survey that goes with it. It's a pretty straightforward dungeon, nothing spectacular if you're looking for cool Skyrim mods (if you are, that's a TOTALLY different blog post, on probably a totally different blog), but I liked the fact that it was created for the purpose of gathering data. Stats? And Skyrim?! How could I say no?


I predict with 95% confidence that this place is full of SW33T LOOT.