Professional Documents
Culture Documents
Shamik Sen
Dept. of Biosciences & Bioengineering
IIT Bombay
Probability
Frequency Interpretation:
- probability is a property of the outcome
- can be experimentally determined
Sample Space & Event
Sample space (S): Set of all possible outcomes of an experiment
A: newborn is boy
B: newborn is girl
Mutually Exclusive Events
1: 𝐴 = 𝐵! , B = 𝐴!
2: 𝐴 + 𝐵 = 𝑆
EG FG (E+F)G
De Morgan’s Laws
(𝐸 + 𝐹)! = 𝐸 ! 𝐹 !
(𝐸𝐹)! = 𝐸 ! + 𝐹 !
Axioms of Probability
Probability of an event = 𝑃(𝐸)
1. 𝑃 𝑆 = 1
2. 0 ≤ 𝑃(𝐸) ≤ 1
A. 𝑃 𝐸 & = 1 − 𝑃(𝐸)
B. 𝑃 𝐴 + 𝐵 = 𝑃 𝐴 + 𝑃 𝐵 − 𝑃(𝐴𝐵)
• Generalize: 𝑛"𝑛# … 𝑛$
Two balls are “randomly drawn” from a bowl containing 6 white and 5 black balls.
What is the probability that one of the drawn balls is white and the other black?
() (
Hence, 𝑃 𝐸 = "") = ""
Calculating Probability: Example 2
DNA is made of 4 nucleotides: 𝐴, 𝑇, 𝐺, 𝐶
(a) 10!
"!$!
(b)
%&!
Calculating Probability: Example 4
I have a coin which is not fair. I flip the coin twice.
What will you bet? (a) Same (b) Different (c) Cannot say
Toss 2
P(same) = 𝑝# + 𝑞# Toss 1 H T
H p2 pq
P(different) = 2𝑝𝑞 T pq q2
𝑛−1 H
Let 𝑃% = probability of scoring 𝑛 points
𝑛
" "
Therefore, 𝑃% = 𝑃%-"× # + 𝑃%-#× # T
𝑛−2
Let 𝑃% = A𝑥 %
"
Solving, we get, 𝑥 = − , 1
#
Example 5 contd..
General solution: 𝑃% = 𝐴(−0.5)% + 𝐵(1)%
Therefore,
" #
Solving, 𝐴 = +
,𝐵 = +
# "
Therefore, 𝑃% = + + + (−0.5)%
Permutations Vs Combinations
Permutations: Where arrangements are important
-Rankings
-Sequences
In how many different ways can we choose 𝑟 items from a total of 𝑛 items?
# of Arrangements = 𝑛 𝑛 − 1 𝑛 − 2 … . 𝑛 − 𝑟 + 1 = 𝑃$%
# of Repetitions (e.g., ABC, ACB, BCA, BAC, CAB, CBA) = 𝑟!
% %-" %-# ….(%-$0") %!
# of Combinations = $!
= $! %-$ ! = 𝐶$%
Calculating Probability: Example 6
A committee of 8 members is to be selected from a group of 6 men and 9
women. If the selection is made randomly, what is the probability that the
committee consists of 3 men and 5 women?
'!" !#$
Hence, 𝑃 =
!%&#
Conditional Probability
Conditional Probability of E given F =
P(F/E) = 𝑃(𝐸𝐹)/𝑃(𝐸)
Multiplication Rule:
𝑃 𝐸𝐹 = P(E/F) P(F)
𝑃 𝐸𝐹 = P(F/E) P(E)
Conditional Probability: Example 1
5 red and 2 green balls are present in a bag. A random ball is selected and replaced by
a ball of the other color; then a second ball is drawn.
5 4 2 6 32
𝑃 𝑅! = × + × =
7 7 7 7 49
5 4
𝑃 𝑅" 𝑅! ×
𝑃 𝑅" /𝑅! = = 7 7 = 20 = 5
𝑃 𝑅! 32 32 8
49
Conditional Probability: Example 2
The organization that Jones works for is running a father–son dinner for those
having at least one son. Each of these employees is invited to attend along
with their youngest son. If Jones is known to have two children, what is the
conditional probability that they are both boys given that he is invited to the
dinner?
A: event that atleast one of Jones’s children is a boy (as he is invited to dinner)
B: event that both of Jones’s children are 2 boys
S: { 𝑏, 𝑏 , 𝑏, 𝑔 , 𝑔, 𝑏 , (𝑔, 𝑔)}
Disease (D)
Test Result (T) Present (D) Absent (D) Total I
Sensitivity = = 𝑃(𝑇/𝐷)
I0!
Positive (T) a b a+b
Negative (T) c d c+d J
Specificity = D0J = P(𝑇 ! /𝐷 ! )
Total a+c b+d
Example 1
A medical research team wished to evaluate a screening test for Alzheimer’s disease. The
test was administered to 450 Alzheimer’s patients and 500 patients with no symptoms of
the disease. The results are as follows:
Alzheimer’s Diagnosis (D)
Test Result (T) Present (D) Absent (D) Total
).33×).))2
Therefore, 𝑃 𝐷/𝑇 = = 0.33
).33×).))20).)"×).332
Receiver operating characteristic (ROC) Curves
Since 𝐸 = 𝐸𝐹 + 𝐸𝐹 ! , 𝑃 𝐸 = 𝑃 𝐸𝐹 + 𝑃(𝐸𝐹 ! )
Therefore, 𝑃 𝐸𝐹 ! = P 𝐸 − 𝑃 𝐸𝐹 = 𝑃 𝐸 1 − 𝑃 𝐹 = 𝑃 𝐸 𝑃(𝐹 ! )
• Discrete RV Vs Continuous RV
Sum of scores of two dice throws
1
𝑃 𝑋 = 2 = 𝑃 𝑋 = 12 = Throw 2
36 Throw 1
1
𝑃 𝑋 = 3 = 𝑃 𝑋 = 11 =
18
1
𝑃 𝑋 = 4 = 𝑃(𝑋 = 10) =
12
1
𝑃 𝑋=5 =𝑃 𝑋=9 =
9
5
𝑃 𝑋=6 =𝑃 𝑋=8 =
36
1
𝑃 𝑋=7 =
6
pmf & CDF
X 2 3 4 5 6 7 8 9 10 11 12
𝑝(𝑎) 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36
𝐹(𝑎) 1/36 3/26 6/36 10/36 15/36 21/36 26/36 30/36 33/36 35/36 36/36
Bounds: 0 ≤ 𝐹 𝑎 ≤ 1
Non-decreasing function
Example 1
X: 1 3 5 7
F(a) 0.5 0.75 0.9 1
𝑓 𝑥 = 𝐴𝑥 #, 𝑓 𝑥 = 𝐶 𝑥 # − 𝑥 2
Q 𝐹(𝑥)
e 𝑓 𝑥 𝑑𝑥 = e 𝑓 𝑥 𝑑𝑥 = 1
P -Q
𝑋=𝑥
𝑃 𝑋 ∈ 𝐵 = e 𝑓 𝑥 𝑑𝑥 𝑑𝐹
= 𝑓(𝑥)
R 𝑑𝑥
D
e 𝑓 𝑥 𝑑𝑥 = 𝑃(𝑎 ≤ 𝑥 ≤ 𝑏)
I
Example 2
"
Since ∫) 𝑓 𝑥 𝑑𝑥 = 1
0, 𝑥 ≤ 0
𝐹 𝑥 =k -U "
1 − 𝑒 ,𝑥 > 1
Find 𝑃 𝑋 > 1
JV -U "
We can determine 𝑓 𝑥 = JU
= 2𝑥𝑒
Q -U " Q -W
Therefore, 𝑃 𝑋 > 1 = ∫" 2𝑥𝑒 𝑑𝑥 = ∫" 𝑒 𝑑𝑦 = 𝑒 -"
Expectation of a Random Variable
"0#0+0*020(
• For one throw of a dice, 𝐸 𝑋 = (
= 3.5
Properties of Expectation
1. Expectation of a constant is a constant, i.e., 𝐸 𝑐 = 𝑐
4. 𝐸 𝑎𝑋 + 𝑏 = 𝑎𝐸 𝑋 + 𝑏
5. 𝐸 𝑋 % = ∫ 𝑥 % 𝑓 𝑥 𝑑𝑥
6. 𝐸 ∑ 𝑋X = ∑ 𝐸(𝑋X )
# #
7. 𝑉𝑎𝑟 𝑋 = 𝐸 𝑋 − 𝜇 =E 𝑋# − 𝐸 𝑋 = 𝐸 𝑋 # − 𝜇#
# # #
Now, 𝐸 𝑋 − 𝑐 =𝐸 𝑋 − 𝜇 + (𝜇 − 𝑐) =𝐸 𝑋−𝜇 + 2𝐸 𝑋 − 𝜇 𝐸 (𝜇 −
𝑐) + 𝐸 𝜇 − 𝑐 #
Thus, 𝐸 𝑋 − 𝑐 # ≥𝐸 𝑋−𝜇 #
• Each trial results in one of two mutually exclusive outcomes (Success & Failure)
• Probability of success, 𝑝, remains constant from trial to trial
• Trials are independent
Probability of failure: 𝑞 = 1 − 𝑝
"
Implying 𝑝 ≥ #
Expectation & Variance of a Binomial Distribution
Therefore, 𝑉𝑎𝑟 𝑋 = 𝐸 𝑋 # − 𝐸 𝑋 # = 𝑝 − 𝑝# = 𝑝 1 − 𝑝 = 𝑝𝑞
Example: 𝑛 = 6, 𝑝 = 0.4
𝑃 𝑋 = 0 = 0.6(
4 6
𝑃 𝑋=1 = × 𝑃 𝑋=0 = 0.1866
6 1
4 5
𝑃 𝑋=2 = × 𝑃 𝑋=1 = 0.311
6 2
4 4
𝑃 𝑋=3 = × 𝑃 𝑋=2 = 0.2765
6 3
4 3
𝑃 𝑋=4 = × 𝑃 𝑋=3 = 0.1382
6 4
Poisson Distribution
Discrete Random Variable taking values ≥ 0
Examples
Y'
Pmf: 𝑃 𝑋 = 𝑖 = -Y
𝑒 X! , 𝑖 = 0,1,2, …
𝑃(𝑋 = 𝑖 + 1) 𝜆
=
𝑃(𝑋 = 𝑖) 𝑖+1
Example
If the average number of claims handled daily by an insurance company is
5, (i) what proportion of days have less than 3 claims? (ii) What is the
probability that there will be 4 claims in exactly 3 of the next 5 days?
Assume that the number of claims on different days is independent.
So, 𝜙 \ 0 = 𝐸 𝑋
Similarly, 𝜙 % 0 = 𝐸 𝑋 %
] (' ] )* Y'
For Poisson Distribution, 𝜙 𝑡 = ∑
X!
= 𝑒 -Y ∑(𝜆𝑒 Z )X = exp(𝜆(𝑒 Z −1))
Therefore, 𝐸 𝑋 = 𝜙 \ 0 = 𝜆, 𝐸 𝑋 # = 𝜆 + 𝜆#
Therefore, 𝑉𝑎𝑟 𝑋 = 𝜆
𝑃(𝑋 ≥ 𝑎) ≤ 𝐸(𝑋)/𝑎
Poisson Distribution
Y '
• 𝑃 𝑋=𝑖 = 𝑒 -Y X! , 𝑖 = 0,1,2, …
] (' ] )* Y'
• 𝜙 𝑡 = ∑
X!
= 𝑒 -Y ∑(𝜆𝑒 Z )X = exp(𝜆(𝑒 Z −1))
* X
8
𝑃 𝑋" + 𝑋# ≤ 4 = ~ 𝑒 -,
𝑖!
X_)
Normal Distribution
(,)-) "
" - "
Probability Density Function 𝑓 𝑥 = ` #a
𝑒 /
Random Variable, X
Normal Distribution
" Z " /#
1. Moment generating function, 𝜙 𝑡 = 𝑒 bZ0`
2. 𝐸 𝑋 = 𝜇, 𝑉𝑎𝑟 𝑋 = 𝜎 #
[-b
3. Standard Normal Variable, 𝑍 =
`
Random Variable, X
4. 𝑍 follows Normal distribution with mean 0 and variance 1
" -U " /#
5. Standard normal distribution, 𝑓 𝑥 = #a
𝑒
Cumulative Distribution Function
𝑏−𝜇 𝑎−𝜇
𝑃 𝑎<𝑋<𝑏 =Φ − Φ( )
𝜎 𝜎
Example 1
If X is a normal random variable with mean 𝜇 = 3 and variance 𝜎 # = 16, find
""-+
1. 𝑃(𝑋 < 11) = 𝑃 𝑍 < *
= 𝑃 𝑍 < 2 = Φ 2 = 0.9772
-"-+
2. 𝑃(𝑋 > −1) = 𝑃 𝑍 > *
= 𝑃 𝑍 > −1 = 𝑃 𝑍 < 1 = Φ 1 = 0.8413
a) 𝐸 𝑊 = 𝐸 3𝑉 # = 3𝐸 𝑉 # = 3 𝑉𝑎𝑟 𝑉 + 𝐸 𝑉 # = 111
*)-(
b) 𝑃(𝑊 > 120) = 𝑃 3𝑉 #
> 120 = 𝑃 𝑉 > 40 = 𝑃 𝑍 > "
=
𝑃 𝑍 > 0.3246 = 1 − Φ 0.3246 = 0.3727
𝑃 𝑍 < −𝑥 = Φ −𝑥 = 𝑃 𝑍 > 𝑥 = 1 − Φ 𝑥
Example 3
If the yearly precipitation in Pune is a normal random variable with a mean of
12.08 inches and a standard deviation of 3.1 inches, Find the probability that
the total precipitation during the next 2 years will exceed 25 inches.
Then 𝑋" + 𝑋# is a normal random variable with mean = 24.16 inches and
standard deviation 3.1 2 = 4.384 inches
#2-#*."(
Therefore, 𝑃 𝑋" + 𝑋# > 25 = 𝑃 𝑍 > = 𝑃 𝑍 > 0.1916 = 0.424
*.+,*
Uniform Distribution
Prob.
"
,𝑎 ≤𝑥≤𝑏
1. 𝑓 𝑥 = D-I
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
𝑎 𝑏 𝑥
e-f
2. 𝑃 𝛼 ≤ 𝑥 ≤ 𝛽 = D-I
, [𝛼, 𝛽] is a sub-interval of 𝑎, 𝑏
I0D (D-I)"
3. 𝐸 𝑋 = #
, 𝑉𝑎𝑟 𝑋 = "#
Exponential Distribution
𝜆𝑒 -YU , 𝑥 ≥ 0
1. 𝑓 𝑥 =
0, 𝑥 < 0
Y
4. 𝜙 𝑡 = Y-Z , 𝑡 < 𝜆
"
5. 𝐸 𝑋 = Y
, Var X = 1/𝜆#
Example
Suppose that a number of miles that a car can run before its battery wears out is
exponentially distributed with an average value of 10,000 miles. If a person desires
to take a 5,000-mile trip, what is the probability that she will be able to complete
her trip without having to replace her car battery?
"
We have, 𝜆 = "))))
• 𝐶𝑜𝑣 𝑋, 𝑌 = 𝐸 𝑋 − 𝜇[ 𝑌 − 𝜇g = 𝐸 𝑋𝑌 − 𝐸 𝑋 𝐸 𝑌
• 𝐶𝑜𝑣 𝑋, 𝑌 = 𝐶𝑜𝑣 𝑌, 𝑋
• 𝐶𝑜𝑣 𝑋, 𝑋 = 𝑉𝑎𝑟 𝑋
• 𝐶𝑜𝑣 ∑ 𝑋X , 𝑌 = ∑ 𝐶𝑜𝑣 𝑋X , 𝑌
• 𝑉𝑎𝑟 ∑ 𝑋X = 𝐶𝑜𝑣 ∑ 𝑋X , ∑ 𝑋h = ∑ 𝐶𝑜𝑣 𝑋X , 𝑋X + ∑%X_" ∑%h_" 𝐶𝑜𝑣(𝑋X , 𝑋h )
Xih
∑(U-U)(W-
̅ l
W)
• 𝑟=
∑(U-U)̅ " ∑(W-W)
l "
∑(U-U)(W-
̅ l
W)
• Covariance, 𝑆UW =
%-"
m,0
• 𝑟=m
, m0
• −1 ≤ 𝑟 ≤ 1
Linear Regression
~ 𝑦 = 𝑛𝑎 + 𝑏 ~ 𝑥
~ 𝑥𝑦 = 𝑎 ~ 𝑥 + 𝑏 ~ 𝑥 #
Summary
• Counting – Permutations Vs Combinations
• Covariance