Bayesian statistics or the story when god was invented

Panda
Science Journey
Published in
5 min readAug 18, 2019
Photo by JOHN TOWNER on Unsplash

I talked to friends. The talk moved to statistics and economics and the following idea came up. The idea is if I have a fair coin. Meaning the chance of it to fall on the head is the same as falling on the tail and the coin was tossed 10 times and it fell all the times on the head. Is the chance to fall on the tail is higher?

The room was divided. Some people said yes. Justification for that is that the mean is 0.5 otherwise we could start to suspect it was biased. Another part of the room was against it. Their justification is that the coin doesn’t have a memory and no one can make it fall either on tail or head.

So, who was right? Is God of statistics intervene into the throw and after 10 times the fair coin become unfair? Of course not. Our intuition tricks us. I think it’s because we live in a Bayesian world. And if something happens we need to adopt. Our world consists of systems with memory.

However, the opposed group had an ace in their sleeve. Bayesian statistics.

Bayesian statistics

The idea of Bayesian statistics is quite simple. So simple that when Thomas Bayes discover it he didn’t think to publish it.

It goes like this. If you find a coin and start tossing it. Do you gain information from each toss? And if so, what do you gain? More so, if you don’t know anything about the coin but you have a prior idea. It may be wrong. But it’s still an idea. Could you use it?

You can use it. If you start let’s say from 1000 points and make some assumption. Suppose the coin is biased 60% towards heads. Now each time you throw your coin and it falls head you multiply the points by the assumption. And continue to multiply the result by the probability of the outcome.

You will end up with some amount of points. Now if you make a graph from all the assumption to find with that assumption you will end up with a max number of points. This assumption will be the bias of the coin. This rethinking you doing each time you get additional info.

More so, if you divide by the sum of all points in the system at each round you will normalize the graph between 0 to 1. When at the infinity it will be 1 at the assumption that is the closest to your idea and 0 at all other assumptions.

OK, But how can I use it in real life?

Photo by Caspar Camille Rubin on Unsplash

You want to make a calculated guess. Suppose your question is if Mike likes playing PlayStation. Formally you say this:

Divide by the chance that Mike doesn’t like playing PlayStation:

So you get:

You start with belief, what do you think mikes likes or dislikes playing PlayStation. Suppose for the argument that you think that the chances are 50:50. You get the following:

You don’t have any preference. But now you learn Mike likes football and from your research, you know that 80% of who plays football likes PlayStation. So now,

There is 4 more chance that Mike likes playing PlayStation than doesn’t like playing it.

Now you learn that Mike has a PC and from your research, you know that the chance of who has a PC and likes playing PlayStation is only 10%. So now,

You update your probability and now there only more 0.44 that Mike likes playing the PlayStation. Meaning there is 2.2 times more chance that Mike doesn’t like it.

And finally, you learn that Mike likes playing PlayStation. So now,

At each step that we did, we could update our guess according to the new data that arrived. This is huge, we could continue to add data and each step our probability would change.So our calculated guess will change. More so we can insert our believes and prior knowledge into the equation.

What about the coin?

It a common mistake to connect the two statistics and start with Bayesian while having the frequent model that the coin is fair. And now wait till the coin will balance at each throw.

Bayesian statistics doesn’t say how the coin will flip at each round. It connects all the flips and gives us a way to count its probability till a certain point. If a coin is fair than the coin is fair. There is always 50:50 chance no meter the past or the future. What we call an INDEPENDENT EVENTS because they are independent.

Photo by Colton Duke on Unsplash

If you have any questions or comments, just let me know.

--

--