# How is Bayes' Theorem used in artificial intelligence and machine learning?

How is Bayes' Theorem used in artificial intelligence and machine learning?

As a high school student, I will be writing an essay about it, and I want to be able to explain Bayes' Theorem, its general use, and how it is used in AI or ML.

## 3 Answers

Bayes theorem states the probability of some event B occurring provided the prior knowledge of another event(s) A, given that B is dependent on event A (even partially).
A real-world application example will be weather forecasting. Naive Bayes is a powerful algorithm for predictive modelling weather forecast. The temperature of a place is dependent on the pressure at that place, percentage of the humidity, speed and direction of the wind, previous records on temperature, turbulence on different atmospheric layers, and many other things. So when you have certain kind of data, you process them certain kind of algorithms to predict one particular result (or the future). The algorithms employed rely heavily on Bayesian network and the theorem.

The given paragraph is introduction to Bayesian networks, given in the book, Artificial Intelligence – A Modern Approach:

Bayesian network formalism was invented to allow efficient representation of, and rigorous reasoning with, uncertain knowledge. This approach largely overcomes many problems of the probabilistic reasoning systems to the 1960s and 70s; it now dominates AI research on uncertain reasoning and expert systems. The approach allows for learning from experience, and it combines the best of classical AI and neural nets.

There are many other applications, especially in medical science. Like predicting a particular disease based on the symptoms and physical condition of the patient. There are many algorithms currently in use that are based on this theorem, like binary and multi-class classifier, for example, email spam filters. There are many things in this topic.I have added some links below that might help, and let me know if you need any kind of other help.

Helpful Links
1. First
2. Second

Since you are a highschool student I will try to express it easier. It is a problem for a machine to make a decision if you haven't given that information to it before. You should think of every cases while programming. But sometimes there can be so many cases, here Data Mining, Neural Networks, Fuzzy Logic etc are used withing AI. It saves your time and system is learning itself with enough examples given at the beginning and deciding itself.

Here in this link you can find an article about Bayesian learning. Example on p.33 is what you need I guess.

If you want to understand in one line how it's used in AI, I would say how you update your beliefs according to new data/information is calculated by Bayes' theorem.

Bayes' theorem says it will calculate the probability of something happening, given that some other thing has already happened. In this scenario, we already have some prior (prior belief or the probability of an event to occur without any new information). Now, we will simulate the event again and again and keep updating our probability of the event to occur with the information we collected.