# Bayes' Theorem

If A_{ 1}, A_{ 2 },... , A_{n }are:

Mutually exclusive events.

A_{ 1 } A_{ 2 } ... A_{ n } = S.

And B is another event, then:

Where:

**p(A _{1})** is the

**prior probability**.

**p(A _{i}/B)** is the

**posterior probability**.

#### Examples

20% of a company's employees are engineers and 20% are economists. 75% of the engineers and 50% of the economists hold a managerial position, while only 20% of non-engineers and non-economists have a similiar position. What is the probability that an employee selected at random will be both an engineer and a manager?

The probability of having an accident in a factory that triggers an alarm is 0.1. The probability of it sounding after the event of an incident is 0.97 and the probability of it sounding after no incident has has occured is 0.02.

In an event where the alarm has been triggered, what is the probability that there has been no accident?

I = Accident occurred.

A = Triggered alarm.