Bayesian P-Value… No, for real.

4688cfd1f5c030adc2cdbd611821a189When combining p-values in a meta-analysis framework there are many different methods we can apply based upon where the p-values come from and what their relationship is. The most well known methods being Fisher’s Method and Stouffer’s.

So I thought I would add one more out of fun and because why not; The Bayesian P-Value method! It’s sort of evil… Muhahaha! Muhahaha! Muhahaha!

So this is how….

Continue reading

If you play with your Prior you’ll go blind

bayeshp2

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.

Objectivity is dead, long live Objectivity!

Are p-values an objective measure? Bayesian Statistics are not as objective as Frequentist statistics for the simple reason that they need more assumptions, that is, a prior. This is why to even talk about Objective Bayesian Statistics is an oxymoron and yet seems to be the most popular Bayesian school out there. But anyhow, how about p-values then, can they be subjective? Is there such thing as Objectivity in statistics? death_of_the_justice_by_quadraro-d6sapo4

For a time I thought p-values were an objective measure but then a couple of blows put to rest my dream on having an objective procedure to deal with uncertainty. This is the story of the Subjectivity one-two combo that knocked out flat my Objectivity dreams…

Continue reading

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 🙂

Continue reading

Data Science vs Bimbo Math

Ms. FrySaint 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

Scientist at last, Scientist at last, thanks God almighty I’m a Scientist at last!

I wanted to be a scientist ever since I read a comic where scientist Bruce Banner turns into The Incredible Hulk. I did not know what a scientist was or what kind of scientist I wanted to be, yet, I thought that the scientific career sounded like lots of fun if it can turn you up into a huge green monster.

bruce banner
How Scientists look like for a 12 years old

I guess that for children of my age back in those days Marvel comics were the closest thing to Harry Potter for children nowadays (Let’s get ready for a massive turn up of sorcerers and witches in the coming years by the way).

So there I am after a few years since I read the comic and for reasons beyond this post but that can easily be described like a billiard break(ing bad) I end up with a couple of degrees; Computer Science and Statistics, and a Master in Operation Research (more of the same stuff).

Yet, I never considered myself (nor did anyone else) as a scientist or a researcher since, well… when programming I don’t feel much like doing science no matter how big the word science is in my Computer Science degree, and the degree in Statistics does not make me feel like an scientist either nor the Master like a researcher.

Statistics by themselves are just a field of mathematics and mathematicians are more into precise grammar than into writing beautiful books. Not to mention the opinion of physicists like Feynman about the current use of statistics for science that downgrades Social Sciences and other fields into Pseudo-Science.

There was a time when some of the work I was doing could be named as Data Mining and this seemed to push me further and further away from my childhood dream since now I could be considered a Miner instead of a Scientist… Don’t get me wrong, Miner is no a bad profession if you want to start a revolution but all the glamour of the word science was gone and so my dream to be a scientist darkened with soot.

But then… Data Science came along, wait, what? That’s right! Data Science is what you get when we consider every procedure that brings us knowledge stripped of any field background, the intersection of every science known to men, the Mixed Martial Arts of knowledge. Data Science… if you think about it, can there be any other kind of science?

Not surprisingly when meeting with fellow Data Scientists we’ll find out they come from all sort of venues and that data science teams are usually Macedonian salads of scientific backgrounds which include Physicists (of course) and Musicians (you heard me).

So turns out that after so many years my dream came true and I became exactly what I wished back in those days: a Scientist with no particular field… but data, and since everything is data, now everything is my field. So I can finally proudly say “Scientist at last, Scientist at last, thanks God almighty I’m a Scientist at last!”.

And now if you excuse me I have to go back to my scientific project codenamed Green. Thank you very much.

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.

Lucia reads post, photo by Carole Edrich
Lucia reads post, photo by Carole Edrich (Photo credit: Wikipedia)

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