Probability and Statistics
Probability and Statistics
Daniel Halbheer
[email protected]
Session Outline
This session illustrates how probability and
statistics can be used in business settings:
• Predicting outcomes under uncertainty
about the business environment.
• Learning about the business environment
from sample data.
• Making optimal data-driven decisions.
2
Setting the Stage
Monty Hall problem: Suppose you are on a game show, and you
are given the choice among three doors: Behind one door is a
car; behind the others, goats. You pick a door, say No. 1, and the
host, who knows what's behind the doors, opens another door,
say No. 3, which has a goat. He then says to you, “Do you want to
pick door No. 2?” Is it to your advantage to change your choice?
Source: Wikipedia, link: https://bit.ly/2mXP6vz
3
Levels of Uncertainty
5
What is meant by the probability
of an event? How is it computed?
Sample Spaces and Events
Definition: A sample space 𝑆 is the space of
all possible outcomes for an experiment. The
elements 𝑠𝑖 of 𝑆 are called sample points. The
number of sample points is denoted by #(𝑆).
8
Venn Diagrams
𝑆
𝐸 𝑇𝐻𝐻
𝐹
𝑇𝑇𝐻
𝐻𝐻𝐻
𝑇𝐻𝑇 𝐻𝑇𝑇
𝐻𝐻𝑇
𝐻𝑇𝐻
𝑇𝑇𝑇
10
Empirical Probability
11
Probability Rules
1. For any event 𝐸, 0 ≤ 𝑃(𝐸) ≤ 1.
2. For the set of all outomes 𝑆, 𝑃 𝑆 = 1.
3. If 𝐸 and 𝐹 are events,
𝑃 𝐸∪𝐹 =𝑃 𝐸 +𝑃 𝐹 −𝑃 𝐸∩𝐹 .
4. For any event 𝐸, 𝑃 𝐸 𝑐 = 1 − 𝑃 𝐸 .
Note: 𝐸 𝑐 is the complement of 𝐸—the set of
sample points in 𝑆 that are not in 𝐸.
12
Conditional Probability
Definition: The conditional probability of
an event 𝐸 given that event 𝐹 has occurred
is given by
𝑃 𝐸∩𝐹
𝑃 𝐸|𝐹 = .
𝑃 𝐹
13
Defective Computer Chips
A firm uses one computer chip to build one
unit of a product. The chips are purchased
from suppliers 𝐴, 𝐵, and 𝐶 and are randomly
picked for assembling a unit. 20% come from
𝐴, 30% come from 𝐵, and the remainder
come from 𝐶. The breakdown probabilities
are 0.03, 0.04, and 0.01, respectively. If a
product is chosen at random, what is the
probability that the chip in it is defective?
14
Bayes’ Rule
The conditional probability of an event 𝐸
given that event 𝐹 has occurred can be
expressed as
𝑃 𝐹|𝐸 𝑃(𝐸)
𝑃 𝐸|𝐹 = 𝑐 𝑐
.
𝑃 𝐹|𝐸 𝑃 𝐸 + 𝑃 𝐹|𝐸 𝑃(𝐸 )
15
Bayes’ Rule in AI
Read more on the application of Bayes’ rule in “An executive’s guide to AI” published by
McKinsey. Link: https://bit.ly/3AUQs4F.
16
Deriving Bayes’ Rule
𝑆 Recall: The conditional
𝐸 probability of 𝐸 given
𝐹
that 𝐹 has occurred is
𝐸∩𝐹
𝐸𝑐 ∩ 𝐹 given by
𝑃 𝐸∩𝐹
𝑃 𝐸|𝐹 = .
𝑃 𝐹
19
Monty Hall Revisited
Suppose you pick door No. 1 and Monty
shows you a goat behind door No. 3.
Define the events 𝐴 = {Car behind door 2}
and 𝐵 = Monty opens door 3 . Then,
1
𝑃 𝐵|𝐴 𝑃(𝐴) 1∗ 2
𝑃 𝐴|𝐵 = = 3 = .
𝑃 𝐵 1 1 1 2 3
1∗ + ∗ +0
3 2 2 3
𝑃(𝐵|𝐴𝑐 ) 𝑃(𝐴𝑐 )
20
What is a random variable? What
is a distribution function?
Random Variables
If a coin is tossed three times, the number of
heads that occur is captured by the events
0 1 2 3.
Let 𝑋 represent the number of heads and let
𝑋 = 𝑥 be a realization, where 𝑥 = 0,1,2,3.
Note: The realization of 𝑋 is determined by
chance—thus making it a random variable.
22
Expected Value
Let 𝑋 be a discrete random variable whose
number of possible values is 𝑥1 , … , 𝑥𝑁 .
Definition: The expectation of 𝑋 is
𝑁
𝜇 = 𝐸 𝑋 = 𝑥𝑖 𝑃(𝑋 = 𝑥𝑖 ) ,
𝑖=1
σ2 = Var 𝑋 = 𝑥𝑖 − 𝐸(𝑋) 2 𝑃 𝑋 = 𝑥𝑖 .
𝑖=1
24
Bernoulli Distribution
Definition: A random variable 𝑋 has a
Bernoulli distribution with parameter
𝑝 ∈ [0,1] if
𝑃 𝑋 =1 =𝑝 =1−𝑃 𝑋 =0 .
Note: A Bernoulli distributed 𝑋 is the
indicator function of the event 𝑋 = 1 .
Exercise: Calculate 𝐸 𝑋 and Var 𝑋 .
25
Coin Tossing
Experiment: A coin is tossed three times. Let
𝑋 be the number of heads that occur.
28
Mean and Variance
Definition: Let 𝑋 be a continuous random
variable. The expectation of 𝑋 is
∞
𝜇 = 𝐸 𝑋 = න 𝑥𝑓 𝑥 𝑑𝑥
−∞
29
Uniform Distribution
31
Normal Distribution
33
The CDF of 2
𝑁(𝜇, 𝜎 )
The CDF of the normal distribution must be
computed numerically.
Excel: NORM.DIST function
34
NORM.DIST Function
Exercise: Verify that the probabilities in the
table below are correct.
35
Some Facts
36
Why is the normal distribution so
popular? Who uses it?
The Hype about 2
𝑁(𝜇, 𝜎 )
The normal distribution is perhaps the most
important of all probability distributions.
Business applications: Quality control, risk
management, stock market returns, employee
performance, measurement error…
Statistics: Sample means tend to be normally
distributed—no matter what the distribution
of the original population is.
38
Central Limit Theorem
σ𝑖(𝑥𝑖 − 𝑥)ҧ 2
𝑠= .
𝑛−1
In Excel: AVERAGE and STDEV, respectively.
42
Optimal Decisions
Use the data set “stockouts.xlsx” to estimate
the demand parameters and determine the
constrained optimal capacity.
Hint: Use Excel Solver
to find the constrained
optimal capacity.
43
Numerical Optimization
44
Data-Driven Optimal Capacity
46
Epilogue
In my view, there are two key success factors
in data-rich business environments:
1. Being able to structure links between the
environment, decisions, and outcomes.
2. Being able to make optimal data-driven
decisions.
Next steps: Data Science Camp, core classes.
47
Feedback
I am interested in learning from you about
your impressions about the class.
Please approach me:
1. In person
2. Via e-mail ([email protected])