mjtsai1974's Dev Blog Welcome to mjt's AI world

Introduction To The Conditional Probability

Prologue To Introduction To The Conditional Probability

Based on the probability of some already occurred event, we can infer or reassess the probability of another event, which is the major effect of the conditional probability.

Definition: Conditional Probability

Given the probability $P(C)$ of the already occurred event $C$, we can compute another event $A$’s probability $P(A\vert C)$. The conditional probability is defined:
$\;\;\;\;P(A\vert C)$=$\frac {P(A\cap C)}{P(C)}$, provided that $P(C)>0$.

This implies that the conditonal probability could help to find out the fraction of the probability of event $C$ is also in event $A$, which is $P(A\cap C)$.

Conditional Probability Properties

Given that $P(C)>0$, we can deduce out below properties:
➀$P(A\vert C)$+$P(A^{c}\vert C)$=$1$, holds for all conditions.
➁if $A\cap C$=$0$, then $P(A\vert C)$=$0$.
➂if $C\subset A$, then $A\cap C$=$C$, $P(A\vert C)$=$1$.
➃if $A\subset C$, then $A\cap C$=$A$, $P(A\vert C)$=$\frac {P(A)}{P(C)}\ge P(A)$, since $P(C)\le 1$.

Example: Illustration By Tossing A Fair Die

Suppose you are tossing a fair die, the sample space $\Omega$=$\{1,2,3,4,5,6\}$. We denote the event of numbers smaller than $3$ as $A$=$\{1,2\}$, and denote the event of even numbers as $B$=$\{2,4,6\}$.
➀if we know the current rolled out number is even, what’s the probability the number is smaller than $3$?
$P(A\vert B)$=$\frac {P(A\cap B)}{P(B)}$=$\frac {\frac {1}{6}}{\frac {1}{2}}$=$\frac {1}{3}$,
where $P(A\cap B)$=$P(\{2\})$=$\frac {1}{6}$.
➁if we know the rolled out number is smaller than $3$, what’s the probability the number is even?
$P(B\vert A)$=$\frac {P(B\cap A)}{P(A)}$=$\frac {\frac {1}{6}}{\frac {1}{3}}$=$\frac {1}{2}$.

Example: Illustration By Fuel Residence Time

Given a engine full of chemical fuel in its combustion chamber and just starts, we denote the event that the particle is left as non-comleted chemical reaction state after t seconds as $R_{t}$.

Suppose the probability of such chemical reaction is in exponential distribution, the probability of $R_{t}$, $P(R_{t})$=$e^{-t}$.

Then, the probability of the particle stay over 4 seconds will stay over 5 seconds would be to ask for $P(R_{5}\vert R_{4})$.
➀$R_{4}$=$e^{-4}$
➁$R_{5}$=$e^{-5}$
➂since $R_{5}\subset R{4}$, we have $R_{5}\cap R_{4}$=$R_{5}$.
Therefore, $P(R_{5}\vert R_{4})$=$\frac {P(R_{5}\cap R_{4})}{P(R_{4})}$=$\frac {P(R_{5})}{P(R_{4})}$=$e^{-1}$.

The Probability Chaining Rule

The probability chaining rule has it that:
➀$P(A\cap C)=P(A\vert C)\cdot P(C)$
➁$P((A\cap B)\vert C)$=$P(A\vert (B\cap C))\cdot P(B\vert C)$
➂$P(A\cap B\cap C)$=$P(A\vert (B\cap C))\cdot P(B\vert C)\cdot P(C)$

proof::mjtsai1974

➀begin from the conditional probability:
$P(A\vert C)$=$\frac {P(A\cap C)}{P(C)}$
$\Leftrightarrow P(A\cap C)=P(A\vert C)\cdot P(C)$
➁$P((A\cap B)\vert C)$
=$\frac {P((A\cap B)\cap C)}{P(C)}$
=$\frac {P(A\cap (B\cap C))}{P(C)}$
=$\frac {P(A\vert (B\cap C))\cdot P(B\cap C)}{P(C)}$
=$P(A\vert (B\cap C))\cdot P(B\vert C)$
➂from above,
$\frac {P((A\cap B)\cap C)}{P(C)}$=$P(A\vert (B\cap C))\cdot P(B\vert C)$
$\Leftrightarrow P(A\cap B\cap C)$=$P(A\vert (B\cap C))\cdot P(B\vert C)\cdot P(C)$

Also known as the multiplication rule.
Below expression illustrates probability chaining rule extension:
$P(N_{1}\cap N_{2}\cap N_{3}\cap …\cap N_{m})$
=$P(N_{1}\vert (N_{2}\cap N_{3}\cap …\cap N_{m}))$
$\;\;\;\;\cdot P(N_{2}\vert (N_{3}\cap …\cap N_{m}))$
$\;\;\;\;...$
$\;\;\;\;\cdot P(N_{m-1}\vert N_{m})$
$\;\;\;\;\cdot P(N_{m})$

Example: Illustration By Fuel Residence Time For Extension

If we are given the same condition to the engine containing a combustion chamber in it, we’d like to estimate the probability of the particle stay over 1 seconds will stay over 10 seconds.

Suppose the chemical particle still left at 10-th second is the final one molecular.

And the probability of such chemical reaction is in exponential distribution, the probability of $R_{t}$, $P(R_{t})$=$e^{-t}$.

proof::mjtsai1974

This is to ask for $P(R_{10}\vert R_{1})$=$\frac {P(R_{10}\cap R_{1})}{P(R_{1})}$.
➀by the given assumption, the final particle is in $R_{10}$, it just passed through $R_{1}$,$R_{2}$,...,$R_{10}$.
Hence, $(R_{10}\cap R_{1})$=$(R_{10}\cap R_{9}\cap … \cap R_{1})$
➁by the probability chaining rule,
$P(R_{10}\cap R_{9}\cap … \cap R_{1})$
=$P(R_{10}\vert (R_{9}\cap … \cap R_{1}))$
$\;\;\;\;\cdot P(R_{9}\vert (R_{8}\cap … \cap R_{1}))$
$\;\;\;\;\cdot P(R_{8}\vert (R_{7}\cap … \cap R_{1}))$
$\;\;\;\;…$
$\;\;\;\;\cdot P(R_{3}\vert (R_{2}\cap R_{1}))$
$\;\;\;\;\cdot P(R_{2}\vert R_{1})$
$\;\;\;\;\cdot P(R_{1})$
➂with each multiplication term equaling to $e^{-1}$,
$P(R_{10}\cap R_{9}\cap … \cap R_{1})$=$e^{-10}$
then, $P(R_{10}\vert R_{1})$=$\frac {P(R_{10}\cap R_{1})}{P(R_{1})}$=$e^{-9}$.