## Introduction to Probability Models

Lecture 3

Qi Wang, Department of Statistics

Aug 24, 2018

### DeMorgan's law

• $$(A\cup B)^c = A^c \cap B^c$$
• $$(A\cap B)^c = A^c \cup B^c$$

### Inclusion-exclusion principle

\begin{aligned} P(A\cup B \cup C) & = P(A) + P(B) + P(C) \\ & - P(A\cap B) - P(A\cap C) - P(B\cap C) \\ & + P(A\cap B\cap C) \end{aligned}

$P(A\cup B\cup C)$
$P(A)$
$P(A) + P(B)$
$P(A) + P(B) + P(C)$
$P(A) + P(B) + P(C) - P(A\cap B)$
$P(A) + P(B) + P(C) - P(A\cap B) - P(A\cap C)$
$P(A) + P(B) + P(C) - P(A\cap B) - P(A\cap C) - P(B\cap C)$
\begin{aligned} & = P(A) + P(B) + P(C) \\ & - P(A\cap B) - P(A\cap C) - P(B\cap C) \\ & + P(A\cap B\cap C) \end{aligned}

### Conditional Probability

• The conditional probability of event $A$, given event $B$ is written as $P(A|B)$
• In general, if event $B$ has nonzero probability ($P(B) > 0$), then the conditional probability is defined as $$P(A|B) = \frac{P(A\cap B)}{P(B)}$$

### Example 1

In his senior year, Brad decides to apply to medical school. He sends his MCAT scores to two medical schools, Indiana and Johns Hopkins. Based on how his friends fared in their med school applications, Brad estimates that the probability of being accepted at Indiana is 0.7 and the probability of being accepted at Johns Hopkins is 0.4. The probability of being rejected by both Indiana and Johns Hopkins is 0.15.

Let J = accepted at Johns Hopkins; I = accepted at Indiana

1. Are J and I mutually exclusive?
2. Are J and I exhaustive? Do J and I form a partition of the sample space?
3. Draw a labeled Venn diagram that describe the problem above.
4. Find $P(J\cup I)$
5. What is the probability that Brad was accepted to both Indiana and Johns Hopkins?
6. What is the probability that Brad was accepted to Indiana only?
7. Knowing that Brad was accepted to Indiana, what was the probability that he was also accepted to Johns Hopkins?

### Example 2

We will toss a fair coin 3 times. Let event

• A = exactly 2 heads;
• B = $1_{st}$ toss is heads;
• C = $2_{nd}$ toss is heads

Find $P(A)$,$P(B)$, $P(A\cap B)$,$P(B│A)$,$P(A│B)$ and $P(B│C)$

### Example 3

Three of the major commercial computer operating systems are Windows, Mac OS, and Red Hat Linux Enterprise. A Computer Science professor selects 50 of her students and asks which of these three operating systems they use. The results for the 50 students are summarized below.

• 30 students use Windows
• 16 students use at least two of the operating systems
• 9 students use all three operating systems
• 18 students use Mac OS
• 46 students use at least one of the operating systems
• 11 students use both Windows and Linux
• 11 students use both Windows and Mac OS

Let Windows = W; Mac OS = M; and Red Hat Linux Enterprise = L. Use the above information to complete a three-way Venn diagram

1. Calculate the following: $N(W^c \cap M^c )$; $P(W^c \cup M^c)$; $P(W \cup M \cup L)$
2. What is the probability that the student used Windows only?
3. Given that the student used windows, what is the probability that he/she used Linux?