Beruflich Dokumente
Kultur Dokumente
Binomial Distribution
𝑛!
𝑃 𝑿=𝑥 = 𝑝 𝑥 (1 − 𝑝)𝑛−𝑥 for 𝑥 = 0, 1, . . . , 𝑛
𝑥! 𝑛−𝑥 !
Binomial Distribution
Mean 𝐸 𝑿 = 𝜇𝑿 = 𝑛𝑝
Example Summary :
number of lasers (out of 15) that will pass the test
X Binomial (15, 0.75) P (X = 15) = 0.013363
P (X ≥ 14) = 0.0802
P (X 14) = 1 P (X 13)
= 1 BINOMDIST (13, 15, 0.75, 1)
Application of Binomial Distribution
It all starts with a mysterious
phone call…
• Conclusion?
Poisson Distribution
Bortkiewicz(1898)
• Poisson Distribution
was derived by the
French Mathematician
Siméon Poisson in
1837.
• His name is one of the
72 names inscribed on
the Eiffel Tower.
Poisson Distribution
Useful for modelling the number of occurrences of an event over a
specified interval of time or space.
Examples :
•number of customer orders received in one hour
•number of failures in a large computer system per month
Properties
•Probability of an occurrence is the same for any two intervals of
equal length.
•Occurrences in nonoverlapping intervals are independent of one
another.
Poisson Distribution
Note:
X is a discrete r.v. that takes on values 0, 1, 2, . . .
𝑒 −𝝀 𝝀0
𝑃 𝐗=0 = = 𝑒 −𝝀
0!
𝑒 −𝝀 𝝀1
𝑃 𝐗=1 = = 𝑒 −𝝀 𝝀
1!
Poisson Distribution
Example
Patients arrive at the A & E of a hospital at the average rate of 6 per hour
on weekend evenings. What is the probability of 4 arrivals in 30 minutes
on a weekend evening?
𝑒 −𝟑 𝟑4 .0497871 (81)
𝑃 𝐗=4 = = ≅ 0.1680
4! 24
Poisson Distribution
𝑒 −𝝀 𝝀𝑖
𝑃 𝐗=𝑖 = for 𝑖 = 0, 1, 2, . . .
𝑖!
Example Summary :
Let X be the number of patient arrivals in 30 minutes
X is Poisson with parameter =3
P (X = 4) = 0.1680
P (X = 4) = POISSON (4, 3, 0)
Example
• In 1898 L. J. Bortkiewicz published a book entitled The Law of Small
Numbers. He used data collected over 20 years to show that the
number of soldiers killed by horse kicks each year in each corps in
the Prussian cavalry followed a Poisson distribution with a mean of
0.63.
– What is the probability that at least one deaths caused by horse kick in a corps
in a year?
– What is the probability that there is no death caused by horse kick in a corps
over 6 years?
Linear Function of a Random
Variable
Linear Functions of a Random Variable
Example
Suppose daily demand for croissants at a bakery shop is given by
Suppose it costs $135 per day to run the croissant operation, and that
the cost of producing one croissant is $0.75.
Daily cost of croissant operations = 0.75 X + 135
Linear Functions of a Random Variable
Example
68 0.20 186.00
Note:
If Y = a X + b Formulas apply
to continuous
E (Y) = a E (X) + b
r.v.’s as well
Var (Y) = a2 Var (X)
Covariance and Correlation
Covariance and Correlation
Examples:
Unemployment rate vs Crime rate
Stock market vs Property market
Time spent on DSC1007 vs DSC1007 Exam marks
Covariance and Correlation
Q : How do we describe the relationship between two rv’s?
Example: Chain of upscale cafés sells gourmet hot coffees and cold beverages.
From past sales data, daily sales at one of their café obey the following
probability distribution for (X, Y),
X = # hot coffees, Y = # cold beverages sold per day
Probability No. of Hot Coffees Sold No. of Cold Drinks Sold
pi xi yi
0.10 360 360
0.10 790 110
0.15 840 30
0.05 260 90
0.15 190 450
0.10 300 230
0.10 490 60
0.10 150 290
0.10 550 140
0.05 510 290
Mean
Standard Deviation
From the scatter plot, we can conclude that
the sales of hot coffees and the sales of
cold beverage are negatively related.
Is it correct?
Covariance and Correlation
We now define the covariance of two random variables X and Y
with means X and Y :
Probability X Y
P ( X = x1, Y = y1 ) x1 y1
P ( X = x 2 , Y = y2 ) x2 y2
P ( X = xN, Y = yN ) xN yN
Covariance
𝐶𝑜𝑣 𝑿, 𝒀 = 𝐸 𝑿 − 𝜇𝑋 𝒀 − 𝜇𝑌
= 𝑃 𝑿 = 𝑥𝑖 , 𝒀 = 𝑦𝑖 𝑥𝑖 − 𝜇𝑋 𝑦𝑖 − 𝜇𝑌
𝑖
Covariance and Correlation
Covariance
𝐶𝑜𝑣 𝑿, 𝒀 = 𝐸 𝑿 − 𝜇𝑋 𝒀 − 𝜇𝑌
= 𝑃 𝑿 = 𝑥𝑖 , 𝒀 = 𝑦𝑖 𝑥𝑖 − 𝜇𝑋 𝑦𝑖 − 𝜇𝑌
𝑖
2
𝐶𝑜𝑣(𝑿, 𝑿) = 𝐸 𝑿 − 𝜇𝑋 = 𝑉𝑎𝑟 𝑿
𝐶𝑜𝑣 𝑿, 𝒀 = 𝐸 𝑿𝒀 − 𝐸 𝑿 𝐸(𝒀)
= 𝐸 𝑿𝒀 − 𝜇𝑋 𝜇𝑌
The bigger the covariance is, the stronger
the relationship is.
Is it true?
Covariance and Correlation
Covariance
𝐶𝑜𝑣 𝑿, 𝒀 = 𝐸 𝑿 − 𝜇𝑋 𝒀 − 𝜇𝑌
= 𝑃 𝑿 = 𝑥𝑖 , 𝒀 = 𝑦𝑖 𝑥𝑖 − 𝜇𝑋 𝑦𝑖 − 𝜇𝑌
𝑖
𝐶𝑜𝑣(𝑿, 𝒀)
Correlation 𝐶𝑜𝑟𝑟 𝑿, 𝒀 =
𝜎𝑋 𝜎𝑌
Comments :
• The measure of correlation is unit-free.
• Corr (X, Y) is always between 1.0 and 1.0
Covariance and Correlation
𝐶𝑜𝑣(𝑿, 𝒀)
Correlation 𝐶𝑜𝑟𝑟 𝑿, 𝒀 =
𝜎𝑋 𝜎𝑌
If higher than average values of X are apt to occur with lower than
average values of Y, then Cov(X, Y) < 0 and Corr(X, Y) < 0.
X and Y are negatively correlated.
Given the following two variables:
X Y
1 2
1 3
1 4
1 5
X Y
1 2
1 3
1 4
1 5
2 1
3 1
4 1
5 1
Common fallacy
A occurs in correlation with B
Therefore : A causes B
Reverse Causation
The more firemen fighting fire, The bigger the fire is observed to be
Applicants Admitted
Department Men Women
Men 8442 44%
Applicants Admitted Applicants Admitted
Women 4321 35%
A 825 62% 108 82%
F 272 6% 341 7%
Simpson’s Paradox
Probability X Y
p1 P ( X = x1, Y = y1 ) x1 y1
p2 P ( X = x 2 , Y = y2 ) x2 y2
pN P ( X = xN, Y = yN ) xN yN
Denote by f(x i ,y i )
E ( XY ) = E ( X) E ( Y)
Cov ( X , Y ) = 0 ( or Co rr ( X , Y ) = 0 )
Covariance and Correlation
We know : independent random variables are always uncorrelated.
Example : Consider r.v.’s X and Y with the following joint probability distribution
P (X , Y) X Y
1/3 1 1
1/3 0 1
1/3 1 1
Mean
E(aX + bY) = aE(X) + bE(Y)
Variance
Variance
Var(aX + bY) = a2Var(X) + b2Var(Y) + 2abCov(X,Y)
Sum of Random Variables
E(X) = 457, Var (X) = 59,671
cold beverages (Y) are $2.50/glass;
E(Y) = 210, Var (Y) = 21,210
hot coffees (X) $1.50/cup.
Cov (X,Y) = 27,260
Determine the following :
mean and standard deviation of daily sales of cold beverages
E(2.5Y) = 2.5
? E(Y) SD(2.5Y) = ?2.5 SD(Y) = 2.5√Var (Y)