Random events probability combinatorics
Random events probability combinatorics
Probability
Prof. Miloš Stanković
Statistical experiment
• We start from the definition of the statistical (or random) experiment
to better connect the axioms of probability theory with events in the
real world that we are modeling
• Properties:
• It can be repeated many arbitrary many times under the same conditions
• All of the possible outcomes are predefined
• The outcome of any single experiment is not known in advance
Ω = {𝐻, 𝑇}
3. The measurements in engineering and physics - each measurement gives slightly different value
• Set Ω is in this case infinite (countable or uncountable)
Algebra of events
• Algebra of events is the algebra of sets
• Event A or B is denoted by 𝐴 ∪ 𝐵
• Event A and B (simultaneously) is denoted by 𝐴 ∩ 𝐵 (or AB)
• Event A or not B is denoted by 𝐴\𝐵 (or 𝐴 − 𝐵)
• The opposite event to event: 𝐴𝑐 (complement)
• 𝐴 ⊂ 𝐵 – event A implies event B
A1) 𝑃 Ω = 1
A2) 0 ≤ 𝑃 𝐴 ≤ 1 , for 𝐴 ⊂ Ω
A3) 𝑃 𝐴1 ∪ 𝐴2 ∪ ⋯ = 𝑖 𝑃(𝐴𝑖 ) if events 𝐴𝑖 are mutually exclusive
• The developed powerful mathematical apparatus is applied regardless of the selected set
of events, as well as the selected probability distribution of events
• We see that the axioms are not tied to specific probabilities of events - this mathematical
apparatus "distanced itself" from the application to the specific problems in reality
Example
• Two coins tossing Ω = {𝐻𝐻, 𝐻𝑇, 𝑇𝐻, 𝑇𝑇}
• Lets define probabilities in the following way:
1 1 1 1
𝑃 𝐻𝐻 = ,𝑃 𝐻𝑇 = , 𝑃 𝑇𝐻 = , 𝑃 𝑇𝑇 =
4 12 2 6
• All axioms hold
1
• We can calculate, e. g. , 𝑃 𝐻1 = 𝑃 𝐻𝐻 ∪ 𝐻𝑇 = (according to A3)
3
• The selected probability function is legitimate, but it is not a good
model of fair coins tossing!
Statistical estimation of probability
• One way to determine the probability is to repeat the statistical experiment
n times
• We record the number of occurrences of an event 𝐴: it is m(n)
• Then, it holds that
𝑚(𝑛)
𝑃 𝐴 = lim
𝑛→∞ 𝑛
• This rule can be proved starting from axioms – the law of large numbers
• 𝐴 ⊂ 𝐵 ⇒ 𝑃 𝐴 ≤ 𝑃(𝐵)
Properties of probability
• General equation for the probability of union of 𝑛 events:
𝑃 𝐴𝑛1 ∪ 𝐴2 ∪ ⋯ 𝐴𝑛
𝑛+1
= 𝑃(𝐴𝑖 ) − 𝑃 𝐴𝑖 𝐴𝑗 + 𝑃 𝐴𝑖 𝐴𝑗 𝐴𝑘 + ⋯ + −1 𝑃 𝐴1 𝐴2 … 𝐴𝑛
𝑖=1 1≤𝑖<𝑗≤𝑛 1≤𝑖<𝑗<𝑘≤𝑛
• Boole’s inequality 𝑛
𝑃 𝐴1 ∪ 𝐴2 ∪ ⋯ 𝐴𝑛 ≤ 𝑃(𝐴𝑖 )
𝑖=1
Example
• What is the probability that, when rolling a dice, we get a number
that is divisible by 2 or 3?
• Let A be the event that the obtained number is divisible by 2, and B
the event that the obtained number is divisible by 3. Events A and B
are not mutually exclusive - 6 is divisible by both 2 and 3
3 2 1 2
• Hence, 𝑃 𝐴𝑈B = 𝑃 𝐴 + 𝑃 𝐵 − 𝑃 𝐴𝐵 = + − =
6 6 6 3
Application of combinatorics
• To obtain probabilities when dealing with experiments with equally likely
outcomes, counting the outcomes is needed
• Sometimes we can use computer, but combinatorial equations give precise
answers
• All equation are derived from two rules:
• Rule of summation: If an object of type 1 can be chosen in 𝑛1 ways, an object of type
2 in 𝑛2 ways, ... , object of type 𝑘 in 𝑛𝑘 ways, then an object of any type can be
chosen in 𝒏𝟏 + 𝒏𝟐 + ⋯ + 𝒏𝒌 ways.
• Product rule: If an object of type 1 can be chosen in 𝑛1 ways, after that an object of
type 2 in 𝑛2 ways, ... , and at the end object of type 𝑘 in 𝑛𝑘 ways, then, k objects one
by one can be chosen in 𝑛1 𝑛2 ⋯ 𝑛𝑘 ways.
Example
• In a box we have 2 red balls, 3 white and 6 blue, number of ways to
choose one ball (of any type) is 10
• Solution: 𝑛𝑘
• Solution: 𝑛! = 𝑛 𝑛 − 1 𝑛 − 2 ⋯ 2 ⋅ 1
• Solution: If objects were different - 𝑛! ways. Since objects of the same type do not
differ – their permuting doesn’t change the outcome. Number of these permutaions
is 𝑛1 ! 𝑛2 ! … 𝑛𝑟 ! .
𝑛!
• Hence, the solution is
𝑛1 !𝑛2 !…𝑛𝑟 !
Combinations without repetitions
• In how many ways we can choose k elements from a set of n
elements?
10 4
2 99
4
• Solution: 1 − 20 =
323
4