Ten days of statistics (3) - Probability


cover

Probability

An experiment is any procedure that can be infinitely repeated and has a limitted set of possible outcomes (sample space). We define an event to be a set of outcomes we interested in. The probability of an event is:

P=Number of interested outcomesTotal possible outcomesP = \frac{\text{Number of interested outcomes}}{\text{Total possible outcomes}}

From here we will consider 2 events AA and BB, in a sample space SS

Events

Let P(A)P(A) denotes the probability of event AA occurs, P(Ac)P(A^c) denotes the probability of event AA not occurs.

A compound event ABA \cup B is an event where either AA or BB occurs.

AA and BB is mutually exclusive events if they have no events in common. Formally AB=A \cap B = \varnothing

An event is said to be exhaustive when it equals to SS. AA and BB is collectively exhaustive when their union covers the sample space. Formally AB=SA \cup B = S and P(AB)=1P(A \cup B) = 1

If the outcome of event AA has no impact on event BB, they are considered to be independent. When AA and BB are independent, P(AB)=P(A)×P(B)P(A \cup B) = P(A) \times P(B)

Conditional probability

This is defined as the probability of an event occurring, assuming that one or more other events have already occurred. Let P(BA)P(B|A) denotes the probability of BB given AA occurred. If events AA and BB are independent. It’s obvious that

P(BA)=P(B)P(B|A) = P(B)

If events AA and BB are not independent, then we must consider the probability that both events occur.

P(BA)=P(AB)P(A)P(B|A) = \frac{P(A \cap B)}{P(A)}

Bayes’ theorem

Bayes’ theorem is stated mathematically as the following equation

P(AB)=P(BA)×P(A)P(B)P(A|B) = \frac{P(B|A) \times P(A)}{P(B)}

Which also equals to

P(BA)×P(A)P(BA)×P(A)+P(BAc)×P(Ac)\frac{P(B|A) \times P(A)}{P(B|A) \times P(A) + P(B|A^c) \times P(A^c)}

Where P(B)0P(B) \neq 0

Proof can be found here: https://en.wikipedia.org/wiki/Bayes%27_theorem

Next lesson: Combinatorics

Made with love using Svelte, Three.js