Ora

What are the formulas of probability?

Published in Probability Formulas 7 mins read

The formulas of probability are mathematical expressions used to calculate the likelihood of various events occurring, forming the bedrock of statistical analysis and decision-making. These fundamental formulas allow us to quantify uncertainty and make predictions based on data.

Basic Probability Formula

The most fundamental formula in probability calculates the likelihood of a simple event.

  • Formula: $P(E) = \frac{\text{Number of favorable outcomes}}{\text{Total number of possible outcomes}}$
  • Explanation: This formula represents the probability of an event E by dividing the count of outcomes where E occurs by the total number of possible outcomes in the sample space, assuming all outcomes are equally likely.
  • Example: If you flip a fair coin, the probability of getting heads is $P(\text{Heads}) = \frac{1 \text{ (favorable outcome)}}{\text{2 (total outcomes)}} = 0.5$.

Key Rules and Formulas of Probability

Beyond the basic formula, several rules govern how probabilities combine and relate to each other.

1. Complement Rule

The Complement Rule helps calculate the probability of an event not happening.

  • Formula: $P(E') = 1 - P(E)$ or $P(\text{not } E) = 1 - P(E)$
  • Explanation: $E'$ (or "not E") denotes the event that E does not occur. The sum of the probability of an event occurring and the probability of it not occurring is always 1.
  • Example: If the probability of rain ($P(\text{Rain})$) is 0.3, then the probability of no rain ($P(\text{No Rain})$) is $1 - 0.3 = 0.7$.

2. Addition Rule

The Addition Rule is used to find the probability of either one event or another event occurring.

a. For Mutually Exclusive Events

  • Definition: Two events are mutually exclusive if they cannot happen at the same time (i.e., they have no outcomes in common).
  • Formula: $P(A \text{ or } B) = P(A) + P(B)$
  • Explanation: If events A and B are mutually exclusive, the probability of A or B occurring is simply the sum of their individual probabilities.
  • Example: The probability of rolling a 2 or a 4 on a single die roll is $P(2) + P(4) = \frac{1}{6} + \frac{1}{6} = \frac{2}{6} = \frac{1}{3}$.

b. For Non-Mutually Exclusive Events

  • Definition: Two events are non-mutually exclusive if they can happen at the same time (i.e., they share common outcomes).
  • Formula: $P(A \text{ or } B) = P(A) + P(B) - P(A \text{ and } B)$
  • Explanation: When events A and B overlap, simply adding their probabilities would double-count the probability of their intersection ($P(A \text{ and } B)$). Subtracting this overlap corrects the sum.
  • Example: The probability of drawing a King or a Heart from a deck of cards: $P(\text{King}) + P(\text{Heart}) - P(\text{King of Hearts}) = \frac{4}{52} + \frac{13}{52} - \frac{1}{52} = \frac{16}{52} = \frac{4}{13}$.

3. Multiplication Rule

The Multiplication Rule helps determine the probability of two or more events happening consecutively or simultaneously.

a. For Independent Events

  • Definition: Two events are independent if the occurrence of one does not affect the probability of the other.
  • Formula: $P(A \text{ and } B) = P(A) \times P(B)$
  • Explanation: The probability of both independent events A and B occurring is the product of their individual probabilities.
  • Example: The probability of flipping a coin and getting heads, and then rolling a die and getting a 3 is $P(\text{Heads}) \times P(3) = 0.5 \times \frac{1}{6} = \frac{1}{12}$.

b. For Dependent Events (Conditional Probability)

  • Definition: Two events are dependent if the occurrence of one affects the probability of the other. Conditional probability is the probability of an event occurring given that another event has already occurred.
  • Conditional Probability Formula: $P(A | B) = \frac{P(A \text{ and } B)}{P(B)}$, provided $P(B) > 0$.
    • Explanation: This reads as "the probability of A given B." It's the probability of A and B both occurring, divided by the probability of B occurring.
  • Multiplication Rule for Dependent Events: $P(A \text{ and } B) = P(A) \times P(B | A)$
    • Explanation: The probability of both dependent events A and B occurring is the probability of A times the probability of B given that A has already occurred.
  • Example (Conditional): The probability of drawing a second King ($K_2$) given that the first card drawn was a King ($K_1$) without replacement from a 52-card deck: $P(K_2 | K_1) = \frac{3 \text{ (remaining Kings)}}{\text{51 (remaining cards)}}$.

4. Law of Total Probability

The Law of Total Probability is used to find the overall probability of an event when there are several possible, often mutually exclusive, scenarios that can lead to it.

According to this law, if an event A is made up of possibilities B and C, then the probability of A is equal to the probability of B+C. So, the formula is:

  • $P(A) = P(A \cap B) + P(A \cap C)$

An alternative and often more practical form of this formula, particularly when dealing with conditional probabilities, is:

  • $P(A) = P(A | B) \cdot P(B) + P(A | C) \cdot P(C)$

This generalized principle states that if you have a set of disjoint events ($B_1, B_2, \ldots, B_n$) that form a partition of the sample space (meaning they are mutually exclusive and collectively exhaustive), you can find the probability of another event A by summing the products of the conditional probability of A occurring given each partition event and the probability of each partition event:

  • General Formula: $P(A) = \sum_{i=1}^{n} P(A | B_i) P(B_i)$

5. Bayes' Theorem

Bayes' Theorem describes the probability of an event, based on prior knowledge of conditions that might be related to the event. It is particularly useful for updating probabilities as new evidence becomes available.

  • Formula: $P(A | B) = \frac{P(B | A) \cdot P(A)}{P(B)}$
  • Explanation: This formula calculates the posterior probability $P(A|B)$ (the probability of A given B has occurred) using the likelihood $P(B|A)$ (the probability of B given A has occurred), the prior probability $P(A)$ (the initial probability of A), and the marginal probability $P(B)$ (the total probability of B). Often, $P(B)$ is calculated using the Law of Total Probability: $P(B) = P(B|A)P(A) + P(B|A')P(A')$.
  • Practical Insight: Bayes' Theorem is widely used in medical diagnostics, spam filtering, and machine learning, allowing us to reverse conditional probabilities and infer causes from effects. For instance, knowing the probability of a positive test result given a disease, Bayes' Theorem helps determine the probability of having the disease given a positive test result.

Summary of Key Probability Formulas

Understanding these formulas is crucial for anyone working with data, from basic statistics to advanced machine learning. They provide the framework for analyzing uncertainty and making informed decisions. For further exploration, resources like Khan Academy's Probability Basics offer detailed explanations and practice problems.

Formula Name Formula Description
Basic Probability $P(E) = \frac{\text{Favorable Outcomes}}{\text{Total Outcomes}}$ Probability of an event E
Complement Rule $P(E') = 1 - P(E)$ Probability of event E not happening
Addition Rule (Mutually Exclusive) $P(A \cup B) = P(A) + P(B)$ Probability of A or B for disjoint events
Addition Rule (Non-Mutually Exclusive) $P(A \cup B) = P(A) + P(B) - P(A \cap B)$ Probability of A or B for overlapping events
Multiplication Rule (Independent) $P(A \cap B) = P(A) \cdot P(B)$ Probability of A and B for independent events
Conditional Probability $P(A B) = \frac{P(A \cap B)}{P(B)}$
Law of Total Probability $P(A) = \sum P(A B_i)P(B_i)$
Bayes' Theorem $P(A B) = \frac{P(B