Probability is simply the likelihood that an event will occur given certain parameters.
2025-09-20
Probability is simply the likelihood that an event will occur given certain parameters.
Experiment – is the action or process with an observable outcome.
Sample space(S) – The set of all possible outcomes of an experiment.
Event(E) – an instance of the sample space.
Probability of an Event P(E) – The likelihood that a specified event occurs.
P(E)=Number of desired outcomes/Total number of possible outcomes
Example: Flipping a coin and getting heads
P(heads)=\(1/2\)=0.5
Number of desired outcomes = 1. The only outcome we are looking for is heads.
Total number of possible outcomes = 2. The options are heads and tails.
Theoretical Probability: Based on reasoning or calculation
Experimental Probability: Based on actual experiments.
Subjective Probability: Based on belief or experience.
Example: Coin \(\rightarrow\) \(1/2+1/2=1\)
Example: Dice \(\rightarrow\) \(1/6+1/6+1/6+1/6+1/6+1/6=1\)
The probability that a desired event does not happen.
Example: Probability of not rolling a 1 or 2 \(\rightarrow\) \(1-1/6-1/6=4/6\)
The probability of A happening given B has occurred.
\(P(A \mid B) = \frac{P(A \text{ and } B)}{P(B)}\)
There are a number of ways to visualize probability.
To compare probabilities of discrete events, use a bar or pie chart.
To show step-by-step possibilities for multiple events, use a tree-diagram.
To show overlapping events (union/intersection), use a Venn diagram.
What is the probability of rolling a 6 when rolling a die?
library(ggplot2) library(formatR) df <- data.frame( roll = 1:6, probability = rep(1/6,6) ) ggplot(df, aes(x=factor(roll), y=probability, fill = roll ==6)) + geom_bar(stat = "identity") + scale_fill_manual( values = c("#48D1CC","#98FF98")) + labs(x = "Rolled Value", y = "Probability", title = "Probability of Rolling a 6") + theme_get()
What is the probability of rolling a dice 100 times? How many times did you roll a 6?
[1] 18
[1] 0.18
If you flip a coin 150 times how many times will you get the observation of Tails?