Archive for the ‘Personal’ Category

“Correlation Does not Imply Causation” is not as simple as it looks.

Thursday, December 1st, 2011

This year I gave lectures to three different classes about introductory statistics. One of my favorite classes was Correlation and Linear Regression, because It allowed me to talk to students about more practical applications of the usually very mystical concepts of statistics.

In all three lectures I talked about the “correlation vs causation” dillema, and in all the exams I included the following question: “A group of scientists find out that the rate of use of product X has a strong correlation with the rate of hairlessness in people. Is this result useful to say whether product X causes loss of hair? What arguments or experiments could you use to determine if X and loss of hair have a casual relationship?”

It is a very open ended question, I wanted to pick at my student’s brain and gauge how much of the class they assimilated more than I wanted an exact answer with an exact score (there were other questions for that). The results were very interesting.

As for the first part of the question, a very large number of students in all classes misunderstood the meaning of the word “useful”. They would answer that either the correlation does not prove the causation, which is correct, but is not what I was asking. Of course correlation does not prove the causation, the question itself states that! But still, it is useful information, because if the correlation was 0, we could exclude a direct causation right out of the bat.

As for the second part of the question, many, many students suggested tests with control groups to test if the causation really exists. This shows a fundamental misunderstanding of either what control groups are really about, or what about what correlation really means. If you have already stablished a strong correlation between X and hair loss, the logical conclusion is that a control group that is not using X will not show hair loss. The control group will simply confirm the correlation we already know about, and teach us nothing about the causality (or lack thereof) of X and hair loss.

This is not exactly an easy question — even though it uses no numbers or asks for no formulas! — but since I said they could use arguments instead of experiments, they could suggest different X with and without causality relationship with hair loss, and compare them. For instance, they could say that X could be either an anti hair loss product (and the causality relation would actually be inverse in this case!) or a shampoo with a bad chemical balance (and in this case there would be a causal relation) - the “experiment” in this case would be to actually investigate X and how it relates to hair loss in chemical/biological terms, and not something as simple as “Do a Z-test/double blind test/whatever”.

Things to keep in mind for the next time around…

Jimmy and the Lake Monster

Monday, November 21st, 2011

Little Jimmy lived in a small town by a lake. One day, he went to the lake and saw a large monster coming out of the lake. The monster looked mean and hungry, and was walking toward’s Jimmy’s town.

Jimmy ran as fast as he could to his town, and shouted at the top of his lungs:
- HELP! HELP! An monster am coming from the water!

Three people (Ann, Bob and Charlie) came to see what the ruckus was about:
A> Jimmy, what did you say?
J> I said an monster am coming from the water! Help!
B> That sounds terrible!
C> Jimmy, you can’t say “an monster”, the correct way is “a monster”
B> But jimmy is young, he has the right to make such mistakes!
A> Right? Of course not, I learned how to talk properly, Jimmy should too! Also, what about the “am monster”?
B> Well, it is an accepted form in certain kinds of poetry and popular discourse, isn’t it? Little Jimmy is actually a culturally aware poet!
C> You can’t mean that, that is ridiculous!
B> You are oppressing Jimmy’s way of expressing himself!

J> Help! The monster am coming from the water!
C> What do you mean by water?
B> Maybe he means the lake?
A> But there is water in the sea too, how do you know the monster is not actually in the sea?
B> But even if the monster came from the sea, it would be a terrible happening to all of the world, wouldn’t it?
C> But the sea is so far away…
B> You are being too selfish! The people in the seaside town also deserve to be protected from monsters!
A> Well, if they want to be protected, maybe they should protect themselves… why should we protect them from sea monsters?
B> Because maybe now it is a sea monster, but next time it may be a grass monster, and come from the grass near our town!
A> I’m well protected against grass monsters. If you are worried, you should be protecting yourself.

About that time, the monster arrived and devoured Ann, Bob, Charlie, and Little Jimmy as well.


Many times, this is watch it feels like when I watch people debate politics.

The scariest flight. Ever.

Tuesday, November 8th, 2011

Two weeks ago, I had this nasty ear infection. The doctor treating me said she wanted me to check with her again on a bi-monthly basis, because the left side of my nose cannals was too small or something like that. When I told her that I was going to Japan in 3 months and probably couldn’t commit to any long term treatments, she freaked out.

- You can’t travel by air! Your eardrums will rupture! We need to do something about it before going!
- But the trip is three months away…
- Doesn’t matter, you can’t fly in this condition. — she was adamant.

And then, just after leaving her office, I remembered that I was going to take a flight much earlier, for the Brazilian Congress for Bioinspired Computing just two weeks later.

Uh Oh.

While I made a mental note to visit her again before the trip, I completely forgot about that. I was feeling much better by the end of the first week of treatment. I just remembered the punctured eardrum threats the day of my trip.

Oh man, I was swallowing and moving my jaw like crazy as the plane started to taxi out, mildly amazed at the possibility of rivers of blood suddenly coming out of my ears. My throat was DRY, and the plane hadn’t even begun the take off yet.

As you can guess, nothing happened. I after all that exercise, I probably had the best pressurized ears of the whole cabin.

Other than this scare, the flight was one of my most enjoyable domestic flight ever. I used Azul Airlines which, surprisingly, does not have an English website (shame on them!). If you can navigate the Portuguese website, I recommend it.

How I feel this week:

Thursday, November 3rd, 2011

Simulate ALL the things!

I guess you know how it’s gonna end :-P

When Everything goes wrong, singing is the best answer!

Wednesday, November 2nd, 2011

I’m a scientist, and I’m okay
I code all night and I read all day

I run my tests, commit my changes
I go to the laboratory
I read my news on the Internet
And check the economy

I’m a scientist and I’m okay
I code all night and I read all day

I run my tests, I check stock prices
I talk to undergrads
I put on expensive clothing
And hang around in bars

I’m a scientist and I’m okay
I code all night and I read all day

I run my tests, I wear a suit
A top hat and a tie
I wish I’d been a Biz’man
Just like my classmates!

  • Categories

  • Archives

  • Meta


  • "(...) being rather cleverer than most men, my mistakes tend to be correspondingly huger."
    Alvus Dumbledore -- Harry Potter and the Half-Blood Prince