-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
1/75
DSC1007 Lecture 4
Discrete Probabilities
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
2/75
Random Variables
Discrete Probability Distributions
Summary Measures of Probability Distributions
Binomial Distribution
Poisson Distribution
Linear Functions of a Random Variable
Sums of Random Variables
Covariance and correlation
Joint probability distributions and independence
Discrete Probability
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
3/75
Random Variables
A random variable (r.v.) may be discreteor continuous.
A random variable is a rule that assigns a numerical value
to each possible outcome of a probabilistic experiment.
Discrete : can only assume values that are distinct and separate
Continuous: can take on any value within some interval of numbers
Example 1 : 0, 1, 2, 3, 4, 5, . . .
Examples : [ 0 , 100 ], [ 2 , 4 ]
Example 2 : 2.0, 2.5, 3.0, 3.5
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
4/75
Random Variables
A random variable (r.v.) may be discreteor continuous.
Examples
1.Total number of points in a throw of 2 dice
2.Number of cups of cappuccino Edward will sell today
3.Number of Bs you will score in this semester
4.Time between this and the next slide
5.Your present weight in kg
A random variable is a rule that assigns a numerical value
to each possible outcome of a probabilistic experiment.
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
5/75
Random Variables
Example :
Lets say that 30 %of BBA students are internationalstudents. Suppose that each of the 3 BIZ1007 tutors randomly
selects one of his students to participate in a survey.
What are the possible outcomes of this experiment?
Outcome X
L L L 0
L L I 1
L I L 1
I L L 1
L I I 2
I L I 2
I I L 2
I I I 3
L : LocalI : International
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
6/75
Random Variables
Example :
Lets say that 30 %of BBA students are internationalstudents. Suppose that each of the 3 BIZ1007 tutors randomly
selects one of his students to participate in a survey.
Let X = number of international students chosen
Outcome X
L L L 0
L L I 1
L I L 1
I L L 1
L I I 2
I L I 2
I I L 2
I I I 3
L : LocalI : International
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
7/75
Probability Distribution
A probability distribution for a random variable
describes how probabilities are distributed over the
values of the random variable
A random variable is a rule that assigns a numerical value
to each possible outcome of a probabilistic experiment.
Recall
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
8/75
Discrete Probability Distribution
A probability distribution for a discrete random variable X
consists of
(i) possible values x1, x2, . . . , xn
(ii) corresponding probabilities p1,p2, . . . , pn
with the interpretation that
P(X= x1) =p1, P(X= x2) =p2, . . . , P(X= xn) =pn
Note:
Probabilities must sum to 1 : p1+p2+ . . . +pn= 1.0 ( pi 0 )
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
9/75
Discrete Probability Distribution
A probability distribution for a discrete random variable X
consists of
(i) possible values x1, x2, . . . , xn
(ii) corresponding probabilities p1,p2, ... , pn
with the interpretation that
P(X= x1) =p1, P(X= x2) =p2, . . . , P(X= xn) =pn
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
10/75
Example :
Lets say that 30 %of BBA students are internationalstudents. Suppose that each of the 3 BIZ1007 tutors randomly
selects one of his students to participate in a survey.
Let X = number of international students chosen
Outcome X
L L L 0
L L I 1
L I L 1
I L L 1
L I I 2
I L I 2
I I L 2
I I I 3
L : LocalI : International
Q: What is its probability
distribution?
We know Xis a r.v.
Discrete Probability Distribution
Return to this example.
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
11/75
Example :
Lets say that 30 %of BBA students are internationalstudents. Suppose that each of the 3 BIZ1007 tutors randomly
selects one of his students to participate in a survey.
Let X = number of international students chosen
Outcome X
L L L 0
L L I 1
L I L 1
I L L 1
L I I 2
I L I 2
I I L 2
I I I 3
Probability distribution
X P(X)
0 P(X=0)
1 P(X=1)
2 P(X=2)
3 P(X=3)
Discrete Probability Distribution
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
12/75
Example :
Lets say that 30 %of BBA students are internationalstudents.Suppose that each of the 3 BIZ1007 tutors randomly selects one
of his students to participate in a survey.
Let X = number of international students chosen
Discrete Probability Distribution
Outcome X Probability of Outcome
L L L 0
L L I 1
L I L 1
I L L 1L I I 2
I L I 2
I I L 2
I I I 3
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
13/75
Discrete Probability Distribution
Example :
Lets say that 30 %of BBA students are internationalstudents.Suppose that each of the 3 BIZ1007 tutors randomly selects one
of his students to participate in a survey.
Let X = number of international students chosen
X P(X)
0 P(X=0) =
1 P(X=1) =
2 P(X=2) =
3 P(X=3) =
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
14/75
Discrete Probability Distribution
Example :
Lets say that 30 %of BBA students are internationalstudents.Suppose that each of the 3 BIZ1007 tutors randomly selects one
of his students to participate in a survey.
Let X = number of international students chosen
X P(X)
0
1
2
3
Probability Distribution of X
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
15/75
A histogramis a display of probabilities as a bar chart
Example 1:
X = number of international students chosen
0.00
0.10
0.20
0.30
0.40
0.50
0 1 2 3
Discrete Probability Distribution
A histogramis a display of probabilities as a bar chart
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
16/75
Example 2:
Let Xbe the random variable that denotes the number of ordersfor Boeing 767 aircraft for next year.
Suppose that the number of orders for Boeing 767 aircraft fornext year is estimated to obey the following distribution:
Orders for Boeing 767Aircraft next year
xi
Probability
pi
42
43
44
45
46
47
48
0.05
0.10
0.15
0.20
0.25
0.15
0.10
Discrete Probability Distribution
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
17/75
Probability Distribution of the
Number of Orders of Boeing 767 Aircraft Next Year
0.00
0.05
0.10
0.15
0.20
0.25
0.30
0.35
43 44 45 46 47 48
Number of Orders
Probability
Page 9
Discrete Probability Distribution
A histogramis a display of probabilities as a bar chart
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
18/75
EasternDivision
Xand Ydenote the sales next year in the easterndivision and
the westerndivision of a company, respectively.
0.00
0.05
0.10
0.15
0.20
0.25
0.30
0.35
0.40
3.0 4.0 5.0 6.0 7.0 8.0
Probability
Sales ($ million)
Probability Distribution Function of WesternDivision Sales
0.00
0.05
0.10
0.15
0.20
0.25
0.30
0.35
0.40
3.0 4.0 5.0 6.0 7.0 8.0
Probab
ility
Sales ($ million)
Probability Distribution Function of EasternDivision Sales
Sales($ million) Probability
3.0 0.15
4.0 0.20
5.0 0.25
6.0 0.15
7.0 0.15
8.0 0.10
Sales($ million) Probability
3.0 0.05
4.0 0.20
5.0 0.35
6.0 0.30
7.0 0.10
8.0 0.00
Discrete Probability Distribution
WesternDivision
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
19/75
Discrete Probability Distribution
EasternDivision
0.00
0.05
0.10
0.15
0.20
0.25
0.30
0.35
0.40
3.0 4.0 5.0 6.0 7.0 8.0
Probability
Sales ($ million)
Probability Distribution Function of WesternDivision Sales
0.00
0.05
0.10
0.15
0.20
0.25
0.30
0.35
0.40
3.0 4.0 5.0 6.0 7.0 8.0
Probability
Sales ($ million)
Probability Distribution Function of EasternDivision Sales
Sales($ million) Probability
3.0 0.15
4.0 0.20
5.0 0.25
6.0 0.15
7.0 0.15
8.0 0.10
Sales($ million) Probability
3.0 0.05
4.0 0.20
5.0 0.35
6.0 0.30
7.0 0.10
8.0 0.00
WesternDivision
Which division is going to perform better?
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
20/75
(Y = y)
0.00
0.10
0.20
0.30
0.40
0.50
0 1 2 3 4 5 6
x
(X =x)
0.00
0.10
0.20
0.30
0.40
0.50
0 1 2 3 4 5 6
Consider two r.v.s X, Y, with the following histograms:
Random variable X Random variable Y
Q: How to describe and compare Xand Y ?
Discrete Probability Distribution
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
21/75
Summary statistics are used to summarize a set ofobservations, in order to communicate the largest amount assimply as possible.
Statisticians commonly try to describe the observations in
a measure of location, or central tendency, such as the mean,median, modeetc
a measure of statistical dispersionlike the standard deviation,variance, rangeetc
a measure of the shapeof the distribution like skewnessorkurtosis
Summary Measures of Probability Distributions
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
22/75
The mean (or expected value) of Xis
= =
=1
Summary Measures of Probability Distributions
Suppose the discrete r.v.Xhas probability distribution
x1, x2, . . . , xn
p1, p2, . . . , pn
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
23/75
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
24/75
Example:
LetX
be the number that comes up on a roll of a die.Compute the mean,varianceand standard deviationofX.
Outcome P(X=x)
1 1/6
2 1/63 1/6
4 1/6
5 1/6
6 1/6
Summary Measures of Probability Distributions
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
25/75
Example :
Let
s say that 30 %of BBA students are internationalstudents.Suppose that each of the 3 BIZ1007 tutors randomly selects oneof his students to participate in a survey.
Let X = number of international students chosen
Compute the mean,varianceand standard deviationof X.
X P(X)
0
1
2
3
= =
=1
Summary Measures of Probability Distributions
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
26/75
Example :
Let
s say that 30 %of BBA students are internationalstudents.Suppose that each of the 3 BIZ1007 tutors randomly selects oneof his students to participate in a survey.
Let X = number of international students chosen
Compute the mean,varianceand standard deviationof X.
X P(X)
0
1
2
3
= =
= 2 = 2
=1
=
Summary Measures of Probability Distributions
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
27/75
EasternDivision
Xand Ydenote the sales next year in the easterndivision and
the westerndivision of a company, respectively.
0.00
0.05
0.10
0.15
0.20
0.25
0.30
0.35
0.40
3.0 4.0 5.0 6.0 7.0 8.0
Probability
Sales ($ million)
Probability Distribution Function of WesternDivision Sales
0.00
0.05
0.10
0.15
0.20
0.25
0.30
0.35
0.40
3.0 4.0 5.0 6.0 7.0 8.0
Probab
ility
Sales ($ million)
Probability Distribution Function of EasternDivision Sales
Sales($ million) Probability
3.0 0.15
4.0 0.20
5.0 0.25
6.0 0.15
7.0 0.15
8.0 0.10
Sales($ million) Probability
3.0 0.05
4.0 0.20
5.0 0.35
6.0 0.30
7.0 0.10
8.0 0.00
WesternDivision
Summary Measures of Probability Distributions
Compute the mean,varianceand standard deviationof
X (eastern division sales) and Y(western division sales)
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
28/75
X (Eastern Division) Y (Western Division)
Sales ($m) Probability Sales ($m) Probability
3.0 0.05 3.0 0.15
4.0 0.20 4.0 0.20
5.0 0.35 5.0 0.25
6.0 0.30 6.0 0.15
7.0 0.10 7.0 0.15
8.0 0.00 8.0 0.10
Mean 5.20 5.25
Variance 1.06 2.3875
Std Dev 1.0296 1.5452
Summary Measures of Probability Distributions
Compute the mean,varianceand standard deviationof
X (eastern division sales) and Y(western division sales)
Use Excel
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
29/75
Let X= number of pieces of chicken in an order.
Develop a probability distribution for X.
pieces in order orders2 170
3 200
4 260
8 165
12 120
16 5020 35
1,000
Summary Measures of Probability Distributions
xi Probability
2 0.170
3 0.200
4 0.260
8 0.165
12 0.120
16 0.050
20 0.035
Where do probability distributions come from?
I. Empirically(from data)
Example: KFC sells chicken in bucketsof 2, 3, 4, 8, 12, 16 or 20 pieces.Over the last week, orders for fried chicken had the following data:
l b
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
30/75
Consider experiment consisting of nindependenttrials
Each trial has exactly two outcomes : successor failure
Binomial Distribution
We say thatXis a binomialr.v. drawn from a sample sizen
and with probability of successp.
Where do probability distributions come from?
II.Theoretically
The Binomial Distribution
Each trial has same probability: successp, failure 1p
Let
X = number of successes in ntrials.
l b
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
31/75
We also say thatXobeys a binomial distribution with
parameters nandp: Binomial(n,p) or B(n,p)
Binomial Distribution
Binomial Distribution
= = !!! (1 ) for = 0, 1, . . . ,
Consider experiment consisting of nindependent trials
Each trial has exactly two outcomes : successor failureEach trial has sameprobability: successp, failure 1p
Let
X = number of successes in ntrials.
Bi i l Di ib i
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
32/75
Binomial Distribution
IfXobeys a binomial distribution with parameters nand
p, then the mean, variance and standard deviation ofX
are:
Mean = =
Variance = 2
= (1 )Std deviation = (1 )
Expected Value and Variance
Bi i l Di ib i
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
33/75
Example :Lets say that 30 %of BBA students are internationalstudents.
Suppose that each of the 3 BIZ1007 tutors randomly selects oneof his students to participate in a survey.
Let X = number of international students chosen
Outcome X
L L L 0
L L I 1
L I L 1
I L L 1L I I 2
I L I 2
I I L 2
I I I 3
Note :Xis a binomial variable!
with :
n = 3 trials
Successselect international student
p= P(success) = 0.30
Recall Example
Binomial Distribution
Bi i l Di ib i
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
34/75
Example :Lets say that 30 %of BBA students are internationalstudents.
Suppose that each of the 3 BIZ1007 tutors randomly selects oneof his students to participate in a survey.
Let X = number of international students chosen
Xobeys a binomial distribution with parameters n= 3
and p = 0.3: Binomial(3,0.3)
The probability distribution ofXis given by:
= = ! !! (.) (.) for = 0, 1, . . . , 3
Binomial Distribution
Bi i l Di ib i
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
35/75
Xobeys binomial distribution with n = 3 and p = 0.3
The probability distribution of Xis given by:
= = ! !! (.) (.) for = 0, 1, . . . , 3
= 0 = !0!0! (.)0(.)0 = (.) = = 1 = !
1!1! (.)1(.)1 = (.)(.) =
Compare above with
probability distribution
we obtained earlier
Binomial Distribution
Bi i l Di t ib ti
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
36/75
Example :Lets say that 30 %of BBA students are internationalstudents.Suppose that each of the 3 BIZ1007 tutors randomly selects oneof his students to participate in a survey.
Let X = number of international students chosen
Compute the mean,varianceand standard deviationof X.
Mean = = = 30.3 = .
Variance = 2 = 1 = 30.30.7 = .
Xobeys a binomial distribution with n= 3 and p = 0.3
Binomial Distribution
Bi i l Di t ib ti
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
37/75
=
=
!!!
(1
) for x= 0, 1, . . . , n
Binomial Distribution
EXCEL Function : BINOMDIST (x, n , p , cumulative)
cumulative = 0 ( or FALSE) P( X= x )
1 ( or TRUE) P ( X x )
Bi i l Di t ib ti
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
38/75
P (X= 15) = BINOMDIST (15, 15, 0.75, 0)
P (X14) = 1 P(X13)
= 1 BINOMDIST (13, 15, 0.75, 1)
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
Binomial Distribution
EXCEL Function : BINOMDIST (x, n , p , cumulative)
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
39/75
Case 1 - Application of Binomial
Distribution
An investment broker at the Michaels &
Dodson Company claims that he has
found a real winner out of 400 funds. He has tracked a mutual fund that has
beaten a standard market index in 37 out
of the past 52 weeks. Will you invest in the winnerfund?
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
40/75
Question 1
We say a fund beats the market purely by
chance if each week the fund has a fifty-
fifty chance of beating the market index,
independently of its performance in otherweeks.
What is the probability for such fund to
beat the market 37 out of 52 weeks?
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
41/75
Question 2
Suppose that all the 400 funds beat
market purely by chance. What is the
probability that the best of them beats the
market 37 out of 52 weeks?
Conclusion?
Poisson Distribution
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
42/75
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
Poisson Distribution
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
43/75
Poisson Distribution
was derived by the
French Mathematician
Simon Poisson in1837.
His name is one of the
72 names inscribed onthe Eiffel Tower.
Poisson Distribution
Poisson Distribution
http://en.wikipedia.org/wiki/File:Simeon_Poisson.jpg -
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
44/75
Examples and Applications:
The number of soldiers killed by horse-kicks
each year in each corps in the Prussian
cavalry.
The number of phone calls arriving at a callcentre per minute.
The number of goals in sports involving two
competing teams.
The number of infant death per year.
Poisson Distribution
Poisson Distribution
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
45/75
= = ! for = 0, 1, 2, . . .
= 0 =0
0! =
= 1 = 11!
=
Poisson Distribution
Xis a discrete r.v. that takes on values 0, 1, 2, . . .
Note:
A random variable X is said to be a Poissonr.v. with parameter
(> 0) if it has the probability function
Poisson Distribution
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
46/75
Poisson Distribution
= = ! for = 0, 1, 2, . . .
It can be shown that
Mean E(X) =
Variance Var(X) =
Thus, parameter
can be interpreted as
the average number
of occurrences perunit time or space
A random variable X is said to be a Poissonr.v. with parameter
(> 0) if it has the probability function
Poisson Distribution
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
47/75
= = ! for = 0, 1, 2, . . .
Poisson Distribution
X is said to be a Poissonr.v. with parameter (> 0) if
ExamplePatients 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 minuteson a weekend evening?
Can expect patient arrivals to be approximately Poisson.
Average arrival rate is 6 / hour.
Let X be the number of patient arrivals in 30 minutes
X is Poissonwith parameter = 3
Poisson Distribution
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
48/75
Poisson Distribution
Excel Function : POISSON (x, , cumulative)
=
=
! for
= 0, 1, 2, . . .
cumulative = 0 ( or FALSE) P( X= x )
1 ( or TRUE) P ( X x )
Poisson Distribution
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
49/75
Poisson Distribution
P (X= 4) = POISSON (4, 3, 0)
Example Summary :
Let X be the number of patient arrivals in 30 minutes
X is Poisson with parameter = 3
P(X = 4) = 0.1680
Excel Function : POISSON (x, , cumulative)
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
50/75
Managing TV Inventory
Kriegland is a department store that sells
various brands of flat-screen TVs. One of
the managers biggest problems is to
decide on an appropriate inventory policyfor stocking TVs.
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
51/75
Discussion 1
Why is it important to decide a right
inventory level?
What are the factors to consider when
deciding the inventory level?
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
52/75
Discussion 2
The manager knows that the historical
average demand per month is
approximately 17.
If the manager attempts to find the
probability distribution of demand in a
typical month. How might he proceed?
Linear Functions of a Random Variable
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
53/75
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
Daily Demand Probability
60 0.05
64 0.15
68 0.20
72 0.25
75 0.15
77 0.10
80 0.10
Let X = daily demand for croissants
We can easily compute
E(X) = 71.15
Var(X) = 29.5275
Linear Functions of a Random Variable
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
54/75
Example
E(Y) = 0.75 E(X) + 135
Var(Y) = 0.752 Var(X)
Linear Functions of a Random Variable
E(X) = 71.15
Var(X) = 29.5275
X Probability Y= .75X+ 135
60 0.05 180.00
64 0.15 183.00
68 0.20 186.00
72 0.25 189.00
75 0.15 191.25
77 0.10 192.75
80 0.10 195.00
Y = 0.75 X + 135
E(Y) = ?
Var(Y) = ?
How are the means and variances related ?
Linear Functions of a Random Variable
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
55/75
If Y = aX + b
E(Y) = aE(X) + b
Var(Y) = a2 Var(X)
Linear Functions of a Random Variable
Note:
Formulas apply
to continuousr.v.s as well
Covariance and Correlation
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
56/75
Covariance and Correlation
How do we summarize the relationship between two variables?
Specifically : how do we summarize what we observe in a scatter
plot?
Examples:
Unemployment rate vs Crime rate
Stock market vs Property market
Time spent on DSC1007 vs DSC1007 Exam marks
Covariance and Correlation
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
57/75
Example: Chain of upscale cafs sells gourmet hotcoffees and coldbeverages.From past sales data, daily sales at one of their caf obey the followingprobability distribution for (X, Y),
X = # hotcoffees, Y = # coldbeverages sold per day
Q : How do we describe the relationship between two rvs?
Covariance and Correlation
Probability No. ofHotCoffees Sold No. of ColdDrinks Soldpi 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 X = 457.00 Y = 210.00
Standard Deviation 244.28 145.64
Covariance and Correlation
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
58/75
Comment : It seems that smallersales of hotcoffees are
often accompanied by largersales of cold
beverages.
0
100
200
300
400
500
0 200 400 600 800 1000
ColdBeverage
Sales
Hot Coffee Sales
Scatter Plot of Daily Sales forHot Coffees and Cold Beverages
Covariance and Correlation
Covariance and Correlation
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
59/75
0
100
200
300
400
500
0 200 400 600 800 1000
ColdBeverage
Sales
Hot Coffee Sales
Scatter Plot of Daily Sales forHot Coffees and Cold Beverages
Comment : Hotcoffee sales greater than the average number
sold per day are typically accompanied by coldbeverage sales
that are smaller than the average sold per day.
Covariance and Correlation
Covariance and Correlation
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
60/75
Covariance, = = = , =
Covariance and Correlation
We now define the covarianceof two random variablesXand
Ywith means X
and Y:
Probability X Y
P(X=x1, Y=y1 ) x1 y1
P(X= x2, Y=y2 ) x2 y2
P(X= xN, Y=yN ) xN yN
Covariance and Correlation
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
61/75
Covariance
Observe from the above that:
(,) = 2 =
Covariance and Correlation
, = = = , =
, = ()=
Covariance and Correlation
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
62/75
X = # hotcoffees, Y = # coldbeverages sold per day
Covariance and Correlation
Probability No. ofHotCoffees Sold No. of ColdDrinks 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 X = 457.00 Y = 210.00
Standard Deviation 244.28 145.64
Covariance and Correlation
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
63/75
X = # hotcoffees, Y = # coldbeverages sold per day
Covariance and Correlation
Cov(X,Y) = 0.10 (360457)(360210) + 0.10 (790457)(110210)
+ . . . + 0.05 (510
457)(290
210) = 27,260
Probability No. ofHotCoffees Sold No. of ColdDrinks Sold
pi xi yi
0.10 360 457 360 210
0.10 790 457 110 210
0.15 840 457 30 210
0.05 260 457 90 210
0.15 190 457 450 210
0.10 300 457 230 210
0.10 490 457 60 210
0.10 150 457 290 210
0.10 550 457 140 210
0.05 510 457 290 210
Mean X = 457.00 Y = 210.00
Standard Deviation 244.28 145.64
Covariance and Correlation
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
64/75
Correlation
Comments :
The measure of correlation is unit-free.
Corr (X, Y) is always between 1.0 and 1.0
, =(,)
Covariance and Correlation
We introduce a standardized measure of interdependencebetween two rvs :
Covariance
, = = = , =
Covariance and Correlation
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
65/75
Correlation , = (,)
Covariance and Correlation
Corr(X
,Y
) = 1.0= 0
= 1.0
perfect positive linear relationship
no linear relationship between Xand Y
perfect negative linear relationship
Covariance and Correlation
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
66/75
If higherthan average values ofXare apt to occur with higherthan average values of Y, then Cov(X, Y) > 0 and Corr(X, Y) > 0.
X and Yarepositivelycorrelated.
Covariance and Correlation
If higherthan average values ofXare apt to occur with lowerthan average values of Y, then Cov(X, Y) < 0 and Corr(X, Y) < 0.
X and Yare negatively correlated.
Covariance and Correlation
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
67/75
Common fallacy
Aoccurs in correlation with B
Therefore : Acauses B
Correlation is notthe same as Causality!
Joint Probability Distributions
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
68/75
J y
Consider two random variablesXand Y that assume values given by
Probability X Y
p1 P(X=x1, Y=y1 ) x1 y1
p2 P(X= x2, Y=y2 ) x2 y2
pN P(X= xN, Y=yN ) xN yN
Denote by f(xi,yi)
f is called the joint probability distribution function of (X,Y)
Joint Probability Distributions
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
69/75
J y
Two random variablesXand Y are said to be independentif
P(X=x,Y=y) = P(X=x) P(Y=y)
Thus, ifXand Y are independent, then
E(XY) = E(X)E(Y)
Roughly : Xand Yare independent if knowing the value of one
does not change the distribution of the other.
The concept of independenteventsleads quite naturally to a similar
definition for independentrandom variables.
It follows that ifXand Y are independent, then
Cov(X,Y) = 0 ( or Corr(X,Y)= 0 )
Covariance and Correlation
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
70/75
But : dependentrandom variables may also beuncorrelated!!
Example : Consider r.v.s Xand Ywith the following joint probability distribution
We know : independentrandom variables are always uncorrelated.
P(X ,Y) X Y
1/3 1 11/3 0 1
1/3 1 1
Check : are XandY independent?
Check : are XandY uncorrelated?
Sum of Random Variables
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
71/75
Mean
E( a X + b Y) = aE( X ) + bE( Y)
Variance
Var(aX+ bY) = a2Var(X) + b2Var(Y) + 2abCov(X,Y)
or:
Var(aX+ bY) = a2Var(X) + b2Var(Y) + 2abXY Corr(X,Y)
Note: Formulas apply to continuousr.v.s as well
Sum of Random Variables
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
72/75
If X and Yare independent
Cov(X,Y)= 0
Variance
Var(aX+ bY) = a2Var(X) + b2Var(Y) + 2abCov(X,Y)
Sum of Random Variables
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
73/75
Example: Chain of upscale cafs sells gourmet hotcoffees and coldbeverages.
From past sales data, daily sales at one of their caf obey the following
probability distribution for (X, Y),X = # hotcoffees, Y = # coldbeverages sold per day
Probability No. ofHotCoffees Sold No. of ColdDrinks Sold
pi xi yi
0.10 360 360
0.10 790 1100.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 X = 457.00 Y = 210.00
Standard Deviation 244.28 145.64
Suppose : coldbeverages (Y) are $2.50/glass;
hotcoffees (X) $1.50/cup.
Sum of Random Variables
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
74/75
coldbeverages (Y) are $2.50/glass;
hotcoffees (X) $1.50/cup.
mean and standard deviation of total daily sales of allbeverages
mean and standard deviation of daily sales of coldbeverages
mean and standard deviation of daily sales of hotcoffees
E(2.5Y) = ? SD(2.5Y) = ?
E(1.5X) = ? SD(1.5X) = ?
E(1.5X+ 2.5Y) = ? SD(1.5X+ 2.5Y) = ?
Determine the following:
2.5 E(Y) 2.5 SD(Y) = 2.5Var (Y)
1.5 E(X) 1.5 SD(X) = 1.5Var(X)
E(X) = 457, Var(X) = 59,671
E(Y) = 210, Var (Y) = 21,210
Cov (X,Y) = 27,260
Sum of Random Variables
-
8/10/2019 Discrete Probabilities4-Discrete Probabilities - Student
75/75
mean and standard deviation of total daily sales of allbeverages
mean and standard deviation of daily sales of coldbeverages
mean and standard deviation of daily sales of hotcoffees
E(2.5Y) = ? SD(2.5Y) = ?
E(1.5X) = ? SD(1.5X) = ?
E(1.5X+ 2.5Y) = ? SD(1.5X+ 2.5Y) = ?
Determine the following:
2.5 E(Y)
1.5 E(X)
Var (1.5X+ 2.5Y)
E(X) = 457, Var(X) = 59,671
E(Y) = 210, Var (Y) = 21,210
Cov (X,Y) = 27,260
2.5 SD(Y) = 2.5Var (Y)
1.5 SD(X) = 1.5Var(X)
coldbeverages (Y) are $2.50/glass;
hotcoffees (X) $1.50/cup.