%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Lecture 7: Basics of Discrete Probability }

{\footnotesize Copyright, Michael Monagan and Jamie Mulholland, 2020.}
\space{1cm}

Grimaldi 3.4 and 3.5

\vspace{1cm}

Suppose we pick a binary string $x$ of length 6 at {\bf random}. \\
What is the {\bf probability} that $x$ has two 1's in it?

\vspace{3cm}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
Example 1.  Suppose we pick a binary string $x$ of length 6 at {\bf random}. \\
What is the {\bf probability} that $x$ has two 1's in it?

\vspace{10cm}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\begin{definition}[Probability of an Event]

\medskip

\noindent
\textbf{Hypothesis:}\\
$S$ is a \textbf{set} of possible outcomes called the {\bf sample space},
all having equal likelihood. 
Each subset $A \subseteq S$ is called an {\bf event},
i.e. a set of considered outcomes.
Each element of $S$ determines an {\bf outcome}.

\medskip

\noindent
\textbf{Experiment:}\\
We generate an event by ``drawing" at random an outcome $x$ from $S$. \\
{\color{blue}
Note: Other words used for ``drawing'' are ``choosing'', ``selecting'' and ``picking''.
}

\medskip
\textbf{Event:}
Let $Pr(A)$ denote the probability that $x \in A$.


\medskip

\textbf{Question:} What is $Pr(A)$ ? \\
\textbf{Answer:}  If each outcome is equally likely and $|S|$ is finite then
$$Pr(A) = \dfrac{|A|}{|S|}$$

\end{definition}

Fundamental Principle.  Calculating $Pr(A)$ requires defining the two sets
$S$ and $A$.  If all outcomes are
equally likely, we just need to calculate $|S|$ and $|A|$.

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
Example 2.  What is the probability that a random binary string
of size $n \ge 2$ starts with 11 ?

\vspace{3.5cm}
Example 3.  What is the probability that the sum of two rolls of a dice is 7 ?

\vspace{6cm}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}

\begin{definition}[Axioms of Probability]
Let $S$ be a sample space and let $A$ and $B$ be subsets of $S$.
\begin{enumerate}
\item[1.] $0 \leq Pr(A) \le 1$
\item[2.] $Pr(S) = 1$
\item[3.] If $A \cap B = \phi$ then $Pr(A \cup B) = Pr(A) + Pr(B)$.
\end{enumerate}
\end{definition}
\textbf{Note:} These axioms hold whether the outcomes of $S$ have equal likelihood or not.


\begin{theorem} [ the rule of complement ]
Let $\bar A = S - A$ be the {\bf complement} of $A$. Then $Pr(\bar A) = 1-Pr(A)$.
\end{theorem}

{\bf Proof:}

\vspace{3cm}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
Example 3 (illustrating the third axiom ) \ What is the probability that 
a random binary string of size $n \ge 3$ has exactly two 1's or exactly three 1's ?

\vspace{10cm}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
Example 4.  Let $S = \{ 1,2,3,\dots,12 \}$. 
If $x$ is chosen from $S$ at random what is the probability 
that $x$ is divisible by 2 OR 3 ?

\vspace{10cm}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\begin{theorem}[ the additive rule ]
Let $S$ be a sample space and $A,B \subseteq S$ be two events
from $S$.  Then 
$$ Pr(A \cup B) = Pr(A) + Pr(B) - Pr(A \cap B). $$
\end{theorem}

{\bf Proof:}

\vspace{10cm}

\end{frame}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}

Exercise.  Let $S = \{ 1,2,3,\dots,60 \}$. 
If $x$ is chosen from $S$ at random what is the probability 
that $x$ is divisible by 2 {\bf or} divisible by 3 {\bf or}  divisible {\bf or} 5 ? \\
Generalize the additive rule to three subsets $A,B,C$.

\vspace{10cm}

\end{frame}

