CMSC250

Probability

Probability

Basic Terms of Probability
Counting Events and Basic Probabilities
Expected Value

Basic Terms of Probability

Sample Space: The set of all possible outcomes or results of an action

Sample Space: The set of all possible outcomes or results of an action

Rolling a 6 sided dice?$\{1,2,3,4,5,6\}$

Permute "CAT"?$\{CAT,CTA,ACT,ATC,TAC,TCA\}$

Flip coin and roll 4 sided dice?$\{(H,1),(H,2),(H,3),(H,4),(T,1),(T,2),(T,3),(T,4)\}$

Event: A subset of the sample space, usually a particular outcome

Event: A subset of the sample space, usually a particular outcome

Rolling 2 distict dice and obtaining the sum of 4?$\{(1,3),(2,2),(3,1)\}$

3 coins with at least 2 heads?$\{HHT,HHH,THH,HTH\}$

Flip coin and roll 4 sided dice?$\{(H,1),(H,2),(H,3),(H,4),(T,1),(T,2),(T,3),(T,4)\}$

Permute "CAT" with "AT"?$\{CAT,ATC\}$

Cardinality: $N(S)$ or $\vert S\vert$; The number of items in set $S$

Probability(informal): If all outcomes of a sample space $S$ are equally likely, the probability of event $A$ is

$P(A) = \frac{\vert A\vert}{\vert S\vert}$

$P(A) = \frac{\vert A\vert}{\vert S\vert}$

3 coins with at least 2 heads?$\frac{4}{8} = .5$

Roll 2 distinct dice with sum 4?$\frac{3}{36} = \frac{1}{12}$

Permute "PYTHON" where no "PY" or "YP"?$\frac{480}{720} = \frac{2}{3}$

Counting

Counting is Hard

Counting is Hard

Some helpful rules

$\vert A \cup B\vert = \vert A\vert + \vert B\vert - \vert A \cap B\vert$

Probability Trees

Probability

Probability (formal): A probability function maps all the events in a sample space $S$ to the $\mathbb{R}$

  • For any event $A \subseteq S, 0 \le P(A) \le 1$
  • $P(\emptyset) = 0, P(S) = 1$
  • If $A$ and $B$ are disjoint, then $P(A \cup B) = P(A) +P(B)$

Probability (formal): A probability function maps all the events in a sample space $S$ to the $\mathbb{R}$

  • For any event $A \subseteq S, 0 \le P(A) \le 1$
  • $P(\emptyset) = 0, P(S) = 1$
  • If $A$ and $B$ are disjoint, then $P(A \cup B) = P(A) +P(B)$

Note: $P(A^c) = 1 - P(A)$

Note: $P(A \cup B) = P(A) + P(B) - P(A\cap B)$

Expected Value

Suppose an outcome of an event is a number. Each outcome has a different probability.

For events $a_1,a_2,a_3,\dots a_n$, which have probability $p_1,p_2,p_3,\dots p_n$ respectively, the expected value is

$E = \sum\limits_{i=1}^{n}p_ia_i$

$E = \sum\limits_{i=1}^{n}p_ia_i$

Roll a 6 sided dice:$\frac{1}{6}(1+2+3+4+5+6) = 3.5$

Flip a coin unti 3 flips or you flip HH. If the first two flips is HH you get $5. Else you get (#H - #T). $\frac{3}{4}$