Chapter 2 – Maximum Likelihood#

Data Science and Machine Learning for Geoscientists

Now, with the probabilities of predictions given by the model, we need to consider what is a good model. Although all models (good or bad) can give us a probability of certain event, yet some models will have higher accuracy in terms prediction, and that infers it to be a better model.

For example, if an event actually happened, and the model thinks it is highly likely to happen, then this model is better than the model that thinks it is unlikely to happen. Let’s look at the admission example again, the first AI model coded by Jianou has the following predictions:

Student A

Student B

Student C

Student D

Prob(Accepted)

0.7

0.8

0.2

0.4

Actual Result

Y

N

Y

N

Prob(Event)

0.7

0.2

0.2

0.6

The AI above predicts that the student A has 70% of the chances to be accepted by the university. Student A actually was accepted (Y). So again, the AI thinks that the probability of this event (student A got accepted) to happen is 70%. For student B, however, the AI predicts that student B has a very high chance to be accepted (80%), but the student got rejected (N) in reality, so in that case, the AI thinks that this event (student B got rejected) has only 20% of the chances to actually happen. Same for the student C and D. For an evaluation of the overall performance of the AI, we can multiply the 4 Prob(Event).

(11)#\[ 0.7*0.2*0.2*0.6 = 1.68\% \]

The second AI model’s predictions (shown below) are far closer to the actual results.

Student A

Student B

Student C

Student D

Prob(Accepted)

0.7

0.3

0.8

0.2

Actual Result

Y

N

Y

N

Prob(Event)

0.7

0.7

0.8

0.8

So the Prob(Event) is high for a more accurate prediction. In the contrary, if the Jianou’s AI keeps making unsatisfying predictions such as it did for student B, then the Prob(Even) would be very low. Again, we can evaluate the performance of the AI quantitatively by multiplying Prob(Event) together.

(12)#\[ 0.7*0.7*0.8*0.8 = 31.36\% \]

This quantitative comparison between the two model reveals that the second AI, the Cambridge Analytica, is a better prediction model. The approach of choosing the larger multiplication of Prob(Event) is known as `The Maximum Likelihood’.