Essential Of Probability
Assignment ~ Week 10
1 About Probability
Probability theory stands as the cornerstone of statistical inference, providing the mathematical framework to measure and manage uncertainty. Whether predicting industrial performance, clinical results, or financial outcomes, probability helps quantify how likely various results may occur.
This document explores essential probability concepts:
- Fundamental Concept
- Independent & Dependent Events
- Exclusive & Exhaustive Events
- Union of Events
- Binomial Experiment
- Binomial Distribution
2 Fundamental Concept
Detailing the methodology for calculating basic likelihoods, the video uses elementary scenarios like coin tosses to illustrate key probabilistic principles. The material highlights the mathematical foundations necessary for all subsequent probability topics:
- Simple Probability
- Sample Space
- Complement Rule
2.1 Simple Probability
Interpretation:
Probability can be defined as the chance of an event occurring by
calculating the number of desired outcomes with the total number of
possibilities on a scale of 0 to 1, where a value of 1 means that the
probability is very accurate and vice versa.
Formula:
\[P = \frac{\text{Total Number Of Favourable
Outcomes}}{\text{Total Number Of Possible Outcomes}}\]
Example: Probability of drawing a Queen from a deck of cards.
# Definisikan Ruang Sampel (Total Kartu)
Total_Cards <- 52
# Definisikan Kejadian A: Mendapatkan kartu Queen (ada 4 Queen)
Favourable_Outcomes_A <- 4
# Hitung Probabilitas P(A)
P_A_Queen <- Favourable_Outcomes_A / Total_Cards
# Tampilkan Hasil
cat("Total Cards:", Total_Cards, "\n")## Total Cards: 52
## Favourable Outcomes (Queen): 4
## Probability P(Queen): 0.0769
2.2 Sample Space
Interpretation:
The Sample Space is the set of all possible outcomes of a random
experiment. It defines the entire universe of possible results.
(Insert sample space Venn diagram image here if needed)
Formula (Conceptual):
Sample Space:
\[S = \{h_1, h_2, ..., h_n\}\]
Total Outcomes:
\[N = |S|\]
Note:
\(h_n\) is the n-th individual outcome,
and \(|S|\) represents the total number
of possible outcomes (Total Outcomes), denoted by N.
Example: Sample Space of rolling two six-sided dice.
# Ruang Sampel (S) saat melempar dua dadu (dadu 1, dadu 2)
# Setiap hasil adalah pasangan terurut (d1, d2).
# Total kemungkinan hasil: 6 * 6 = 36
Total_Outcomes_N_Dice <- 6 * 6
# Contoh beberapa hasil dalam ruang sampel S
Example_Outcomes <- c("(1, 1)", "(1, 2)", "(2, 1)", "(6, 6)")
# Tampilkan hasil
cat("Example Outcomes in S:", Example_Outcomes, "\n")## Example Outcomes in S: (1, 1) (1, 2) (2, 1) (6, 6)
## Total Outcomes (N) for Two Dice: 36
2.3 Complement Rule
Interpretation:
The Complement Rule states that the probability of an event not
happening is equal to1 minus the probability of the event
happening.
The complement of event A is written as
A′ (A prime) or Aᶜ.
This rule is useful when calculating probabilities of events that are easier to evaluate by first determining what does not occur.
Formula:
\[
P(A') = 1 - P(A)
\]
Example: Probability of not drawing a Queen from a standard deck of 52 cards.
# Probabilitas menggunakan Aturan Komplemen (Complement Rule)
# Probabilitas mendapatkan Queen (ada 4 Queen dari 52 kartu)
P_Queen <- 4 / 52
# Aturan komplemen: probabilitas TIDAK mendapatkan Queen
P_Not_Queen <- 1 - P_Queen
# Tampilkan hasil
cat("P(Queen):", round(P_Queen, 4), "\n") # Menampilkan peluang mendapatkan Queen## P(Queen): 0.0769
## P(Not Queen): 0.9231
Conclusion Fundamental probability concepts help us understand how likely events are to occur. By knowing the sample space, event types, and basic rules—such as addition, multiplication, complements, independent, and dependent events—we can analyze uncertain situations more accurately and make better predictions.
3 Independent and Dependent Events
In probability theory, events can either influence each other or
occur completely independently.
Understanding whether events are independent or dependent helps
determine how to calculate their combined probabilities.
3.1 Independent Events
Interpretation:
Independent events occur when the outcome of one event does not affect
the probability of the other event.
Examples include flipping a coin and rolling a dice—neither action
influences the other.
Formula:
\[
P(A \cap B) = P(A) \times P(B)
\]
Example:
A coin is flipped and a dice is rolled.
Find the probability that the coin shows= Tails= and the dice shows an
even number.
Probability of Tails: \[ P(\text{Tails}) = \frac{1}{2} \]
Probability of even number (2, 4, 6): \[ P(\text{Even}) = \frac{3}{6} = \frac{1}{2} \]
Thus: \[ P(\text{Tails and Even}) = \frac{1}{2} \times \frac{1}{2} = \frac{1}{4} \]
# Contoh kejadian independent
# Kejadian A = mendapatkan Tails
# Kejadian B = mendapatkan angka genap pada dadu
P_Tails <- 1/2 # peluang Tails
P_Even <- 3/6 # angka genap (2,4,6) dari 6 angka
# Hitung peluang gabungan karena independent
P_Combined_Ind <- P_Tails * P_Even
cat("P(Tails):", P_Tails, "\n")## P(Tails): 0.5
## P(Even Number): 0.5
## P(Tails and Even): 0.25
3.2 Dependent Events
Interpretation:
Dependent events occur when the outcome of the first event affects the
probability of the second event.
A common example is drawing objects without replacement, where the total
number of items changes after the first draw.
Formula:
\[
P(A \cap B) = P(A) \times P(B|A)
\]
Example:
A box contains 4 blue balls and 3 red balls (7 total).
Two balls are drawn without replacement.
Find the probability that the first ball is blue and the second ball is
red.
Probability the first ball is blue: \[ P(\text{Blue First}) = \frac{4}{7} \]
After drawing a blue ball, 6 balls remain (3 red, 3 blue).
Probability the second ball is red: \[
P(\text{Red Second | Blue First}) = \frac{3}{6}
\]
Thus: \[ P(\text{Blue then Red}) = \frac{4}{7} \times \frac{3}{6} = \frac{12}{42} = \frac{2}{7} \]
P_Blue_First <- 4/7
P_Red_After_Blue <- 3/6
P_Combined_Dep <- P_Blue_First * P_Red_After_Blue
cat("P(Blue First):", P_Blue_First, "\n")## P(Blue First): 0.5714286
## P(Red Second | Blue First): 0.5
## P(Blue then Red): 0.2857143
Conclusion: The key difference between independent and dependent events lies in whether the probability of the second event changes after the first event occurs. If the probability stays the same → the events are independent. If the probability changes → the events are dependent.
4 Union of Events
In this section, the video explains how to determine the probability of combined events using the union concept. The main idea is that the union of two events includes every outcome that belongs to either event or to both. To calculate this correctly, we need to understand the sample space and identify any overlap between the events. The video also shows how Venn diagrams help illustrate shared outcomes so that we avoid counting them twice when applying the union formula.
4.1 Review of Basic Probability Definitions
Interpretation: The video begins with a review of
basic probability concepts.
To understand the union of events, it is important to first
understand:
- Sample space: the set of all possible outcomes of
an experiment
- Probability of an event:
\[ P = \frac{\text{Number of favourable outcomes}}{\text{Total number of possible outcomes}} \]
These definitions are the foundation for understanding how probabilities combine when two events occur together or overlap.
4.2 Union of Events
Interpretation: The video introduces the concept of Union of Events, written as \(A \cup B\), which indicates that:
- Event A occurs,
- OR event B occurs,
- OR both occur.
Using a Venn diagram helps visualize how the events overlap.
The formula for calculating the probability of a union is:
\[ P(A \cup B) = P(A) + P(B) - P(A \cap B) \]
The subtraction of \(P(A \cap B)\) prevents double-counting outcomes that belong to both A and B.
Example: When rolling two dice, the
sample space contains 36 possible outcomes.
Using the union formula allows us to correctly calculate the probability
of events involving combined results from both dice.
5 Exclusive and Exhaustive Events
This video explains two important concepts in probability theory: Mutually Exclusive Events and Exhaustive Events. These concepts help us determine how events interact within the sample space and how to calculate their combined probabilities.
5.1 Mutually Exclusive Events
Interpretation:
Two events are called mutually exclusive if they cannot
occur at the same time.
If one event happens, the other one is guaranteed not to happen.
Formula:
Because they do not overlap: \[
P(A \cap B) = 0
\]
Thus, the union becomes: \[ P(A \cup B) = P(A) + P(B) \]
Example:
Rolling a single die:
- A = outcome is 2
- B = outcome is 5
These events cannot occur simultaneously, so: \[ P(A \cup B) = \frac{1}{6} + \frac{1}{6} = \frac{1}{3} \]
# Mutually Exclusive Example
# Event A = roll a 2
# Event B = roll a 5
P_A <- 1/6
P_B <- 1/6
# Because A and B cannot happen together
P_union <- P_A + P_B
cat("P(A):", P_A, "\n")## P(A): 0.1666667
## P(B): 0.1666667
## P(A ∪ B): 0.3333333
5.2 Exhaustive Events
Interpretation:
Events are called exhaustive if together they cover the
entire sample space.
This means no possible outcome is left out.
Formula:
If A and B together include all outcomes: \[
P(A \cup B) = 1
\]
Example:
Rolling a die:
A = outcome is even {2, 4, 6}
B = outcome is odd {1, 3, 5}
Together, they cover all 6 outcomes:
\[
P(A \cup B) = 1
\]
# Exhaustive Events Example
# A = even numbers
# B = odd numbers
P_even <- 3/6
P_odd <- 3/6
# Because even + odd cover all possible outcomes
P_union_exhaustive <- P_even + P_odd
cat("P(Even):", P_even, "\n")## P(Even): 0.5
## P(Odd): 0.5
## P(A ∪ B): 1
Conclusion Mutually exclusive events cannot occur at
the same time, so their intersection is zero.
Exhaustive events together include all possible outcomes, so their union
equals one.
These concepts help determine how events relate within the sample space
and how their probabilities should be combined.
6 Binomial Experiment and Binomial Formula
This video explains two important concepts in probability:
Binomial Experiment and Binomial
Formula.
These concepts help us analyze repeated independent trials with only two
possible outcomes: success or failure.
6.1 Binomial Experiment
Interpretation:
A process is called a binomial experiment if it meets the
following four conditions:
- It consists of n repeated trials.
- Each trial has only two possible outcomes (success
or failure).
- The probability of success p remains
constant.
- Each trial is independent.
Example:
In the video:
- n = 3 trials
- p = 0.70 probability of success
We calculate the probability for X = 0, 1, 2, 3 successes.
6.2 Binomial Formula
Interpretation:
The binomial formula gives the probability of getting exactly k
successes in n trials.
\[ P(X = k) = \binom{n}{k} p^k (1-p)^{n-k} \]
Example:
Find the probability of exactly 2 successes out of 3 trials
with p = 0.70.
# Binomial Experiment (Video Example)
n <- 3 # number of trials
p <- 0.70 # probability of success
x <- 0:n # possible number of successes
# Binomial probabilities for X = 0, 1, 2, 3
prob_table <- data.frame(
Successes = x,
Probability = dbinom(x, n, p)
)
print("Binomial Experiment Probabilities:")## [1] "Binomial Experiment Probabilities:"
## Successes Probability
## 1 0 0.027
## 2 1 0.189
## 3 2 0.441
## 4 3 0.343
# Binomial Formula Example
k <- 2 # exactly 2 successes
P_exact_k <- choose(n, k) * p^k * (1 - p)^(n - k)
cat("\nProbability of exactly 2 successes (Binomial Formula):\n")##
## Probability of exactly 2 successes (Binomial Formula):
## P(X = 2) = 0.441
Conclusion A binomial experiment deals with repeated trials that have only success or failure. The binomial formula allows us to compute the probability of exactly k successes. Both concepts work together to describe discrete probability events.
7 Binomial Distribution
The video introduces the concept of the Binomial Distribution, which models the number of successes in repeated independent trials with only two possible outcomes: success or failure.
A random variable \(X\) follows a Binomial Distribution if:
- The experiment has n fixed trials.
- Each trial has two outcomes (success or
failure).
- The probability of success p remains
constant.
- Trials are independent.
Thus,
\[ X \sim \text{Binomial}(n, p) \]
**Binomial Probability Formula
\[ P(X = k) = \binom{n}{k} p^k (1-p)^{n-k} \]
Where:
- n = number of trials
- k = number of successes
- p = probability of success
Example
Use \(n = 10\), \(p = 0.5\).
We compute the distribution and visualize it using a bar chart.
# Parameters
n <- 10
p <- 0.5
k_values <- 0:n
# Binomial probabilities
probabilities <- dbinom(k_values, n, p)
# Table
binom_table <- data.frame(
Successes = k_values,
Probability = probabilities
)
print("Binomial Distribution Table (n = 10, p = 0.5):")## [1] "Binomial Distribution Table (n = 10, p = 0.5):"
## Successes Probability
## 1 0 0.0009765625
## 2 1 0.0097656250
## 3 2 0.0439453125
## 4 3 0.1171875000
## 5 4 0.2050781250
## 6 5 0.2460937500
## 7 6 0.2050781250
## 8 7 0.1171875000
## 9 8 0.0439453125
## 10 9 0.0097656250
## 11 10 0.0009765625
# Properties
mean_val <- n * p
variance_val <- n * p * (1 - p)
sd_val <- sqrt(variance_val)
cat("\nMean =", mean_val, "\n")##
## Mean = 5
## Variance = 2.5
## Standard Deviation = 1.581139
# Distribution shape
shape <- ifelse(p == 0.5, "Symmetric",
ifelse(p < 0.5, "Right-skewed", "Left-skewed"))
cat("\nDistribution Shape:", shape, "\n")##
## Distribution Shape: Symmetric
##
## Normal Approximation Check:
## np ≥ 10 ? FALSE
## n(1-p) ≥ 10 ? FALSE
# Barplot
barplot(probabilities,
names.arg = k_values,
main = "Binomial Distribution (n = 10, p = 0.5)",
xlab = "Number of Successes (k)",
ylab = "Probability",
col = "lightblue")Conclusion
The binomial distribution helps describe discrete outcomes involving
success and failure.
Its mean, variance, and shape depend on the parameters \(n\) and \(p\), and visualization makes its behavior
easier to understand.
8 Reference
[1] “Probabilitas: Pengertian, Rumus, Jenis, dan Contoh dalam Kehidupan Sehari-hari”. Unesa Vokasi. Tautan: https://terapan-ti.vokasi.unesa.ac.id/post/probabilitas-pengertian-rumus-jenis-dan-contoh-dalam-kehidupan-sehari-hari
[2] “Modul 2 – Peluang (Probabilitas)” (PDF). Scribd / materi kuliah probabilitas. Tautan: https://id.scribd.com/doc/227459863/Modul-2-Peluang-Probabilitas