Probability Lecture I
US
MAPresidential
Presidential Election
Election 2012
2016
Suppose that 30% of registered voters in Cambridge
favor Donald Trump over Hillary Clinton
Pick 10 registered voters
“at random.”
• How many of the 10 voters would you expect to favor Trump?
• What is the probability that 4 voters would favor Trump?
• What is the probability that 2 voters would favor Trump?
• What is the probability that all 10 voters would favor Trump?
© MIT Sloan
3
Probability Lecture 1
• Random variable (discrete, continuous)
• Probability distribution
• Histogram (pictorial representation)
• Mean, Variance, Standard Deviation, Coefficient
of Variation
• Binomial distribution
© MIT Sloan
4
1
Probability Lecture I
Random variable
A random variable is a rule that assigns a numerical value
to each possible outcome of a probabilistic experiment.
We denote a random variable by a capital letter (such as X).
Examples of random variables:
Examples of things that are not random variables:
© MIT Sloan
5
R.V.: Discrete or Continuous
A discrete random variables can take only distinct
values.
Examples of discrete random variables:
A continuous random variables can take any value
in some interval.
Examples of continuous random variables:
© MIT Sloan
6
2
Probability Lecture I
Probability distribution
A probability distribution for a discrete random variable X consists of
possible values
x1, x2, . . . , xn
corresponding probabilities
p1, p2, . . . , pn
with the interpretation that
P(X = x1) = p1, P(X = x2) = p2, . . . , P(X = xn) = pn
Note:
(1)
Random variable is denoted by X
(2)
Possible values denoted by x1, x2, . . . .
(3)
Probabilities must sum to 1.0 : p1 + p2 + . . . + pn = 1.0
pi 0
© MIT Sloan
7
Let X denote the number that comes up on a roll of a die.
Outcome X
Probability
1
2
3
4
5
6
© MIT Sloan
8
3
Probability Lecture I
Let X denote the number that comes up on a roll of die.
Outcome X
Probability
1
1/6
2
1/6
3
1/6
4
1/6
5
1/6
6
1/6
© MIT Sloan
9
Let X denote the number that comes up on a roll of die.
Outcome X
Probability
1
1/6
P(X=1) = 1/6
2
1/6
P(X=2) = 1/6
3
1/6
P(X=3) = 1/6
4
1/6
P(X=4) = 1/6
5
1/6
P(X=5) = 1/6
6
1/6
P(X=6) = 1/6
© MIT Sloan
10
4
Probability Lecture I
X and Y denote the sales next year in the eastern division and the
western division of a company. They obey the following distributions:
Probability Distribution Function of Eastern
Division Sales
Eastern Division (X)
Sales
($ million)
Probability
0.35
3.0
0.05
0.30
4.0
0.20
5.0
0.35
6.0
0.30
7.0
0.10
8.0
0.00
Probability
0.40
0.25
0.20
0.15
0.10
0.05
0.00
3.0
4.0
5.0
6.0
7.0
8.0
Sales ($ million)
Western Division (Y)
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
0.40
0.35
Probability
Sales
($ million)
Probability Distribution Function of Western
Division Sales
0.30
0.25
0.20
0.15
0.10
0.05
0.00
3.0
4.0
5.0
6.0
7.0
8.0
Sales ($ million)
© MIT Sloan
12
Summary Statistics
n
n
i 1
i 1
E(X) μX P(X x i )xi pi x i
• Mean or Expected Value:
Represents “average” outcome; a measure of “central tendency”
n
n
i 1
i 1
2
• Variance: VAR(X) σ X P(X x i )(x i μX )2 pi (x i μX )2 E[(X μX ) 2 ]
Squared deviation around the mean; a measure of “spread”
• Standard Deviation:
SD(X) σ X σ X
2
Measured in the same units as the random variable X
• Coefficient of variation:
CV(X) σ X /μ X
Unit free
© MIT Sloan
13
5
Probability Lecture I
X and Y denote the sales next year in the eastern division and the
western division of a company. They obey the following distributions:
Probability Distribution Function of Eastern
Division Sales
Eastern Division (X)
Sales
($ million)
Probability
0.35
3.0
0.05
0.30
4.0
0.20
5.0
0.35
6.0
0.30
7.0
0.10
8.0
0.00
Probability
0.40
X = $5.2M
X = $1.029M
CVX = 0.198
0.25
0.20
0.15
0.10
0.05
0.00
3.0
4.0
5.0
6.0
7.0
8.0
Sales ($ million)
Western Division (Y)
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
0.40
0.35
Probability
Sales
($ million)
Probability Distribution Function of Western
Division Sales
0.30
Y = $5.25M
Y = $1.545M
CVY = 0.294
0.25
0.20
0.15
0.10
0.05
0.00
3.0
4.0
5.0
6.0
7.0
8.0
Sales ($ million)
© MIT Sloan
14
Question: Where do probability distributions come from?
Answer #1: Many probability distributions are empirically defined.
Example:
The Kentucky Fried Chicken “restaurant” in Boston sells chicken in
“buckets” of 2, 3, 4, 8, 12, 16 or 20 pieces. Over the last week,
orders for fried chicken had the following data:
Pieces
in Order
Number of Orders
Pieces
in Order
Probability
2
170
2
0.170
3
200
3
0.200
4
260
4
0.260
8
165
8
0.165
12
120
12
0.120
16
50
16
0.050
20
35
20
0.035
Total
1,000
Total
1.000
Let X = number of pieces of chicken in an order.
How might we develop a probability distribution for X?
© MIT Sloan
15
6
Probability Lecture I
Question: Where do probability distributions come from?
Answer #2: Many probability distributions are theoretically defined and arise
from naturally occurring phenomena.
30% of registered voters in Cambridge favor
Donald Trump over Hillary Clinton
Pick 10 voters at random
Let X = number of voters favoring Trump
What is P(X = 4) ?
Of 10 randomly chosen voters, what is the
probability that the first 4 will favor Trump
and the next 6 favor Clinton?
© MIT Sloan
16
Sidebar: Counting Groups
• k! = 1 * 2 * … * k and 0! = 1 (“!” means factorial)
• Suppose n = 10 students are seated in the front
row. How many different ways can one pick a
group of x = 4 students from the front row?
10!
210
4!(10 4)!
More generally the answer is:
n!
x!(n x)!
© MIT Sloan
17
7
Probability Lecture I
The probability of having x Trump voters out of n is
P(X=x)=
n!
px (1-p)n-x
x!(n x)!
where x! = 1*2* . . . * x, and 0! = 1
Counts the number of ways of
choosing group of x out of n
(e.g. group of 4 out of 10)
Example: n = 10 , p = 0.3, x=4
10!
P(X=4) =
* 0.34 * 0.76 = 0.2001
4!*6!
210
Probability that 4 voters out of the 10 favors Trump
© MIT Sloan
18
The Binomial Distribution
• The experiment consists of n “trials”
• Each trial results in either “success” or “failure”
• Trials are independent of each other
• Each trial has same probability of success p (and of failure 1-p )
If the random variable X represents the number of successes
in n trials, then it obeys a binomial distribution with parameters
n and p
We write: X ~ Binomial(n,p)
© MIT Sloan
19
8
Probability Lecture I
The Binomial Distribution
Example: 30% favor Trump, and 70% favor Clinton
X = number of registered Cambridge voters favoring Trump
• n = 10 trials
• favoring Trump is a “success”
favoring Clinton is a “failure”
• P(success) = p = 0.30;
X obeys a Binomial distribution
with n = 10 and p = 0.30
P(failure) = 1-p = 0.70
X ~ Binomial (10, 0.30)
© MIT Sloan
20
Example:
A laser production facility is known to have a 75% yield; that is, 75% of the
lasers manufactured by the facility pass the quality test. Suppose that
today the facility is scheduled to produce 15 lasers.
a)
What is the probability that 13 lasers will pass the quality test?
X~Binomial(15, 0.75)
P(X=13) =
15!/(13!*2!) * 0.7513 * 0.252 = 0.1559
© MIT Sloan
21
9
Probability Lecture I
Example, continued:
A laser production facility is known to have a 75% yield; that is, 75% of the
lasers manufactured by the facility pass the quality test. Suppose that
today the facility is scheduled to produce 15 lasers.
b)
What is the probability that at least 14 lasers will pass the quality
test?
P(X 14)
= P(X=14) + P(X=15)
= 15!/(14!*1!) * 0.7514 * 0.251 + 15!/(15!*0!) * 0.7515 * 0.250
= 0.06682 + 0.01336 = 0.08018
© MIT Sloan
22
Example continued:
A laser production facility is known to have a 75% yield; that is, 75% of the
lasers manufactured by the facility pass the quality test. Suppose that
today the facility is scheduled to produce 15 lasers.
c)
What is the probability that 11 lasers will pass the quality test?
X~Binomial(15, 0.75)
P(X=11) =
15!/(11!*4!) * 0.7511 * 0.254 = 0.2252
© MIT Sloan
23
10
Probability Lecture I
30% of Cambridge voters favor
Donald Trump over Hillary Clinton
We pick 10 voters at random, then
How many would you expect to favor Trump?
E(X) = n * p = 10 * 0.3 = 3
Probability that 4 will favor Trump?
P(X=4) = 210 * (0.3)4 * (0.7)6 * ~ 0.2
Probability that 2 will favor Trump?
P(X=2) = 45 * (0.3) 2 * (0.7) 8 ~ 0.23
Probability that all will favor Trump?
P(X=10) = (0.3)10 ~ 0.000006
Probability that at least 5 will favor Trump?
P(X 5) = 1 - P( X< 5) = 1 - P(X=0) - P(X=1) - P(X=2) - P(X=3) - P(X=4)
= 1 - 0.028 - 0.121 - 0.23 - 0.267 - 0.2 = 0.154
© MIT Sloan
24
Binomial summary measures
Let X be Binomial(n, p)
In our example:
n=10 , p=0.3
E(X) = np
= 10 * 0.3 = 3.0
VAR(X) = np(1 p )
= 10 * 0.3 * 0.7 = 2.1
SD(X) = np (1 p)
= 1.45
© MIT Sloan
25
11
Probability Lecture I
Wrap-up
• Concept of random variable, probability
distribution
• Histogram (pictorial representation)
• Summary measures (mean, Variance, SD, CV)
• Binomial distribution
© MIT Sloan
26
12