### Probability

Here you learned some fundamental rules of probability. Using notation, we could say that the outcome of a coin flip could either be **T** or **H** for the event that the coin flips tails or heads, respectively.

Then the following rules are true:

- $P(H)=0.5$
- $1−P(H)=P(not H)=0.5$

where $not H$ is the event of anything other than heads. Since, there are only two possible outcomes, we have that $P(not H)=P(T)=0.5.$ In later concepts, you will see this with the following notation: $¬H$. - Across multiple coin flips, we have the probability of seeing
**n**heads as $P(H_{n}$. This is because these events are independent.

We can get two generic rules from this:

- The probability of any event must be between 0 and 1, inclusive.
- The probability of the compliment event is 1 minus the probability of an event. That is the probability of all other possible events is 1 minus the probability an event itself. Therefore, the sum of all possible events is equal to 1.
- If our events are independent, then the probability of the string of possible events is the product of those events. That is the probability of one event
**AND**the next**AND**the next event, is the product of those events.

### The Binomial Distribution

The **Binomial Distribution** helps us determine the probability of a string of independent ‘coin flip like events’.

The probability mass function associated with the binomial distribution is of the following form:

$P(X=x)=x!(n−x)!n! p_{x}(1−p_{n−x}$

where **n** is the number of events, **x** is the number of “successes”, and **p** is the probability of “success”.

We can now use this distribution to determine the probability of things like:

- The probability of 3 heads occurring in 10 flips.
- The probability of observing 8 or more heads occurring in 10 flips.
- The probability of not observing any heads in 20 flips.

### Conditional Probability

In this lesson you learned about conditional probability. Often events are not independent like with coin flips and dice rolling. Instead, the outcome of one event depends on an earlier event.

For example, the probability of obtaining a positive test result is dependent on whether or not you have a particular condition. If you have a condition, it is more likely that a test result is positive. We can formulate conditional probabilities for any two events in the following way:

$P(A∣B)=P(B)P(A ∩ B) $

In this case, we could have this as:

$P(positive∣disease)=P(disease)P(positive∩disease) $

where $∣$ represents “given” and $∩$ represents “and”.

# Learning Objectives – Conditional Probability

We use the notation where

- $P(A)$ means “the probability of A”
- $P(¬A)$ means “the probability of NOT A”
- $P(A,B)$ means “the probability of A
**and**B” and - $P(A∣B)$ means “the probability of A
**given**B.