Introduction to Probability

Sample Spaces

Any action with a random outcome is defined as random experiment

The sample space for this action is the set of all possible outcomes. Denoted as SS.

A sample space can be discrete or continuous. Ex. flipping a coin, measuring weight (0,)(0, \infty)

For any events AA and BB in SS:

  • The union of ABA \cup B are all outcomes from SS in either AA or BB;
  • The intersection of ABA \cap B are all outcomes in both of AA and BB;
  • The complement of A(sometimes denoted as A\overline{A} or A-A) is the set of all outcomes in SS that are not in AA;

If AA and BB don't have any common outcomes, they are mutually exclusive. ABA \cap B is \varnothing, or the empty set.

Counting Techniques

Addition Rule

Consider a job that can be done with 2 independent machine; first machine OR second machine. The first machine does the job in m1m_1 ways and the second machine does the job in m2m_2 ways. Then, the job can be done in m1+m2m_1 + m_2 ways.

Multiplication Rule

A job that can be done in a k-stage procedure would be modeled as having kk bags, with m1m_1 items in the first bag,..., mkm_k items in kk-th bag. A kk-stage process is a process for which:

  • there are m1m_1 possibilities at stage 1;
  • regardless of the 1st outcome there are m2m_2 possibilities of stage 2
  • regardless of the previous outcomes, there are mkm_k choices at stage kk

Then there are m1m2...mkm_1\cdot m_2\cdot ...\cdot m_k total ways the process can turn out.

Ordered and Unordered Samples

Ordered Samples

Two different scenarios: with replacement or without replacement.

Sampling With Replacement (order important):

  • If nn outcomes and rr repetitions then nrn^r

Sampling Without Replacement (order important):

  • This results in nPr=n!(nr)!nP_r = \frac{n!}{(n-r)!}

Unordered Samples

In this case we would use nCr=n!(nr)!r!nC_r = \frac{n!}{{(n-r)!r!}} = (nr)n \choose r

Probability of an Event

For situations where we have a random experiment which has exactly NN possible **mutually exclusive, equally likely outcomes, we can assign a probability to an event AA by counting the number of outcomes that correspond to AA. If the count is aa then: P(A)=aNP(A) = \frac{a}{N}.

The probability of each individual outcome is thus 1/N1/N

Axioms of Probability

  1. For any event AA, 1P(A)01 \geq P(A) \geq 0.
  2. For the complete sample space SS, P(S)=1P(S) = 1.
  3. For the empty event ,P()=0\varnothing, P(\varnothing) = 0.
  4. For two mutually exclusive events AA and BB, the probability that AA or BB occurs is P(AB)=P(A)+P(B)P(A \cup B) = P(A) + P(B)

Since S=AAS = A \cup \overline{A}, and since AA and A\overline{A} are mutually exclusive then, 1=P(S)=P(AA)=P(A)+P(A)P(A)=1P(A)1 = P(S) = P(A \cup \overline{A}) = P(A) + P(\overline{A}) \Rightarrow P(\overline{A}) = 1 - P(A).

General Addition Rule

(AB)=P(A)+P(B)P(AB)(A \cup B) = P(A) + P(B) - P(A \cap B)

When AA and BB are mutually exclusive, P(AB)=P()=0P(A \cap B) = P(\varnothing) = 0 and P(AB)=P(A)+P(B)P(A \cup B) = P(A) + P(B)

If there are more than two events, the rule expands as follows:

P(ABC)=P(A)+P(B)+P(C)P(AB)P(AC)P(BC)+P(ABC)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)

Conditional Probabilities and Independent Events

Any two events AA and BB satisfying P(AB)=P(A)×P(B)P(A \cap B) = P(A) \times P(B) are said to be independent; this is a purely mathematical definition, but it agrees with the intuitive notion of independence in simple examples.

When events are not independent, we say that they are dependent or conditional.

Conditional Probability

The conditional probability of an event BB given that another event AA has occurred as P(BA)=P(AB)P(A)P(B|A) = \frac{P(A \cap B)}{P(A)}.

Law of Total Probability

if A1,...AkA_1, ...A_k are mutually exclusive and exhaustive (i.e. AiAj=A_i \cap A_j = \varnothing forall iji \neq j and A1...Ak=SA_1 \cup ... \cup A_k = S), then for any event BB

P(B)=j=1kP(BAj)P(Aj)=P(BA1)P(A1)+...+P(BAk)P(Ak)P(B) = \sum_{j=1}^{k} P(B|A_j)P(A_j) = P(B|A_1)P(A_1)+ ... + P(B|A_k)P(A_k).

Bayes Theorem

P(AB)=P(BA)P(A)P(B)P(A|B) = \frac{P(B|A) \cdot P(A)}{P(B)}

Terminology

  • PP(hypothesis) is the probability of the hypothesis being true prior to the experiment (called the prior)
  • PP(hypothesis|data) is the probability of the hypothesis being true once the experimental data is taken into account (called the posterior)
  • PP(data|hypothesis) is the probability of the experimental data being observed assuming that the hypothesis is true (called the likelihood)