Unit 5: Probability
Probability provides a quantitative measure of certainty and uncertainty. It is widely applied in determining insurance premiums, weather forecasting, financial risk modeling, and modern machine learning algorithms.
1. Introduction to Probability
The probability of an event $E$ occurring is the ratio of the number of favorable outcomes to the total number of possible outcomes in an experiment. $$ P(E) = \frac{\text{Number of favorable outcomes}}{\text{Total number of possible outcomes}} $$
For any event $E$, $0 \leq P(E) \leq 1$. The sum of all possible probabilities in an experiment is 1.
2. Random Experiment and Sample Space
Random Experiment
An experiment where all possible outcomes are known in advance, but the exact outcome of a specific performance cannot be predicted. Example: Tossing a coin or rolling a die.
Sample Space
The set of all possible outcomes of a random experiment. Denoted by $S$. Example: For tossing two coins, the Sample Space $S = {HH, HT, TH, TT}$.
3. Event
An event is any subset of the sample space $S$.
Types of Events
- Impossible Event: An event that cannot happen (probability = 0).
- Sure Event: An event that is certain to happen (probability = 1).
- Mutually Exclusive Events: Two events $A$ and $B$ that cannot occur simultaneously. $P(A \cap B) = 0$.
- Exhaustive Events: A set of events whose union forms the entire sample space.
- Independent Events: The occurrence of one event does not affect the probability of the other. $P(A \cap B) = P(A) \cdot P(B)$.
- Dependent Events: The occurrence of one event affects the probability of the other.
4. Conditional Probability
Conditional Probability is the probability of an event $E$ occurring, given that another event $F$ has already occurred. $$ P(E|F) = \frac{P(E \cap F)}{P(F)}, \quad \text{provided } P(F) \neq 0 $$
Important Notes
- If $E$ and $F$ are independent, $P(E|F) = P(E)$.
- The formula can be rearranged as $P(E \cap F) = P(F) \cdot P(E|F)$, known as the Multiplication Theorem on Probability.
Competency-Based Questions
-
(Application in Data Storage): A cloud server database consists of 1,000 sectors. 5% of these are marked as ‘corrupted’. A diagnostic script checks a random sector. What is the probability that the chosen sector is NOT corrupted?
-
(Mutually Exclusive Events Analysis): An insurance firm analyzes policies. Let $A$ be the event that a policyholder claims an auto accident, and $B$ be the event they claim house fire damage. Data shows $P(A) = 0.12$, $P(B) = 0.05$. If these events are mutually exclusive, what is the probability a holder will claim either auto or house damage ($P(A \cup B)$)? Can a person claim both simultaneously according to your model?
-
(Conditional Probability in Algorithm): A spam-filtering algorithm flags emails. The probability that an email contains the word “Lottery” (Event F) is 0.05. The probability that an email is marked as spam AND contains the word “Lottery” (Event $E \cap F$) is 0.045. If an incoming email contains the word “Lottery”, what is the conditional probability that it is spam?
-
(Sample Space Modeling): List the complete sample space $S$ for rolling two 6-sided dice simultaneously. Define an event $G$ such that the sum of the dice is greater than or equal to 10. Calculate $P(G)$.
-
(Independent Events in Finance): The probability of Stock $X$ going up tomorrow is 0.6. The probability of Stock $Y$ going up tomorrow is 0.7. If the movements of these two stocks are completely independent, calculate the probability that:
- Both stocks go up.
- At least one stock goes up.
Answers to Competency-Based Questions
1. Application in Data Storage: The probability a sector is corrupted $P(C) = 0.05$. The probability it is NOT corrupted is the complement: $$ P(C’) = 1 - P(C) = 1 - 0.05 = 0.95 , (\text{or } 95%) $$
2. Mutually Exclusive Events Analysis: For mutually exclusive events, $P(A \cap B) = 0$. The probability of claiming either is: $$ P(A \cup B) = P(A) + P(B) = 0.12 + 0.05 = 0.17 $$ No, a person cannot claim both simultaneously in this model because the events are mutually exclusive ($P(A \cap B) = 0$).
3. Conditional Probability in Algorithm: Given $P(F) = 0.05$ and $P(E \cap F) = 0.045$. The conditional probability $P(E|F)$: $$ P(E|F) = \frac{P(E \cap F)}{P(F)} = \frac{0.045}{0.05} = 0.9 $$ There is a $90%$ chance the email is spam.
4. Sample Space Modeling: The sample space $S$ for two dice has $6 \times 6 = 36$ total outcomes. $S = {(1,1), (1,2), \dots (6,6)}$. Event $G$ (sum $\ge 10$) $= {(4,6), (5,5), (6,4), (5,6), (6,5), (6,6)}$. Thus, $n(G) = 6$. $$ P(G) = \frac{n(G)}{n(S)} = \frac{6}{36} = \frac{1}{6} $$
5. Independent Events in Finance: Let $P(X) = 0.6$ and $P(Y) = 0.7$. Since they are independent:
- Both stocks go up ($X \cap Y$): $$ P(X \cap Y) = P(X) \cdot P(Y) = 0.6 \times 0.7 = 0.42 $$
- At least one stock goes up ($X \cup Y$): $$ P(X \cup Y) = P(X) + P(Y) - P(X \cap Y) = 0.6 + 0.7 - 0.42 = 1.3 - 0.42 = 0.88 $$