Logo

Fityanandra Athar Adyaksa (52250059)
November 30, 2025




ESSENTIALS OF PROBABILITY

You can think of probability as the voice of reason in statistics. It offers a coherent framework to navigate uncertainty so that our decisions are guided by logic, not just guesswork.

Instead of leaning on intuition or relying on conjecture, probability transforms data analysis from a guessing game into an exact science by giving us the critical tools to quantify likelihoods, interpret patterns, and analyze real-world phenomena. That’s why, for anyone serious about research or evidence-based practice, having a strong command of probability isn’t optional—it’s the foundation of everything you do.


1 Basic Probability Concepts


1.1 Definition of Probability


Probability is defined as the likelihood of an event occurring, calculated using the formula of the number of favorable outcomes divided by the total number of possible outcomes. For example, in a single coin flip, the probability of getting heads is \(\frac{1}{2}\) or 50%, since there is one favorable outcome (heads) out of two possibilities (heads or tails). The general formula is

\[ P(A) = \frac{\text{number of favorable outcomes}}{\text{total number of possible outcomes}} \]


1.2 Sample Space


The Sample Space (\(S\)) encompasses the entire collection of possible outcomes from an experiment. For two coin flips, the sample space consists of four possibilities: HH, HT, TH, and TT (where H denotes heads and T denotes tails).The Sample Space is best represented with a Tree Diagram, which shows the branches of the first flip (H or T) followed by the second flip (H or T), enabling the systematic identification of all outcomes.

TreeDiagram

Since these are independent events (one flip doesn’t affect the next), each outcome has an equal probability of:\[0.5 \times 0.5 = 0.25\]or 25%.


1.3 Basic Probability Rules


The core of probability is governed by two fundamental rules:

1.3.1 The Bounds Rule

The probability of any event \(A\) must always range between 0 and 1, where 0 means impossible and 1 means certain.

\[ 0 \le P(A) \le 1 \]

1.3.2 The Sum Rule

The sum of probabilities of all outcomes in the sample space always equals 1; for instance, with two coin flips:

\[ P(HH) + P(HT) + P(TH) + P(TT) = 0.25 + 0.25 + 0.25 + 0.25 = 1 \]


1.3.3 The Multiplication Rule (Independent Events)

For independent events \(A\) and \(B\), the probability of both occurring is the product of their individual probabilities:

\[ P(A \cap B) = P(A) \times P(B) \]

such as the probability of two heads: \(P(H) \times P(H) = 0.5 \times 0.5 = 0.25\).


1.4 Complement Rule


The Complement Rule states that the probability of an event not occurring is 1 minus the probability that it will occur. It is highly efficient for calculating “at least one” or “not all” scenarios.

\[ P(A^c) = 1 - P(A) \]

For example, the probability of not getting two tails (\(TT\)) in two coin flips is:

\[ 1 - P(TT) = 1 - 0.25 = \textbf{0.75} \]

This is equivalent to summing the probabilities of the three other outcomes (\(HH + HT + TH\)).

1.5 Application Example


To calculate the probability of at least one tail in two flips, we identify outcomes HT, TH, and TT (total probability 0.75).

However, this is calculated most efficiently using the Complement Rule:

\[ P(\text{at least one T}) = 1 - P(\text{No Tails}) = 1 - P(HH) \]

\[ P(\text{at least one T}) = 1 - 0.25 = \textbf{0.75} \]

This practice reinforces understanding of sample spaces and the Complement Rule in solving basic probability problems.



2 Independent and Dependent Events


2.1 Independent Events


Independent events occur when the outcome of one event does not affect the probability of another event. For example, rolling a die and flipping a coin are independent because the die roll does not influence the coin flip result. The probability of both events \(A\) and \(B\) occurring together (the Intersection) is calculated using the simple multiplication rule:

\[P(A \cap B) = P(A) \times P(B)\]

Calculating Probability of Independent Events To find the probability of rolling a 5 on a 6-sided die and getting heads on a coin flip, first determine individual probabilities: \(P(5) = \frac{1}{6}\) and \(P(\text{heads}) = \frac{1}{2}\). Multiply them: \(P(5 \cap \text{heads}) = \frac{1}{6} \times \frac{1}{2} = \frac{1}{12}\) (or approximately \(0.0833\)).


2.2 Dependent Events


Dependent events occur when the outcome of one event affects the probability of the next event. This typically happens in scenarios without replacement, such as drawing items from a box. For instance, drawing marbles from a box with 7 green and 3 blue (total 10) without replacement changes the sample space after each draw. The formal calculation for dependent events involves Conditional Probability—the probability of \(B\) given that \(A\) has already occurred (\(P(B|A)\)):

\[P(A \cap B) = P(A) \times P(B|A)\]

Probability of Dependent Events (Green then Blue) The probability of drawing a green marble first (\(P(G_1) = \frac{7}{10}\)) followed by a blue marble (\(P(B_2|G_1) = \frac{3}{9}\)) without replacement is: \[P(\text{green then blue}) = \frac{7}{10} \times \frac{3}{9} = \frac{21}{90} = \frac{7}{30} \approx 0.233\] Note how the second probability adjusts due to the reduced total (9 marbles left).

Example: Two Green Marbles

For drawing two green marbles without replacement:

  1. First green: \(P(G_1) = \frac{7}{10}\)

  2. Second green: \(P(G_2|G_1) = \frac{6}{9}\)
    (Since one green marble is gone) Thus, \(P(\text{two greens}) = \frac{7}{10} \times \frac{6}{9} = \frac{42}{90} = \frac{7}{15} \approx 0.4667\).

Summary

  • Independent events use simple multiplication \(P(A) \times P(B)\).

  • Dependent events require sequential adjustment using the Conditional Probability formula \(P(A) \times P(B|A)\).

  • Recognize “without replacement” as the key indicator for dependence in probability calculations.



3 Union of Events



3.1 Understanding the Union of Events


The union of two events, denoted as \(A \cup B\), represents the probability that either event A occurs, or event B occurs, or both occur simultaneously. This concept is crucial when probability questions use the word “or” – indicating we want the chance of at least one of the events happening. The key challenge is avoiding double-counting outcomes that belong to both events.

3.2 The Union Formula


The probability of the union is calculated using the inclusion-exclusion formula:

\[ P(A \cup B) = P(A) + P(B) - P(A \cap B) \]


DiagramVenn

Here, \(P(A \cap B)\) is the intersection – the probability that both events happen together. Subtracting this term prevents counting overlapping outcomes twice when adding \(P(A)\) and \(P(B)\).

3.2.1 Special Case: Mutually Exclusive Events


If events A and B are mutually exclusive (they cannot occur together), then \(P(A \cap B) = 0\). The formula simplifies to:

\[ P(A \cup B) = P(A) + P(B) \]

This makes calculation straightforward since there’s no overlap.

3.2.2 Detailed Example: Rolling Two Dice


Consider rolling two six-sided dice (36 total outcomes in the sample space). Calculate the probability of rolling two even numbers OR at least one 2:

  • Event A (two even numbers): 9 favorable outcomes → \(P(A) = \frac{9}{36} = 0.25\)
  • Event B (at least one 2): 11 favorable outcomes → \(P(B) = \frac{11}{36} \approx 0.3056\)
  • Intersection \(A \cap B\) (two evens AND at least one 2): 5 overlapping outcomes → \(P(A \cap B) = \frac{5}{36} \approx 0.1389\)
Apply the formula:

\[ P(A \cup B) = \frac{9}{36} + \frac{11}{36} - \frac{5}{36} = \frac{15}{36} \approx 0.4167 \ (41.67\%) \]

This result correctly accounts for all unique outcomes satisfying either condition.



4 Exclusive and Complete Events



4.1 Mutually Exclusive and Exhaustive Events


4.1.1 What Are Mutually Exclusive Events?

Mutually exclusive events are events that cannot happen simultaneously – if one occurs, the other definitely cannot. Think of flipping a coin: you can get heads or tails, but never both in a single flip. Mathematically, their intersection has zero probability:

\[ P(A \cap B) = 0 \]

This means no outcome belongs to both events. A real-world example: rolling a die and getting a 1 versus getting an even number (2, 4, 6) – these overlap, so they are not mutually exclusive.

4.1.1.1 Probability Rule for Mutually Exclusive Events

For mutually exclusive events \(A\) and \(B\), the probability of either occurring (union) is simply the sum of their individual probabilities:

\[ P(A \cup B) = P(A) + P(B) \]

Example: Probability of rolling a 1 or a 6 on a fair die:

  • \(P(1) = \frac{1}{6}\)

  • \(P(6) = \frac{1}{6}\)

  • \(P(1 \cup 6) = \frac{1}{6} + \frac{1}{6} = \frac{2}{6} = \frac{1}{3}\)

No subtraction needed since there’s no overlap.


4.2.1 What Are Exhaustive Events?

Exhaustive events are a collection of events that together cover every possible outcome in the sample space. At least one must occur; their union equals the entire sample space. For a die roll, events {1}, {2}, {3}, {4}, {5}, {6} are exhaustive because one number always appears.

The total probability sums to certainty:

\[ \sum_{i=1}^{n} P(E_i) = 1 \]

Key Insight: Exhaustive events don’t need to be mutually exclusive, but when combined with mutual exclusivity, they form a complete partition of the sample space.

4.2.1.1 Union of Exhaustive Events

When events are both mutually exclusive and exhaustive, their union is guaranteed:

\[ P(E_1 \cup E_2 \cup \dots \cup E_n) = 1 \]

Example: Coin flip outcomes {Heads, Tails} – mutually exclusive (no overlap) and exhaustive (covers all possibilities), so \(P(\text{Heads} \cup \text{Tails}) = 1\).

4.2.1.2 Overlapping vs. Non-Overlapping Exhaustive Events

  • Non-overlapping exhaustive (ideal partition): Like die faces – no gaps, no overlaps.

  • Overl apping exhaustive: Events cover all outcomes but share some (e.g., “even” or “multiple of 3” on a die covers everything but overlaps at 6).

Venn diagrams visualize this: mutually exclusive = separate circles; exhaustive = circles filling the sample space rectangle.

4.2.2 Practical Applications and Common Mistakes

  • Applications: Risk analysis (mutual exclusivity in insurance claims), decision trees, quality control.

  • Mistake to Avoid: Adding probabilities of non-mutually exclusive events without subtracting overlap leads to overestimation.


Event Type Intersection Union Formula Example
Mutually Exclusive \(P(A \cap B) = 0\) \(P(A) + P(B)\) Heads or Tails
Exhaustive Covers sample space Sum = 1 All die outcomes
Both Partition Sum = 1, no overlap {1,2,3,4,5,6}

Mastering these concepts builds foundation for advanced topics like Bayes’ theorem and conditional probability.



5 Binomial Experiment



5.1 What is a Binomial Experiment?


A binomial experiment models scenarios with repeated independent trials, each having exactly two possible outcomes: success (with probability \(p\)) or failure (with probability \(q = 1 - p\)). The “bi” prefix highlights these two outcomes, similar to bicycle (two wheels) or binoculars (two lenses). Real-world examples include coin flips (heads = success), quality control inspections (defective = failure), or medical trials (recovery = success).

5.1.1 The Four Essential Conditions

For an experiment to qualify as binomial, it must satisfy all four conditions:

  1. Fixed number of trials (\(n\)): The experiment repeats a specific number of times (e.g., flip coin 3 times).
  2. Two outcomes per trial: Success or failure only (no other possibilities).
  3. Constant success probability (\(p\)): \(p\) remains the same for every trial.
  4. Independent trials: One trial’s outcome doesn’t affect others.

If any condition fails, it’s not binomial (e.g., drawing cards without replacement violates independence).


Example 1: Coin Flips (Simple Binomial)

Question: Flip a fair coin 3 times. Probability of exactly 1 head?

  • Check conditions: \(n=3\) (fixed), success=head (\(p=0.5\)), constant \(p\), independent flips → Binomial.
  • Possible sequences: H-T-T, T-H-T, T-T-H (3 ways).
  • Each: \(P(H) \times P(T) \times P(T) = 0.5 \times 0.5 \times 0.5 = 0.125\).
  • Total: \(3 \times 0.125 = 0.375\) or \(\frac{3}{8}\).

Example 2: Marbles with Replacement (Complex)

Question: Box has 10 marbles (2 green, 8 non-green). Draw 5 times with replacement. Probability of exactly 2 green?

  • Check conditions: \(n=5\) (fixed), success=green (\(p=\frac{2}{10}=0.2\)), constant \(p\) (replacement), independent → Binomial.
  • 10 sequences exist (e.g., GG—, G-G–, etc., where - = non-green).
  • Each: \((0.2)^2 \times (0.8)^3 = 0.02048\).
  • Total: \(10 \times 0.02048 = 0.2048\).


5.1.2 The Binomial Probability Formula

The binomial formula efficiently computes \(P(k)\), probability of exactly \(k\) successes in \(n\) trials:

\[ P(k) = \binom{n}{k} p^k (1-p)^{n-k} \]

  • \(\binom{n}{k} = \frac{n!}{k!(n-k)!}\) (combinations: “n choose k” ways to get k successes).

  • Example 2 using formula:

    \(P(2) = \binom{5}{2} (0.2)^2 (0.8)^3 = 10 \times 0.04 \times 0.512 = 0.2048\).

This matches manual calculation, proving efficiency for larger \(n\).


5.2 Key Insights and Applications


  • Mean: \(\mu = np\) (expected successes).
  • Why replacement matters: Ensures constant \(p\) and independence.
  • Applications: Quality control, surveys, A/B testing, genetics.
Condition Coin Flip Marbles w/ Replacement
Fixed \(n\) 3 flips 5 draws
Two outcomes H/Success, T/Fail Green/Success, Non-green/Fail
Constant \(p\) 0.5 0.2
Independent Yes Yes (replacement)
# Memuat library yang diperlukan (pastikan Anda sudah menginstal ggplot2: install.packages("ggplot2"))
library(ggplot2)

# --- Parameter Binomial ---
n_trials <- 5 # Jumlah percobaan (n)
p_success <- 0.2 # Probabilitas sukses (p)

# Membuat vektor untuk jumlah keberhasilan yang mungkin (x)
x_values <- 0:n_trials

# Menghitung probabilitas binomial untuk setiap x
# dbinom(x, size=n, prob=p) adalah fungsi R untuk P(X=x)
probabilities <- dbinom(x_values, size = n_trials, prob = p_success)

# Membuat data frame untuk plotting
binomial_data <- data.frame(
  Successes = factor(x_values),
  Probability = probabilities
)

# Membuat plot menggunakan ggplot2
ggplot(binomial_data, aes(x = Successes, y = Probability)) +
  geom_bar(stat = "identity", fill = "skyblue", color = "darkblue") +
  geom_text(aes(label = round(Probability, 3)), vjust = -0.5, size = 3.5) +
  labs(
    title = paste("Binomial Probability Distribution (n =", n_trials, ", p =", p_success, ")"),
    x = "Number of Successes (k)",
    y = "Probability P(X=k)"
  ) +
  theme_minimal() +
  scale_y_continuous(limits = c(0, max(probabilities) * 1.1))

# Menambahkan Insight Kunci
cat("The graph shows a probability distribution where most outcomes are expected to occur around the Mean mu = n*p =", n_trials * p_success)
## The graph shows a probability distribution where most outcomes are expected to occur around the Mean mu = n*p = 1

Binomial distribution forms the basis for more advanced models like Poisson or normal approximations.

6 Binomial Distribution



6.1 Understanding the Binomial Distribution


The binomial distribution shows the probabilities of getting exactly \(k\) successes in \(n\) independent trials, each with success probability \(p\). It builds directly from the binomial formula reviewed earlier:

\[ P(k) = \binom{n}{k} p^k (1-p)^{n-k} \]

# Load the required library
library(ggplot2)

n_simple <- 2
p_simple <- 0.5
x_simple <- 0:n_simple
prob_simple <- dbinom(x_simple, size = n_simple, prob = p_simple)

df_simple <- data.frame(Successes = factor(x_simple), Probability = prob_simple)

ggplot(df_simple, aes(x = Successes, y = Probability)) +
  # Create a bar chart (column chart)
  geom_bar(stat = "identity", fill = "lightgreen", color = "darkgreen") +
  # Add probability labels on top of the bars
  geom_text(aes(label = round(Probability, 2)), vjust = -0.3) +
  # Set titles and labels
  labs(
    title = paste("Simple Binomial Distribution (n=2, p=0.5)"),
    x = "Number of Successes (k)",
    y = "P(X=k)"
  ) +
  # Use a clean theme
  theme_minimal()

Visualized as a bar chart, the x-axis shows possible successes (0 to \(n\)), and y-axis shows their probabilities. For coin flips (\(n=2\), \(p=0.5\)): P(0 heads)=0.25, P(1 head)=0.50, P(2 heads)=0.25 – symmetric and bell-shaped.

6.1.1 Key Parameters of Binomial Distribution

For a binomial random variable \(X\):

  • Mean (expected successes): \(\mu = np\)
  • Variance: \(\sigma^2 = np(1-p)\)
  • Standard deviation: \(\sigma = \sqrt{np(1-p)}\)

These center the distribution. For \(n=10\), \(p=0.5\): \(\mu=5\), \(\sigma \approx 1.58\), peaking around 5 successes.

6.2 Effect of Changing \(p\) (Shape Control)


The parameter \(p\) determines skewness while keeping \(n\) fixed:

  • \(p = 0.5\): Symmetric, bell-like (fair coin).
  • \(p < 0.5\) (e.g., 0.1): Right-skewed (few successes expected, tail toward high \(k\)).
  • \(p > 0.5\) (e.g., 0.8): Left-skewed (many successes expected, tail toward low \(k\)).

Data clusters around \(\mu = np\): low \(p\) clumps near 0, high \(p\) near \(n\).

6.3 Effect of Changing \(n\) (Toward Normality)


Increasing \(n\) makes the distribution smoother and more normal-like:

  • Small \(n\) (e.g., 2): Discrete bars.
  • Large \(n\) (e.g., 10+): Approaches normal curve, especially when \(p \approx 0.5\).

Skewed distributions (\(p \neq 0.5\)) need larger \(n\) to normalize.

6.4 Normal Approximation Guidelines


Use normal distribution to approximate binomial when:

\[ np \geq 10 \quad \text{and} \quad n(1-p) \geq 10 \]

(Some use 5 as threshold – check your source). This simplifies calculations for large \(n\).

Summary Table

Scenario \(n\) \(p\) Shape Mean (\(\mu\)) Example Use
Fair Coin 2 0.5 Symmetric 1 Simple trials
Rare Event 10 0.1 Right-skewed 1 Defect detection
Likely Event 10 0.8 Left-skewed 8 High success rate
Large Sample 50 0.5 Normal-like 25 Surveys, A/B tests

Binomial distributions power statistical inference, quality control, and hypothesis testing by modeling real-world “success/failure” repeats.



References

Primary Video Sources (Simple Learning Pro Series)

  1. Simple Learning Pro. (2019, July 11). Probability, Sample Spaces, and the Complement Rule (6.1) [Video]. YouTube. https://www.youtube.com/watch?v=ynjHKBCiGXY

  2. Simple Learning Pro. (2019, Sep 7). Probability of Independent and Dependent Events (6.2) [Video]. YouTube. https://www.youtube.com/watch?v=LS-_ihDKr2M

  3. Simple Learning Pro. (2020, Apr 13). The Probability of the Union of Events (6.3) [Video]. YouTube. https://www.youtube.com/watch?v=vqKAbhCqSTc

  4. Simple Learning Pro. (2020, May 28). Mutually Exclusive and Exhaustive Events (6.4) [Video]. YouTube. https://www.youtube.com/watch?v=f7agTv9nA5k

  5. Simple Learning Pro. (2020, Jun 22). The Binomial Experiment and the Binomial Formula (6.5) [Video]. YouTube. https://www.youtube.com/watch?v=nRuQAtajJYk

  6. Simple Learning Pro. (2021, Jan 8). Visualizing the Binomial Distribution (6.6) [Video]. YouTube. https://www.youtube.com/watch?v=Y2-vSWFmgyI