...

/

Likelihood Functions

Likelihood Functions

In this lesson, we will have a look at Conditional Probabilities as well as Joint Probability.

In the previous lesson, we implemented an efficient conditioned probability using the Where operator on distributions; that is, we have some “underlying” distribution, and we ask the question “if a particular condition has to be met, what is the derived distribution that meets that condition?” For discrete distributions, we can compute that distribution directly and just return it.


Conditional Probabilities as Likelihood Functions

There is another kind of conditional probability though, which is much more rich, complex and counter-intuitive, and that is exploring the relationship between “what is the probability of XX?" and "what is the probability of YY given that we know XX?

For example: pick a random person in the world who has a cold. What is the probability that they sneezed in the last 2424 hours? Probably something like 85%85\%.

Now pick a random person who does not have a cold. For them, the probability is maybe more like 3%3\%. In months when we do not have a cold, we sneeze maybe one or two days.

So what we’ve got here is a rather more complex probability distribution; in fact, we have two entirely different distributions, and which one we use depends on a condition.

Notice how this is related to our recent discussion of conditioned probabilities but different. With a Where clause we are saying make the support of this distribution smaller because some outcomes are impossible based on a condition. What we’re talking about here is choosing between two (or more) distributions depending on a condition.

The standard notation for this kind of probability in mathematics is a bit unfortunate. We would say something like

P(sneezednocold)=0.03P(sneezed|no \:cold ) = 0.03

to represent 3%3\% chance that we sneezed if we didn’t have a cold and

P(sneezedcold)=0.85P(sneezed|cold) = 0.85

to represent ...