You are on page 1of 34

Stat E-104: Section 3

Introduction to Decision Analysis, Discrete Random Variables, and


Discrete Probability Distributions
Reminders on Logistics
Ethan Fosse: Virtual Office Hours 6:30pm to 8:30pm on Tuesdays)
Sofia Velazquez (Virtual Office Hours 6:30pm to 8:30pm on Wednesdays)
Office hours are entirely optional and are not at all required for succeeding
in this course
Permanent link for office hours:
http://www.anymeeting.com/stat104officehours
Slides posted on course website under Teaching Staff and Office Hours
(Extension Students)
Please try to attend office hours for detailed questions: email is best for
quick yes/no logistical questions rather than those involving substantive
interpretation or mathematical notation
Reminder on Homework Assignments
Please submit your homework to your assigned TF (or TA in
Extension School parlance)
Each homework assignment is due on Sunday at 4pm
Please send the homework as a single pdf
You will receive the homework back from the graders by the Thursday
after the due date
Read the instructions carefully!
Reminders on Using Stata
Go to Getting Started with Stata on the course website
For additional information, we recommend UCLAs Stata page:
http://www.ats.ucla.edu/stat/stata/
If you have trouble installing Stata with a VPN (Virtual Private
Network) client from Harvard, you can rent a version of Stata for $35
as a student:
http://www.stata.com/order/new/edu/gradplans/student-pricing-
nodl/
Also: Stata Gift Shop!
Homework #2 Review
Problem #13
(13) The probability that a customer selects a pizza with mushrooms
or pepperoni is 0.55, and the probability that the customer selects
only mushrooms is 0.32. If the probability that he or she selects only
pepperoni is 0.17, find the probability of the customer selecting both
items.
Key point: Note that the problem doesn't give P(mushrooms) or
P(pepperoni), but instead gives the probabilities for "ONLY
mushrooms" and "ONLY pepperoni." Thus we have P(mushrooms and
not pepperoni) = 0.32 and P(pepperoni and not mushrooms) = 0.17.
But how to find P(mushrooms and pepperoni)? This can be clarified
using a Venn diagram
The Addition Rule, Part II
= +

+

=
+ +
= + +
0.55 0.32 0.17 .
Key Concepts
Lectures 9 to 12: Introduction to Decision Analysis, Discrete Random Variables,
Discrete Probability Distributions
Decision Tree Analyses
Maximax: (1) For each option, find the maximum payoff; (2) Choose the
option with the greatest maximum payoff (maximize the maximum)
Maxmin: (1) For each option, find the minimum payoff; (2) choose the
option with the greatest minimum payoff (maximize the minimum)
Expected Monetary Value (EMV): (1) Find the weighted average payoff
given specified probabilities for each state of nature; (2) choose the option
with the greatest EMV
Nonprobabilistic decision criteria: maximx and maximin
Probabilistic decision criterion (requires that you know or can estimate the
probabilities of uncertain events): EMV
Discrete Random Variables
Discrete random variables can assume only a finite or limited set of
values (in contrast to continuous random variables, which can take on
any one of an infinite set of values)
We use Greek letters for the random variables (and accordingly
population parameters) and Latin letters for our samples
We distinguish between the random variable itself (denoted by a
capital letter) and the specific values realized by the random variable
(denoted by lower case letters, usually indexed with a subscript)
Expected Mean and Variance of Random
Variables
Expected mean is given by:

= =

( =

)
The variance is given by:

2
= =

2
=

( =

)
For the expected mean were taking the specific values

and
multiplying by their probabilities

, and then adding these


parts together
Similar logic underlying the variance calculations
Rules for Expectation and Variance
Let X be a random variable with mean and variance
2
. Let a and b
be any constant fixed numbers. Define the random variable = +
.

= = + = + = +

= + =
2

2
Discrete Probability Distributions
Two commonly-used discrete probability distributions:
Binomial distribution: for successes and failures (e.g., do you
make the free throw or not?
Poisson distribution: for counting the number of occurrences of
something (e.g., number of homicides in a neighborhood)
We typically use Stata or other programs to do the calculations for us,
but its worth it to review the underlying mechanics so youre aware
its not mysterious!
Well focus on the binomial distribution this week
Binomial Distribution
= =
!
! !

()
x = number of successes in the sample
(e.g., x = 0, 1, 2, , n)
p = probability of success per trial
q = probability of failure (Note: q = 1 p)
n = number of trials (sample size)
For shorthand we often write: ~(, )
Mean: = =
Variance:
2
= =
Number of ways to
have x successes
in n trials
Probability of x successes
Probability of n - x failures
Binomial Distribution
Practice Problems
Problem 1. Brown Oil, Inc.
Kenneth Brown is the principal owner of
Brown Oil, Inc. After quitting his university
teaching job, Ken has been able to increase
his annual salary by a factor of over 100. At
the present time, Ken is forced to consider
purchasing some more equipment for
Brown Oil because of competition. His
alternatives are shown in the following
table. If Ken uses the maximax decision
criteria, what decision does he make? What
decision would maximin indicate?
Payoff table
3 investment choices
2 states of nature
Payoffs
Problem 1. Brown Oil, Inc. (cont.)
Payoff table
Oiler J
$300,000
-$200,000
$250,000
-$100,000
$75,000
-$18,000
Decision Tree
Squares = decision nodes
Circles = uncertain events
Problem 1. Brown Oil, Inc. (cont.)
Oiler J
$300,000
-$200,000
$250,000
-$100,000
$75,000
-$18,000
Maximax: maximize the maximum
(1) Find maximum of each option
(2) From these, choose maximum
This is the maximax
Thus we decide to invest in Sub
100 (were really hoping the
economy doesnt go down the
tubes, though)
Problem 1. Brown Oil, Inc. (cont.)
Oiler J
$300,000
-$200,000
$250,000
-$100,000
$75,000
-$18,000
Maximin: maximize the minimum
(1) Find minimum of each option
(2) From these, choose maximum
This is the maximin
Thus we decide to invest in the
Texan (if the economy tanks at
least we wont lose a ton of $$...
but wouldnt $300k be great?)
Maximax or Maximin?
Preference for the maximax
strategy implies a view that
there will be a bull market
(economic growth)
Preference for the maximin
criterion implies a view that
there will be a bear market
(economic decline)
Problem 2. Opening a Dress Shop
Maria Rojas is considering the possibility of opening a
small dress shop on Church Street, a few blocks from
the university. She has located a good mall that
attracts students. Her options are to open a small
shop, a medium-sized shop, or no shop at all. The
market for a dress shop can be good, average, or bad.
The probabilities for these three possibilities are 0.2
for a good market, 0.5 for an average market, and
0.3 for a bad market. The net profit or loss for the
medium-sized and small shops for the various market
conditions are given in the following table. Building
no shop at all yields no loss and no gain. What is the
best decision to make based on the expected
monetary value?
Payoff table
3 states of nature
3 investment choices
Payoffs
Problem 2. Opening a Dress Shop (cont.)
Medium-sized shop
Average (0.5)
Average (0.5)
Average (0.5)
Expected Monetary Value (EMV):
(1) Find the weighted average payoff
given specified probabilities for
each state of nature
(2) Choose the option with
the maximum EMV
EMV = 0.2(75,000) + 0.5(25,000) + 0.3(-40,000) = $15,500
EMV = 0.2(100,000) + 0.5(35,000) + 0.3(-60,000) = $19,500
EMV = 0.2(0) + 0.5(0) + 0.3(0) = $0
Maximum EMV:
Thus we build
the medium-
sized shop!
$75,000
$25,000
-$40,000
$100,000
$35,000
-$60,000
$0
$0
$0
Problem 3. How many classes to take?
Below is a probability distribution on the number of classes, , you will decide to
take next semester. Find and .
How to solve this?

= =

( =

2
= =

2
=

( =

)
At this point you might be thinking
=

3 4 5
( =

) 0.10 0.70 0.20




Problem 3. How many classes to take (cont.)?
Distribution: from Latin distribuere (deal out in portions)
You encounter distributions all the time, and we often have to figure out
the center part and variation in the distribution
Conceptually we have to deal out the number of classes (3, 4, or 5)
according to specific portions (0.10, 0.70, 0.20)
How many classes?
(what we have to deal out)

= = .
What probability?
(our specific portions)
Problem 3. How many classes to take (cont.)?
Guessing and visualization can be helpful and can check to make sure youre not
mindlessly plugging and chugging
Theyre both distributions!
Whats your guess for the center part (mean) of the distribution? Whats your
guess for how the distribution is spread out (standard deviation)?

= = .
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
3 4 5
Problem 3. How many classes to take (cont.)?
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
3 4 5
My (real) guesses: 0.40 for the standard deviation and about 4.40 for the mean
SD =
0.40?
Mean =
4.40?
Warning: Graphs are often extremely
useful, but they can be very deceiving
if not drawn to scale! The main point
here is to de-mystify what were
calculating and why.
Problem 3. How many classes to take (cont.)?
Below is a probability distribution on the number of classes, , you will decide to take next
semester. Find and .
How to solve this?

= =

= 3 0.1 + 4 0.7 + 5 0.2 = .


2
= =

2
=

= 3 4.1
2
0.1 +(4
=

3 4 5
( =

) 0.10 0.70 0.20


Problem 4. Rain in September
In September in Cambridge, MA, each day has a 30% chance of being
rainy (consider rainy to be any type of precipitation throughout this
problem). Also, if it rains one day, it has no effect on whether it will
rain any other day. What is the probability of 1 or fewer rainy days
over the course of one week (7 days) in September in Cambridge?
p = success = rainy day = 0.30
q = failure = non-rainy day = 1 0.30 = 0.70
x = number of successes in the sample (so x = 1)
n = number of trials (sample size) = 7
Rain in September (cont.)
= =
!
! !

()
x = number of successes in the sample
(e.g., x = 0, 1, 2, , n)
p = probability of success per trial
q = probability of failure (Note: q = 1 p)
n = number of trials (sample size)
For shorthand we often write: ~(, )
Mean: = =
Variance:
2
= =
Number of ways to
have x successes
in n trials
Probability of x successes
Probability of n - x failures
Binomial
Distribution
Problem 4. Rain in September
In September in Cambridge, MA, each day has a 30% chance of being
rainy (consider rainy to be any type of precipitation throughout this
problem). Also, if it rains one day, it has no effect on whether it will
rain any other day. What is the probability of 1 or fewer rainy days
over the course of one week (7 days) in September in Cambridge?
= (, , )
Our Stata command: di spl ay bi nomi al ( 7, 1, 0. 3) = 0.329
n = 7 days, 1 or fewer days, p = success (rain is a success)
End of Section 3
Stat E-104, Harvard University

You might also like