# Probability Revision

.

## Discrete Random Variables

.

**Outcomes**are the possible results of an experiment.

**Sample Space**(or**Universal Set**) is the list of all possible outcomes.- We use the symbol $\varepsilon$ to represent the Universal Set.

**Discrete**means the outcomes within the sample space are separate and countable- as opposed to continuous.

**Continuous**means the outcomes can be any Real values between the endpoints - usually resulting from measuring- as opposed to counting.

- An
**event**is the set of one or more outcomes being described.

**Probability**is the likelihood (chance) of an event happening.- Probability is usually expressed as a fraction or decimal between
**0**(impossible) and**1**(certain). - It is sometimes expressed as a percentage between 0% and 100%.

- Probability is usually expressed as a fraction or decimal between

.

## Sets and Venn Diagrams

.

- A
**set**is a collection of elements (things, people, activities, numbers, ideas, etc)

**Sets**are often named with capital letters:**A**,**B**,**C**, etc

**n(A)**represents the number of elements in the set called**A**.

- $\varepsilon$ represents the Universal Set.

.

A **Venn Diagram** is a way of representing one or more sets within the Universal Set (or sample space).

- A rectangle is used to denote the entire sample space (or the Universal Set)

- A circle inside the rectangle denotes a set (a subset of the Universal Set)

- The circle may contain
- the elements within that set, or
- the number of elements within the set.

.

### Example 1

- $\varepsilon = \big\{1,\; 2,\; 3,\; 4,\; 5,\; 6,\; 7,\; 8\big\}$

- $A = \big\{1,\; 3,\; 5,\; 7\big\}$

- $B = \big\{1,\; 2,\; 3,\; 4\big\}$

.

### Union (OR)

- The
**Union**of two events is $A \cup B$

- It includes all outcomes in either
**A**or**B**or both.

- $A \cup B = \big\{ 1,\; 2,\; 3,\; 4,\; 5,\; 7 \big\}$

- We sometimes use the word "
**or**" instead of Union

.

### Intersection (AND)

- The
**Intersection**of two events is $A \cap B$

- It includes only those outcomes which are in both
**A**and**B**

- $A \cap B = \big\{1,\; 3\big\}$

- We sometimes use the word "
**and**" instead of Intersection

.

### Complement (NOT)

- The
**Complement**of**A**is**A'**- not to be confused with "compliment" which is a nice comment about someone

- The
**Complement**of**A**includes all outcomes that are not in**A**(or outside of**A**)

- $A' = \big\{2, \; 4,\; 6,\; 8\big\}$

- We sometimes use the word "
**not**" instead of complement

.

**NOTE:**

.

## Probability of an Event occurring = Pr(A)

.

If each outcome is equally likely then:

.

… … $Pr(A) = \dfrac{ \text{Number of outcomes in A}}{\text{Total number of outcomes}}$

.

… … $Pr(A) = \dfrac{n(A)}{n(\varepsilon)}$

.

All probabilities must be between 0 and 1

.

… … $0 \leqslant Pr(A) \leqslant 1$

.

… … $Pr(A) = 0 \quad \longrightarrow$ Event is impossible

… … $Pr(A) = 1 \quad \longrightarrow$ Event is certain

.

The **sum** of probabilities of all possible outcomes in the event space is always **one**.

.

… … $Pr(A) + Pr(A') = 1$

.

… … An **event** and its **complement** covers all possible outcomes in the event space.

.

… … If **A, B, C** don't overlap and **A or B or C** covers all possible outcomes, then

.

… … $Pr(A) + Pr(B) + Pr(C) = 1$

.

### New notation:

Sometimes we use **p(x)** instead of **Pr(A)**

- where
**p(x)**represent the probability of event**x**happening.

- $\Sigma p(x) = 1$

- recall that $\Sigma$ is the symbol for "Sum"

.

### Example 2

A bag contains **5** black marbles, **7** red marbles (total = **12**)

… **a)** .. What is the probability that a randomly drawn marble is black?

… **b)** .. What is the probability that a randomly drawn marble is not black?

**Solution:**

… … … Let **B** = Black Marble (the event that a black marble is drawn)

.

… … … $Pr(B) = \dfrac{5}{12}$

.

.. **b)** .. What is the probability that a randomly drawn marble is not black?

.

… … … Since **B** = Black Marble,

.

… … … **B'**= the complement of drawing a black marble (ie the event the marble is not black)

.

… … … $Pr(B) + Pr(B') = 1$

.

… … … $Pr(B') = 1 - Pr(B)$

.

… … … $Pr(B') = 1 - \dfrac{5}{12}$

.

… … … $Pr(B') = \dfrac{7}{12}$

.

## The Addition Rule of Probability

.

For any events **A** and **B**:

… … $Pr(A \cup B) = Pr(A) + Pr(B) – Pr(A \cap B)$

… … We have to subtract $Pr(A \cap B)$ because otherwise we would be counting it twice.

In the above Venn Diagram, we have

… … … … $Pr(A \cup B) = \dfrac{6}{8} = \dfrac{3}{4}$

… … … … $Pr(A) = \dfrac{4}{8} = \dfrac{1}{2}$

… … … … $Pr(B) = \dfrac{4}{8} = \dfrac{1}{2}$

… … … … $Pr(A \cap B) = \dfrac{2}{8} = \dfrac{1}{4}$

.

… … $Pr(A \cup B) = Pr(A) + Pr(B) – Pr(A \cap B)$

.

… … $Pr(A \cup B) = \dfrac{1}{2} + \dfrac{1}{2} - \dfrac{1}{4}$

.

… … $Pr(A \cup B) = \dfrac{3}{4}$

.

## Mutually Exclusive Events

.

Two events are **mutually exclusive** if they cannot both occur at the same time

… … $A \cap B = \big\{ \big\}$

so

… … $Pr(A \cap B) = 0$

Therefore:

… …. $Pr(A \cup B) = Pr(A) + Pr(B)$

.

For example, if

**A**= the current month is May**B**= the current month is July

- Then
**A**and**B**are mutually exclusive. They cannot both be true at the same time.

.

## Independent Events

.

Two events are **independent** if the outcome of one does not influence the outcome of the other.

.

Two events are **dependent** if the outcome of one does influence the outcome of the other.

.

For Example:

… …. Tossing one coin and then a second coin:

… … … … the outcomes are **independent**.

… … Drawing one card from a deck of playing cards and then drawing a second card without replacing the first one:

… … … … the outcomes are **dependent**.

… … … … because the probabilities for the second card are different depending on which card was drawn first.

.

If **A** and **B** are **independent** then

… …. $Pr(A \cap B) = Pr(A) \times Pr(B)$

Also

If $Pr(A \cap B) = Pr(A) \times Pr(B)$ then

… … the events **A** and **B** are **independent**.

.

### Example 3

An eight-sided dice has possible outcomes $\big\{1,\; 2,\; 3,\; 4,\; 5,\; 6,\; 7,\; 8\big\}$

If $A = \big\{1,\; 2\big\} \text{ and } B = \big\{2,\; 3,\; 4,\; 5\big\}$

Show that **A** and **B** are independent.

**Solution:**

… … $Pr(A) = \dfrac{2}{8} = \dfrac{1}{4}$

… … $Pr(B) = \dfrac{4}{8} = \dfrac{1}{2}$

.

… … $Pr(A) \times Pr(B) = \dfrac{1}{4} \times \dfrac{1}{2} = \dfrac{1}{8}$

.

… … and

… … $A \cap B = \big\{ 2 \big\}$

… … $Pr(A \cap B) = \dfrac{1}{8}$

.

… … Since $Pr(A \cap B) = Pr(A) \times Pr(B)$ we have that **A** and **B** are independent.

.

## Karnaugh Maps and Probability Tables

.

These are both laid out the same except that

- a
**Karnaugh Map**shows the number of possible outcomes in each cell - a
**Probability Table**shows the probability of that cell.

.

### Example 4

A bag of 20 beads contains 8 red beads and 12 blue beads.

- Six of the red beads are cubes, the rest are spheres.
- Six of the blue beads are cubes, the rest are spheres.

Draw a Karnaugh Map and a Probability Table for this situation.

**Solution:**

… … Let **A** = red … then **A'** = blue

… … Let **B** = cube … then **B'** = sphere

.

## Conditional Probability

**Conditional probability** is the probability of one event, **given that** another event has already happened.

.

The probability of **A**, given that **B** has happened is:

.

… … $Pr(A \, | \, B) = \dfrac{Pr(A \cap B)}{Pr(B)}$

or

… … $Pr(A \cap B) = Pr(A \, | \, B) \times Pr(B)$

.

### Example 5

It has been noticed that in a particular town

- The probability of rain during the day is 0.4
- The probability there are clouds at dawn is 0.3
- The probability that there are clouds at dawn and it rains during the day is 0.2

Find

… **a)** .. the probability that there is rain, given that there were clouds at dawn

… **b)** .. the probability that there were clouds at dawn, given that it rains.

**Solution:**

… … … Let **R** = the event that it rains during the day

… … … Let **C** = the event that there were clouds at dawn

… … … From the question, we know:

… … … … $Pr(R) = 0.4$

… … … … $Pr(C) = 0.3$

… … … … $Pr(R \cap C) = 0.2$

.

… **a)** .. the probability that there is rain, given that there were clouds at dawn

… … … $Pr(R \, | \, C) = \dfrac{Pr(R \cap C)}{Pr(C)}$

… … … $Pr(R \, | \, C) = \dfrac{0.2}{0.3}$

… … … $Pr(R \, | \, C) = \dfrac{2}{3}$

.

… **b)** .. the probability that there were clouds at dawn, given that it rains.

… … … $Pr(C \, | \, R) = \dfrac{Pr(C \cap R)}{Pr(R)}$

… … … $Pr(C \, | \, R) = \dfrac{0.2}{0.4}$

… … … $Pr(C \, | \, R) = \dfrac{1}{2}$

… Notice that

… … … $Pr (R \, | \, C) \neq Pr (C \, | \, R)$

.

In general:

… … $Pr (A \, | \, B)$ is **not** equal to $Pr (B \, | \, A)$

.

## Tree Diagrams

**Tree diagrams** are useful for understanding both dependent and independent events

- The probability of each outcome goes on the middle of each branch

- The probability of an
**outcome**is the product of the probabilities on the branches leading to that result.

- If more than one outcome meets the criteria for an event then
- the probability of that event is the sum of the probabilities of the relevant outcomes.

.

### Example 6

Nadine's car starts 70% of the time. If her car starts, she has an 80% chance of arriving at work on time.

If her car doesn't start, she has a 50% chance of arriving at work on time.

Find the probability that Nadine arrives on time.

**Solution:**

… … Let **C** = Car Starts … so **C'** = car doesn't start

… … Let **O** = On time … so **O'** = not on time)

.

… … The Probability that Nadine arrives on time is $Pr(O)$

.

… … $Pr(O) = Pr(CO) + Pr(C'O)$

.

… … $Pr(O) = 0.56 + 0.15$

.

… … $Pr(O) = 0.71$

.

## Combinations

**Combinations** are the number of ways that items can be selected from a set where the order they are selected in is not important.

For example, to select **3** letters out of $\big\{a,\; b,\; c,\; d\big\}$ where the order is not important,

… … there are **4** possible combinations. $\big\{abc,\; abd,\; acd,\; bcd\big\}$

.

The number of Combinations of **n** objects, selected **r** at a time, is given by:

.

… … $^nC_r = \left( \begin{matrix} n \\ r \\ \end{matrix} \right) = \dfrac{n!}{(n-r)! \,r!}$

.

… … … … $^nC_r \text{ and } \left( \begin{matrix} n \\ r \\ \end{matrix} \right)$ are alternate notations for **n** combinations taken **r** at a time.

… … Recall that $n! = n(n - 1)(n - 2) \dots 3 \times 2 \times 1$

… … … … where **n** can be any Natural Number (positive integer)

.

… … Eg: $5! = 5 \times 4 \times 3 \times 2 \times 1 = 120$

.

… … **NOTE:** To make the Combinations rule work correctly, we define $0! = 1$

.

The **Classpad Calculator** can find both **n!** and ^{n}C_{r}

- In the Virtual Keyboard,
**ADV**tab (use the down arrow below the tabs)

… … **Enter: nCr(4, 3)** to get ^{4}C_{3}

.

### Example 7

A committee of **6** people is to be selected from a group of **10**.

How many combinations are possible?

**Solution:**

… … A total of 10 people involved so $n = 10$

.

… … We select 6 at a time so $r = 6$

.

… … $^{10}C_6 = \left( \begin{matrix} 10 \\ 6 \\ \end{matrix} \right) = \dfrac{10!}{4! \, 6!} = 210$

.

… … or use the calculator by entering **nCr(10, 6)**

.