# If you play with your Prior you’ll go blind

And thus, the Huffington Post predicted a 98% probability for Hillary Clinton to be the next President of the United States. Amen… Let’s tease them a little bit, shall we?

My Bayesian friends, I understand playing with your priors is a very joyful activity but you see, it leads to blindness. It allows you to believe, let me cap & bold this one, BELIEVE that Hillary’s chances to be the next President of United States were 98%! No wonder that betting sites favored heavily Hillary’s side days before the election! I mean 98%! Who wouldn’t put some money there. Right?

But you know, a 98% probability coming from a Bayesian means very little unless, of course, they do some math pirouette to guarantee that the probability has frequentist properties, but then, if they do that, why bother going Bayesian in the first place?

If a frequentist tells you there is 98% probability for an event to happen he/she means that 98 out of 100 times where you find yourself in a situation like where the event is taking place the event will occur. Now, if a Bayesian tells you there is 98% probability he/she means that this is his/her degree of believe (wot?) on the event to happen… Amen again.

In other words, Bayesian results are as credible as the beliefs of the Bayesian statistician making the calculations, now we can understand why they calculate credible intervals instead confidence ones.

If we check on the Huffpo methodology we can read:

Many Bayesian models ― including the Pollster averaging model as it’s implemented for our charts ― use “uninformed” priors that don’t affect the model or provide any background information.

However, we do use information from previous elections in these priors to make predictions in our presidential model.

Ba dum tsssss

Much has been written on the pros and cons of going Bayesian and how evil Frequentists are, but this amazing Bayesian result from Huffpo was just too good to let go as a beautiful example of how blind you can go when playing with your priors.

# Social Network Analysis & GOP Verbal Attacks

Not that I know anything about the GOP debates or candidates, but I casually saw in a CNN post this nice visualization of verbal attacks during the RL GOP Debate, and I thought that I would do a little SNA and try to draw conclusions on the debate WITHOUT actually having seen it…

let’s see how it goes and, please, if you’ve seen the debate and know better than me, let me know if I am very wrong 🙂

# Data Science vs Bimbo Math

Saint Valentine, that romantic and beautiful festivity for department stores also brings everybody to talk about love in all sort of contexts and TED, my favorite talk place (I will have to rethink about this), brought for the occasion complexity theorist Hannah Fry to talk about The Mathematics of Love. She summoned the almighty and powerful daemon of Mathematics in a quite entertaining talk to reveal us all mere mortals the secrets of Love… Not really.

So many things to tell about this talk I do not know where to begin. But you know what, TED picking a math bimbo to sell books; I can understand. Turning Science into show business to make it appealing to the general public; I am for it.  Oversimplifing complex subjects to make them accessible to everyone even if the oversimplification is not quite true; I can take that. Using all the previous to push people into taking life changing decisions based on sloppy science… Well, allow me to draw a line there Ms. Fry. Science is acquiring a bad reputation little by little and talks like these are one of the reasons why.

Anyway, long story short, ignore her love tips and specially #2, that one is really damaging. On my side, I will use Data Science and common sense to show that the best you can do is to marry / partner the person you are in love with when you are in love. And when it comes to use reason in the field of love, allow me please to quote Monsieur Blaise Pascal on this one:

“The heart has its reasons of which reason knows nothing”

Let’s now kick some ass in the name of good science. Misses Fry present us with three “Mathematically Verifiable” tips to:

1. Win at online dating: Show yourself the way your are.
2. Pick the perfect partner: Choose whoever is Continue reading

# How to combine p-values to avoid a sentence of life in prison

I find the use of statistics in the justice system a thrilling subject, specially so when you find out that some persons like Lucia de Berk have been handed life sentences based solely on flaw statistics coming from experts like Mr. Henk Elffers. So I’ll talk in this post about what he did wrong and how to avoid this kind of huge boo-boo in our statistical lives.

The use of statistics in the justice system has actually a long history, the amazing mathematician / engineer / physicist / philosopher of science Henri Poincaré already had to correct the misuse of statistics in the infamous Dreyfus trial.

But it was in the Lucia de Berk trial where combining p-values wrongly handed her a life sentence. I won’t go into the details of the trial, for that there are many other places like Mr. Richard D. Gill web page account of the trial and a video worth to have a look to. Instead I will focus on how to appropriately deal with a bunch of p-values to make sense of our data. Continue reading

# Priesthood, Pedophilia & Homosexuality

• At most 22 percent of catholic priests in the USA are homosexuals.
• Homosexual men in the USA, as a group, molest children at a rate at least 15 times higher than heterosexual men.

One  asteroid rubs Earth, a meteorite crashes on Russia and, a few days later, Pope Benedict XVI took the cosmic message and resigned. Nonetheless many people question the true reason for his resignation alleging that it has nothing to do with fatigue but rather with homosexuality networks within the Church (CNN guest claiming a 50% of homosexuals among priests) and unresolved pedophilia scandals. So I took a look at this percentage with our best friend when it comes to politically incorrect statistics; Bayes’ Theorem, and I got the results displayed above.

I know, I know, the numbers are pretty crazy, but they are based on data fetched from official sources and, before going into the details, let me play sociologist. Although homosexuals, as a group, molest children at higher rates than heterosexuals it is very important to realize that this does not necessarily mean homosexuals are more prone towards this behavior, assuming this might constitute an ecological fallacy, in this case it makes more sense that this outcome obeys to the fact that young boys are way less protected by parents than young girls and predators take advantage of this.

# The Calculations

To estimate the rate of homosexuals among catholic priests we will first estimate how much more likely are male homosexuals to engage in pederasty compared to male heterosexuals, then we will use this result join with the by gender percentage of children abused by catholic priests (81 percent of the victims were males in the USA) to calculate the final figure.

# Raped women pregnancy rate. Do they shut the whole thing down?

Missouri Congressman Todd Akin’s infamous comment about women being able to avoid pregnancy in a “legitimate” rape and the subsequent media frenzy made me wonder if there was any truth in it, if you think about it, the stress and depression a rape generates could be so extreme that women’s body might after all “shut the whole thing down”. So I’ve estimated the chances for this to happen and it turns out that this politician was… oh, surprise.

After the Akin’s foot in mouth we could read all over the Internet media quoting gynecologists saying that chances of pregnancy are the same regardless whether a woman is raped or not. So people’s snarly comments and the “this is obvious, you gotta be stupid to believe otherwise” attitude we observe when anything gains political momentum spread like wildfire. It is at this point when questioning the crowd makes us feel uncomfortable but, since I know how much trust and credit I can give to media, I overcame my lack of comfort by running the numbers myself, and well, turns out that Mr. Akin might be as right as wrong since Continue reading

# My Baby Shot Gun Control Me Down… with Statistics

Best way to lie? Statistics, no question about it, and if you don’t believe me I can show you some statistics that support this point… or any other point for that matter. But statistics are even better to lie to yourself; the same way different people see different things when they look at clouds, people also see different things when they look at data, and if there is one endless debate where people reinforce their beliefs with cherry picked data that debate is gun control.

Talking about cherry picking, let’s check at the The Young Turks‘ argument to support stricter gun control in the USA: “ban guns like Japan and you have 2 gun related homicides, don’t ban guns and you have 10,225 gun related homicides”. And they explain their point in a way that you’d better not to dare to disagree. Sure they could have compared data from 2007 where the USA had 9,146 gun related homicides and Brazil 34,678 mentioning that Brazil has much tighter gun control laws than the USA but, unfortunately, this is the way politics and media works; it does not matter if you are right or wrong, only if you look right or wrong. But let’s analyze some data and a few more examples of how information is presented to us. Continue reading