Download as pdf or txt
Download as pdf or txt
You are on page 1of 148

Econometrics and Data Analysis

[ECON 540]

Random Variables and their


Distributions

Prof. Tristan L. Potter

1/139
Lecture plan

1. Random Variables
2. Discrete Probability Distributions
3. Continuous Probability Distributions

2/139
Random variables

3/139
Random variables
Philosophical aside

What do we mean by random?


I Is the outcome of a coin toss “random”?
I Is the wage of a randomly selected woman in the
United States “random”?

4/139
Random variables
Philosophical aside

An intellect which at any given moment knew all the


forces that animate Nature and the mutual positions of
the beings that comprise it, if this intellect were vast
enough to submit its data to analysis, could condense
into a single formula the movement of the great bod-
ies of the universe and that of the lightest atom: for
such an intellect nothing could be uncertain, and the
future just like the past would be present before its eyes.
(Laplace, 1814)

5/139
Random variables
Philosophical aside

But...
I Indeterminacy in quantum physics
I ...so perhaps this isn’t just an issue of lacking
information?

6/139
Random variables
Introduction: Definitions and examples

A random variable (RV) is a data-generating process.


I Population: Collection of data/realizations of RV
I Sample: Smaller collection data/realizations of a RV

Our goal is to learn about the population and/or


data-generating process using the sample.

7/139
Random variables
Introduction: Definitions and examples

Definition: Random variable (RV)


A random variable X is any function

X:S→R

which maps the outcomes of an experiment to the real


numbers (R).

8/139
Random variables
Introduction: Definitions and examples

I A random variable (RV) is a function!


I Domain is the sample space (S)
I Notation:
I Random variable (RV):
I Upper-case letters (e.g. Z)
I Lower-case letters with squiggly lines (e.g. z̃)
I Realization of a RV: Lower-case letters (e.g. z)

I Continuous vs. discrete


I Described by their distributions
I Functions of RVs are RVs
9/139
Random variables
Introduction: Definitions and examples

Real-life examples:
I Weekly earnings of women.
I Height of a randomly selected student in this class.
I Unemployment duration of a randomly selected job
seeker.
I Outcome of a coin toss.

10/139
Random variables
Introduction: Definitions and examples

Theoretical examples:
I Normal RV: X ∼ N (5.8, 0.3)
I Uniform RV: X ∼ U [0, 1]
I Bernoulli RV: X ∼ Bernoulli(p)
I Pareto RV: X ∼ P areto(xm , α)

11/139
Random variables
Introduction: Definitions and examples

Theoretical examples:
I Normal RV: X ∼ N (5.8, 0.3)
,→ Height
I Uniform RV: X ∼ U [0, 1]
I Bernoulli RV: X ∼ Bernoulli(p)
I Pareto RV: X ∼ P areto(xm , α)

12/139
Random variables
Introduction: Definitions and examples

Theoretical examples:
I Normal RV: X ∼ N (5.8, 0.3)
,→ Height
I Uniform RV: X ∼ U [0, 1]
,→ Winner of a raffle
I Bernoulli RV: X ∼ Bernoulli(p)
I Pareto RV: X ∼ P areto(xm , α)

13/139
Random variables
Introduction: Definitions and examples

Theoretical examples:
I Normal RV: X ∼ N (5.8, 0.3)
,→ Height
I Uniform RV: X ∼ U [0, 1]
,→ Winner of a raffle
I Bernoulli RV: X ∼ Bernoulli(p)
,→ Coin toss
I Pareto RV: X ∼ P areto(xm , α)

14/139
Random variables
Introduction: Definitions and examples

Theoretical examples:
I Normal RV: X ∼ N (5.8, 0.3)
,→ Height
I Uniform RV: X ∼ U [0, 1]
,→ Winner of a raffle
I Bernoulli RV: X ∼ Bernoulli(p)
,→ Coin toss
I Pareto RV: X ∼ P areto(xm , α)
,→ Income
15/139
Random variables
Introduction: Definitions and examples

Some facts about random variables:


1. Continuous vs. discrete
2. Described by their distributions
3. Functions of random variables are also random
variables

Much more on this soon.

16/139
Random variables
Introduction: Discrete vs. Continuous

Definition: Discrete random variable


A random variable (RV) is said to be discrete if it can
assume only a finite or countably infinite1 number of dis-
tinct values.

Examples:
I Coin toss; dice roll
I # of newly-listed firms in 2020

1
A set is countably infinite if there is a 1-to-1 mapping from the
elements of the set into the real numbers. 17/139
Random variables
Introduction: Discrete vs. Continuous

Definition: Continuous random variable


A random variable (RV) is said to be continuous if its
domain is uncountable.2

Examples:
I Amount of snowfall this February
I Time until next recession

2
A set is uncountable if there is no 1-to-1 mapping from the elements
of the set into the real numbers. 18/139
Random variables
Introduction: Distributions

Random variable are described by their distributions.


Recall that we previously defined a probability distribution:
A probability distribution on a sample space S is a
collection of numbers P (A) which satisfies axioms
P1-P3.

Loosely speaking, probability distributions tell us the


probability of each possible realization of the random
variable.

19/139
Random variables
Introduction: Distributions

I What’s the probability distribution of a single dice


roll?
I What’s the probability distribution for the amount of
snow this December?

20/139
Random variables
Introduction: Functions of random variables

Proposition: Functions of random variables


Functions of random variables are themselves random
variables.

I This is very important


I Observation:
I We can think of a sample as a collection of random
variables drawn from the same distribution
I So what can we say about, e.g., the sample average?
I And statistics (lower case ‘s’) more generally?

21/139
Discrete Probability Distributions

22/139
Discrete Probability Distributions
Definitions and properties

Definition: Probability distribution (discrete RV)


A probability distribution for a discrete RV Z is the
function defined by:

p(z) ≡ P (Z = z) ∀z∈S

I Z = z is the event of RV Z taking the value z.


I Thus, we can talk about its probability: P (Z = z)

23/139
Discrete Probability Distributions
Definitions and properties

Properties of discrete probability distributions


For any discrete probability distribution, the following
must be true:
1. 0 ≤ p(y) ≤ 1 ∀y
X
2. p(y) = 1
y

I The function p(y) defined on the sample space satisfies


our axioms of probability.

24/139
Discrete Probability Distributions
Definitions and properties

Connecting this with Lecture 2...

Problem: Gender discrimination in hiring


Consider the problem of an employer who has six equally
qualified applicants for two new positions. Three are
women and three are men. Because the applicants are
equally qualified, the employer randomly selects two of
the applicants.

25/139
Discrete Probability Distributions
Definitions and properties

Problem: Gender discrimination in hiring (cont’d)


Let Y denote the number of women hired (a RV!) and
find:
1. The probability distribution for Y in the case of 3
men and 3 women.
2. The generic formula for the probability distribution
in the case of M men, W women and J jobs.

26/139
Discrete Probability Distributions
Expected value: Discrete case

In the preceding problem, how many women do you expect


to be hired?

How did you decide?

27/139
Discrete Probability Distributions
Expected value: Discrete case

Definition: Expected value (discrete RV)


Let Y be a discrete random variable with probability
function p(y). Then the expected value of Y is defined
as:
X
E[Y ] = yp(y)
y

28/139
Discrete Probability Distributions
Expected value: Discrete case

Problem: Gender discrimination in hiring (cont’d)


Continuing with the gender discrimination problem, we
can compute the expected number of women hired:
E[Y ] = E[# of women hired]

29/139
Discrete Probability Distributions
Expected value: Discrete case

Problem: Gender discrimination in hiring (cont’d)


Continuing with the gender discrimination problem, we
can compute the expected number of women hired:
E[Y ] = E[# of women hired]
X
= yp(y)
y

30/139
Discrete Probability Distributions
Expected value: Discrete case

Problem: Gender discrimination in hiring (cont’d)


Continuing with the gender discrimination problem, we
can compute the expected number of women hired:
E[Y ] = E[# of women hired]
X
= yp(y)
y
= 0 · p(0) + 1 · p(1) + 2 · p(2)

31/139
Discrete Probability Distributions
Expected value: Discrete case
Problem: Gender discrimination in hiring (cont’d)
Continuing with the gender discrimination problem, we
can compute the expected number of women hired:
E[Y ] = E[# of women hired]
X
= yp(y)
y
= 0 · p(0) + 1 · p(1) + 2 · p(2)
1 3 1
=0· +1· +2·
5 5 5

32/139
Discrete Probability Distributions
Expected value: Discrete case
Problem: Gender discrimination in hiring (cont’d)
Continuing with the gender discrimination problem, we
can compute the expected number of women hired:
E[Y ] = E[# of women hired]
X
= yp(y)
y
= 0 · p(0) + 1 · p(1) + 2 · p(2)
1 3 1
=0· +1· +2·
5 5 5
3 2
=0+ +
5 5

33/139
Discrete Probability Distributions
Expected value: Discrete case
Problem: Gender discrimination in hiring (cont’d)
Continuing with the gender discrimination problem, we
can compute the expected number of women hired:
E[Y ] = E[# of women hired]
X
= yp(y)
y
= 0 · p(0) + 1 · p(1) + 2 · p(2)
1 3 1
=0· +1· +2·
5 5 5
3 2
=0+ +
5 5
=1
34/139
Discrete Probability Distributions
Expected value: Discrete case

Observations:
I Just a probability-weighted average.
I One way of describing behavior of a RV.
I Indeed, corresponds to our notion of “average”:
1·0+3·1+1·2
E[Y ] =
5
I We can compute the expected value of any random
variable...
I ...including functions of random variables...
I ...including statistics.
35/139
Discrete Probability Distributions
Expected value: Discrete case
Proposition: Expected value of functions of RVs
Let Y be a discrete random variable with probability
function p(y) and let g(Y ) be a function of Y . Then
the expected value of g(Y ) is given by:
X
E[g(Y )] = g(y)p(y).
y

I Generalizes previous definition.


I Special case: g(Y ) = Y
I Can formally prove this.
36/139
Discrete Probability Distributions
Expected value: Discrete case

Using the notion of an expected value of a function of a


random variable, we can define other useful concepts.

37/139
Discrete Probability Distributions
Expected value: Discrete case

Definition: Variance (discrete RV)


The variance of a random variable Y is defined as the
expected value of its squared deviation from its expected
value. That is,
 
2
V (Y ) = E (Y − E[Y ]) .

I Corresponds to g(Y ) = (Y − E[Y ])2 in preceding


Proposition

38/139
Discrete Probability Distributions
Expected value: Discrete case

Definition: Standard deviation (discrete RV)


The standard deviation of a random variable Y is defined
as the (positive) square root of its variance. That is,
s  
SD(Y ) = E (Y − E[Y ])2 .

39/139
Discrete Probability Distributions
Expected value: Discrete case

Problem: Gender discrimination in hiring (cont’d)


We’ve already computed the expected number of women
hired by the firm. What’s the variance?
V (Y ) = V (# of women hired)

40/139
Discrete Probability Distributions
Expected value: Discrete case

Problem: Gender discrimination in hiring (cont’d)


We’ve already computed the expected number of women
hired by the firm. What’s the variance?
V (Y ) = V (# of women hired)
X
= p(y)(y − 1)2
y

41/139
Discrete Probability Distributions
Expected value: Discrete case

Problem: Gender discrimination in hiring (cont’d)


We’ve already computed the expected number of women
hired by the firm. What’s the variance?
V (Y ) = V (# of women hired)
X
= p(y)(y − 1)2
y
= p(0) · (0 − 1)2 + p(1) · (1 − 1)2 + p(2) · (2 − 1)2

42/139
Discrete Probability Distributions
Expected value: Discrete case

Problem: Gender discrimination in hiring (cont’d)


We’ve already computed the expected number of women
hired by the firm. What’s the variance?
V (Y ) = V (# of women hired)
X
= p(y)(y − 1)2
y
= p(0) · (0 − 1)2 + p(1) · (1 − 1)2 + p(2) · (2 − 1)2
1 3 1
= · (−1)2 + · 02 + · 12
5 5 5

43/139
Discrete Probability Distributions
Expected value: Discrete case

Problem: Gender discrimination in hiring (cont’d)


We’ve already computed the expected number of women
hired by the firm. What’s the variance?
V (Y ) = V (# of women hired)
X
= p(y)(y − 1)2
y
= p(0) · (0 − 1)2 + p(1) · (1 − 1)2 + p(2) · (2 − 1)2
1 3 1
= · (−1)2 + · 02 + · 12
5 5 5
= 2/5

44/139
Discrete Probability Distributions
Expected value: Discrete case

Problem: Gender discrimination in hiring (cont’d)


And the standard deviation?

45/139
Discrete Probability Distributions
Expected value: Discrete case

Problem: Gender discrimination in hiring (cont’d)


And the standard deviation?

SD(Y ) = SD(# of women hired)

46/139
Discrete Probability Distributions
Expected value: Discrete case

Problem: Gender discrimination in hiring (cont’d)


And the standard deviation?

SD(Y ) = SD(# of women hired)


p
= V (Y )

47/139
Discrete Probability Distributions
Expected value: Discrete case

Problem: Gender discrimination in hiring (cont’d)


And the standard deviation?

SD(Y ) = SD(# of women hired)


p
= V (Y )
p
= 2/5

48/139
Discrete Probability Distributions
Expected value: Discrete case

Loosely speaking, the standard deviation tells us the


typical deviation of the random variable from its average
(that is, its expected value!).

49/139
Discrete Probability Distributions
Properties of expected values

We need to establish some properties of expected values (of


discrete RVs) that we will appeal to throughout the rest of
the term.

50/139
Discrete Probability Distributions
Properties of expected values

Proposition: Expected value of a constant


Let Y be a discrete random variable with probability
function p(y) and c be a constant. Then, we have:

E[c] = c

51/139
Discrete Probability Distributions
Properties of expected values

Proposition: Expected value of a constant


Let Y be a discrete random variable with probability
function p(y) and c be a constant. Then, we have:

E[c] = c

I Intuition?
I Prove this.

51/139
Discrete Probability Distributions
Properties of expected values

Proposition: Expected value of a sum


Let Y be a discrete random variable with probability
function p(y). Furthermore, let g1 (Y ) and g2 (Y ) be two
functions of Y . Then, we have:
E[g1 (Y ) + g2 (Y )] = E[g1 (Y )] + E[g2 (Y )]

52/139
Discrete Probability Distributions
Properties of expected values

Proposition: Expected value of a sum


Let Y be a discrete random variable with probability
function p(y). Furthermore, let g1 (Y ) and g2 (Y ) be two
functions of Y . Then, we have:
E[g1 (Y ) + g2 (Y )] = E[g1 (Y )] + E[g2 (Y )]

I Prove this.

52/139
Discrete Probability Distributions
Properties of expected values

Proposition: Variance (redux)


Let Y be a discrete random variable with probability
function p(y). Then, we have:

V (Y ) = E[Y 2 ] − E[Y ]2

53/139
Discrete Probability Distributions
Properties of expected values

Proposition: Variance (redux)


Let Y be a discrete random variable with probability
function p(y). Then, we have:

V (Y ) = E[Y 2 ] − E[Y ]2

I Makes computing variance much easier.


I Prove this.

53/139
Discrete Probability Distributions
Special Distributions

So far, we have been discussion (discrete) probability


distributions in very general/abstract terms. Let’s consider
a few special distributions which occur naturally in the
world around us:
I Binomial Distribution/RV
I Poisson Distribution/RV

Of course, there are many more. These are just some


interesting ones.
54/139
Discrete Probability Distributions
Special Distributions

Note that I will use the term “distribution” and “random


variable” somewhat interchangeably. This is because
random variables are defined in terms of their probability
distributions!

55/139
Discrete Probability Distributions
Binomial Distribution

Suppose we toss a coin 10 times. What is the distribution


of the number of “Heads” we observe?

56/139
Discrete Probability Distributions
Binomial Distribution

Definition: Binomial experiment


A binomial experiment is defined by:
1. Experiment consists of a fixed number, n, of identical trials.
2. Each trial results in one of two outcomes (“Success” and
“Failure”, say).
3. P (Success) = p; P (Failure) = q ≡ 1 − p.
4. Trials are independent.
5. RV of interest: Y = n(Success).

57/139
Discrete Probability Distributions
Binomial Distribution

Definition: Binomial distribution


A random variable Y (a Binomial RV) is said to have
a Binomial distribution based on n trials with success
probability p and failure probability q = 1 − p if and only
if
n
 y n−y
p(y) = y
p q

for y = 0, 1, 2, ..., n and 0 ≤ p ≤ 1.

I Where does p(y) come from?

58/139
Discrete Probability Distributions
Binomial Distribution

n

I y
: How many ways to get y successes in n trials
I First “success”: n ways (could be in any of the n
trials)
I Second “success”: n − 1 ways (could be in any of the
n − 1 remaining trials)
I y th “success”: n − k + 1 ways

I py q n−y : What’s the probability of, e.g., first y trials


resulting in “success” (p), remaining n − y trials
resulting in “failure” (q = 1 − p).

59/139
Discrete Probability Distributions
Binomial Distribution

60/139
Discrete Probability Distributions
Binomial Distribution

Examples:
I Number of “Heads” after tossing a coin n = 10 times.
I Number of Supreme Court justices siding with
Plaintiff.
I Number of defective cars produced by GM in a year.

What’s p in each of these cases?

61/139
Discrete Probability Distributions
Binomial Distribution

Problem: Gerrymandering
The US Supreme Court recently heard arguments regard-
ing the constitutionality of Republican redistricting in
Wisconsin, a strategy known as gerrymandering.3
Suppose we know there are 3 conservative-leaning jus-
tices and 3 liberal-leaning justices on the court, leaving
3 “unknowns”. What is the probability that the Demo-
cratic plaintiff in the case wins?

3
Gerrymandering is when an incumbent party rewrites district
boundaries to increase their probability of re-election. 62/139
Discrete Probability Distributions
Binomial Distribution

63/139
Discrete Probability Distributions
Binomial Distribution

Problem: Gerrymandering (cont’d)


Let’s interpret this problem as a Binomial experiment:
I Y = # of “unknown” justices siding with plaintiff
I What we want:

64/139
Discrete Probability Distributions
Binomial Distribution

Problem: Gerrymandering (cont’d)


Let’s interpret this problem as a Binomial experiment:
I Y = # of “unknown” justices siding with plaintiff
I What we want:
P (Y = 2 or Y = 3) = P (Y = 2) + P (Y = 3)

65/139
Discrete Probability Distributions
Binomial Distribution

Problem: Gerrymandering (cont’d)


Let’s interpret this problem as a Binomial experiment:
I Y = # of “unknown” justices siding with plaintiff
I What we want:
P (Y = 2 or Y = 3) = P (Y = 2) + P (Y = 3)
= p(2) + p(3)

66/139
Discrete Probability Distributions
Binomial Distribution

Problem: Gerrymandering (cont’d)


Let’s interpret this problem as a Binomial experiment:
I Y = # of “unknown” justices siding with plaintiff
I What we want:
P (Y = 2 or Y = 3) = P (Y = 2) + P (Y = 3)
= p(2) + p(3)
 y 3−y
= y=2,3 y3 12 12
P

67/139
Discrete Probability Distributions
Binomial Distribution

Problem: Gerrymandering (cont’d)


Let’s interpret this problem as a Binomial experiment:
I Y = # of “unknown” justices siding with plaintiff
I What we want:
P (Y = 2 or Y = 3) = P (Y = 2) + P (Y = 3)
= p(2) + p(3)
 y 3−y
= y=2,3 y3 12 12
P
 2 3−2  3 3−3
= 32 12 12 + 33 12 12

68/139
Discrete Probability Distributions
Binomial Distribution

Problem: Gerrymandering (cont’d)


Let’s interpret this problem as a Binomial experiment:
I Y = # of “unknown” justices siding with plaintiff
I What we want:
P (Y = 2 or Y = 3) = P (Y = 2) + P (Y = 3)
= p(2) + p(3)
 y 3−y
= y=2,3 y3 12 12
P
 2 3−2  3 3−3
= 32 12 12 + 33 12 12
3 1
= 8 + 8

69/139
Discrete Probability Distributions
Binomial Distribution

Problem: Gerrymandering (cont’d)


Let’s interpret this problem as a Binomial experiment:
I Y = # of “unknown” justices siding with plaintiff
I What we want:
P (Y = 2 or Y = 3) = P (Y = 2) + P (Y = 3)
= p(2) + p(3)
 y 3−y
= y=2,3 y3 12 12
P
 2 3−2  3 3−3
= 32 12 12 + 33 12 12
3 1
= 8 + 8
1
= 2.

70/139
Discrete Probability Distributions
Binomial Distribution
Of course, because Y is a (Binomial) random variable, we
can compute its expected value, variance, etc. For the
Binomial distribution, we have the following results:
1. E[Y Bin ] = np
2. V [Y Bin ] = npq

3. SD[Y Bin ] = npq

I Prove these (difficult).


I Suppose, in the previous problem, there were 3 known
conservative justices and 2 known liberal justices. What is the
expected outcome of the case?
71/139
Discrete Probability Distributions
Poisson Distribution

Suppose you are a manager at Bank of America. What is


the distribution of the number of customers arriving
between 1pm and 2pm on a Tuesday?

72/139
Discrete Probability Distributions
Poisson Distribution

Definition: Poisson probability distribution


A random variable Y (a Poisson RV) is said to have a
Poisson probability distribution if and only if

λy −λ
p(y) = e
y!
where y = 0, 1, 2, ... and λ > 0.

I Number of events occurring in a period.


I λ: “Rate parameter”/expected number of events in a
period.
73/139
Discrete Probability Distributions
Poisson Distribution

74/139
Discrete Probability Distributions
Poisson Distribution
Problem: Unemployment and job search
A jobless person is considered to be “unemployed” if he
or she has looked for work in the past 4 weeks.4 Suppose
we know that, on average, unemployed individuals get 1
job offer each six months of unemployment, and always
accept their first offer.
What is the probability that an unemployed person be-
comes “long-term” unemployed (> 6 months)?
4
This is interesting in and of itself—how do we categorize jobless
people who haven’t searched in 4 weeks? What does this mean about the
unemployment rate? 75/139
Discrete Probability Distributions
Poisson Distribution

76/139
Discrete Probability Distributions
Poisson Distribution

Problem: Unemployment and job search


Let’s interpret this in terms of Poisson distributions:
I Y = # of job offers in first 6 months of unempl.
I What we want:

77/139
Discrete Probability Distributions
Poisson Distribution

Problem: Unemployment and job search


Let’s interpret this in terms of Poisson distributions:
I Y = # of job offers in first 6 months of unempl.
I What we want:
P (Y = 0) = p(0)

78/139
Discrete Probability Distributions
Poisson Distribution

Problem: Unemployment and job search


Let’s interpret this in terms of Poisson distributions:
I Y = # of job offers in first 6 months of unempl.
I What we want:
P (Y = 0) = p(0)
= λy /y! · e−λ

79/139
Discrete Probability Distributions
Poisson Distribution

Problem: Unemployment and job search


Let’s interpret this in terms of Poisson distributions:
I Y = # of job offers in first 6 months of unempl.
I What we want:
P (Y = 0) = p(0)
= λy /y! · e−λ
= 1y /y! · e−1

80/139
Discrete Probability Distributions
Poisson Distribution

Problem: Unemployment and job search


Let’s interpret this in terms of Poisson distributions:
I Y = # of job offers in first 6 months of unempl.
I What we want:
P (Y = 0) = p(0)
= λy /y! · e−λ
= 1y /y! · e−1
= 10 /0! · e−1

81/139
Discrete Probability Distributions
Poisson Distribution

Problem: Unemployment and job search


Let’s interpret this in terms of Poisson distributions:
I Y = # of job offers in first 6 months of unempl.
I What we want:
P (Y = 0) = p(0)
= λy /y! · e−λ
= 1y /y! · e−1
= 10 /0! · e−1
= 1/e

82/139
Discrete Probability Distributions
Poisson Distribution

Problem: Unemployment and job search


Let’s interpret this in terms of Poisson distributions:
I Y = # of job offers in first 6 months of unempl.
I What we want:
P (Y = 0) = p(0)
= λy /y! · e−λ
= 1y /y! · e−1
= 10 /0! · e−1
= 1/e
= 0.37

83/139
Discrete Probability Distributions
Poisson Distribution

As before, because Y is a (Poisson) random variable, we


can compute its expected value, variance, etc. For the
Poisson distribution, we have the following results:
1. E[Y P ois ] = λ
2. V [Y P ois ] = λ

3. SD[Y P ois ] = λ

I Prove these (difficult).

84/139
Continuous Probability Distributions

85/139
Continuous Probability Distributions
Definitions and properties

Definition: Cumulative distribution function (CDF)


The cumulative distribution function for a random vari-
able Y , denoted by F (y), is defined by:

F (y) ≡ P (Y ≤ y)

for −∞ < y < ∞.

I Also: “CDF” or “distribution function”


I Applies to continuous and discrete RVs
I Q: How do we compute this for a discrete RV?
86/139
Continuous Probability Distributions
Definitions and properties

Properties of distribution functions


If F (y) is a distribution function, we have:
1. F (−∞) ≡ lim F (y) = 0.
y→−∞
2. F (∞) ≡ lim F (y) = 1.
y→∞
3. F (y) is a non-decreasing function of y.

I Sensible/intuitive requirements; nothing deep.

87/139
Continuous Probability Distributions
Definitions and properties

88/139
Continuous Probability Distributions
Definitions and properties

Definition: Continuous random variable


A random variable Y with distribution function F (y) is
said to be a continuous random variable if F (y) is a con-
tinuous function.

89/139
Continuous Probability Distributions
Definitions and properties

90/139
Continuous Probability Distributions
Definitions and properties
Definition: Probability density function
Let F (y) be the distribution function for a continu-
ous random variable Y . Then we denote by f (y) the
probability density function for Y , where f (y) is defined
as:
dF (y)
f (y) ≡ = F 0 (y)
dy

I Also: “PDF” or “density function”


I Clear why we need F to be continuous.
91/139
Continuous Probability Distributions
Definitions and properties
CDF −→ PDF

92/139
Continuous Probability Distributions
Definitions and properties

Note that the definition of a PDF implies also:


Z y0
F (y0 ) = f (y)dy
−∞

I This is just the Fundamental Theorem of Calculus

93/139
Continuous Probability Distributions
Definitions and properties
PDF −→ CDF

94/139
Continuous Probability Distributions
Definitions and properties

Properties of density functions


If f (y) is a density function, then
1. f (y) ≥ 0 for any y.
Z ∞
2. f (y)dy = 1
−∞

Important caveats:
I f (y) can be great than 1! Why?
I P (Y = y) = 0 for, e.g., a Normal dist’n. Why?

95/139
Continuous Probability Distributions
Definitions and properties

96/139
Continuous Probability Distributions
Definitions and properties

97/139
Continuous Probability Distributions
Definitions and properties

F (y) tells us the probability that some random variable Y


is less than the threshold y.

What if we’re interested in figuring out the probability that


Y falls within some interval? That is, how do we compute:

P (y0 ≤ Y ≤ y1 )?

98/139
Continuous Probability Distributions
Definitions and properties

99/139
Continuous Probability Distributions
Definitions and properties

100/139
Continuous Probability Distributions
Definitions and properties

101/139
Continuous Probability Distributions
Definitions and properties

102/139
Continuous Probability Distributions
Definitions and properties

Thus, we know:

P (y0 ≤ Y ≤ y1 ) = F (y1 ) − F (y0 )


Z y1 Z y0
= f (y)dy − f (y)dy
−∞ −∞
Z y1
= f (y)dy.
y0

103/139
Continuous Probability Distributions
Definitions and properties

Proposition: P (y0 ≤ Y ≤ y1 )
If Y is a random variable with density function f (y) and
y0 ≤ y1 , then the probability that Y is between y0 and
y1 is given by

Z y1
P (y0 ≤ Y ≤ y1 ) = f (y)dy.
y0

104/139
Continuous Probability Distributions
Definitions and properties

105/139
Continuous Probability Distributions
Definitions and properties
Problem: Pharmaceutical R&D
You are hired as a consultant for a pharmaceutical com-
pany with an R&D department that conducts research
on drugs for treating a rare hereditary disorder. They
tell you that the probability of discovering a drug that
will yield revenue of $y billion is given by:

f (y) = c[20 − 2y]

where y ∈ [0, 10], so the company will (i) not lose money
and (ii) make (at most) $10 billion from R&D.
106/139
Continuous Probability Distributions
Definitions and properties
Problem: Pharmaceutical R&D (cont’d)
As a consultant, you are asked to provide an answer to
the following questions:
1. Suppose that, once discovered, bringing a new drug
to market costs $5 billion. What is the probability
that R&D will be profitable?
2. You are asked if the company should keep its R&D
department open or shut it down. What is your
recommendation?

107/139
Continuous Probability Distributions
Expected value: Continuous case
Definition: Expected value (continuous RV)
Let Y be a continuous random variable with probabil-
ity distribution f (y). Then the expected value of Y is
defined as:
Z ∞
E[Y ] = yf (y)dy
−∞

I Note the similarity with the discrete case:


P
E[Y ] = y yp(y)
I No coincidence.
108/139
Continuous Probability Distributions
Expected value: Continuous case

109/139
Continuous Probability Distributions
Definitions and properties
Problem: Pharmaceutical R&D (cont’d)
As a consultant, you are asked to provide an answer to
the following questions:
1. Suppose that, once discovered, bringing a new drug
to market costs $5 billion. What is the probability
that R&D will be profitable?
2. You are asked if the company should keep its R&D
department open or shut it down. What is your
recommendation?

110/139
Discrete Probability Distributions
Expected value: Continuous case
Proposition: Expected value of functions of RVs
Let Y be a continuous random variable with probability
distribution f (y) and let g(Y ) be a function of Y . Then
the expected value of g(Y ) is given by:
Z ∞
E[g(Y )] = g(y)f (y)dy.
−∞

I Generalizes previous definition.


I Special case: g(Y ) = Y
I Can formally prove this.
111/139
Discrete Probability Distributions
Expected value: Continuous case

Properties of expected values


Let c be a constant, and let g(Y ), g1 (Y ), g2 (Y ),..., gk (Y )
be functions of a continuous random variable Y . Then
the following properties hold:
1. E[c] = c
2. E[cg(Y )] = cE[g(Y )]
3. E[g1 (Y ) + ... + gk (Y )] = E[g1 (Y )] + ... + E[gk (Y )]

112/139
Discrete Probability Distributions
Expected value: Continuous case

Some observations:

I Expected value is a linear operator. That is, if


g(X) = a + bX is a linear function, then:

E[g(X)] = E[a + bX] = a + bE[X] = g(E[X])

I But this does not work with more general functions:

E[g(X)] 6= g(E[X]) for arbitrary g

113/139
Continuous Probability Distributions
Expected value: Continuous case

Problem: Expected utility and consumption smoothing


A central proposition of macroeconomic theory is that ra-
tional risk-averse individuals seek to “smooth” their con-
sumption. The notion of consumption smoothing pro-
vides a clear economic example of computing the ex-
pected value of a function of a random variable.

114/139
Continuous Probability Distributions
Expected value: Continuous case
Problem: Expected utility and consumption smoothing
Consider an individual with the following choice:
I Option 1: Receive $50 for sure
I Option 2: Enter a lottery and receive $100 with probability
1
2, but receives $0 with probability 12 .

1. What is the expected payoff to entering the lottery?

2. Suppose the individual is risk averse, with utility function



u(Y ) = Y .
2.1 What is her expected utility from entering?
2.2 What is her expected utility from not entering?
3. Will she enter? Why or why not?
115/139
Continuous Probability Distributions
Expected value: Continuous case

Problem: Expected utility and consumption smoothing


Suppose, instead, the lottery pays every value between
$0 and $100 with equal probability.
1. What is the expected payoff to entering the lottery?

2. Suppose the individual is risk averse, with utility function



u(Y ) = Y .
2.1 What is her expected utility from entering?
2.2 What is her expected utility from not entering?
3. Will she enter? Why or why not?

116/139
Continuous Probability Distributions
Expected value: Continuous case

Problem: Expected utility and consumption smoothing


The principle (economics):
I Risk-aversion: E[u(Y )] ≤ u(E[Y ])
I Risk-loving: E[u(Y )] ≥ u(E[Y ])

The principle (probability theory):


I Concave function g: E[g(Y )] ≤ g(E[Y ])
I Convex function g: E[g(Y )] ≥ g(E[Y ])

117/139
Continuous Probability Distributions
Expected value: Continuous case

118/139
Continuous Probability Distributions
Special distributions

As with our study of discrete random variables/probability


functions, we now turn to considering a few special
distributions which occur naturally in the world around us:
I Uniform Distribution/RV
I Normal Distribution/RV
I Exponential Distribution/RV

119/139
Continuous Probability Distributions
Uniform Distribution

Consider a car manufacturer with a missing cog in its


assembly line. The manager orders a new cog and UPS
promises delivery between 10am and 11am on Wednesday.

The arrival time of the cog is an example of a Uniform


random variable.

120/139
Continuous Probability Distributions
Uniform Distribution
Definition: Uniform probability distribution
Let Y be a continuous random variable. Y is said to have
a uniform probability distribution on the interval (a, b) iff
the density function of Y is given by

1
f (y) = b−a
for a ≤ y ≤ b.

I All outcomes have same probability.


I Easy to derive f (y), F (y) using this fact.
I Notation: Y ∼ U [a, b]
121/139
Continuous Probability Distributions
Uniform Distribution

122/139
Continuous Probability Distributions
Uniform Distribution

123/139
Continuous Probability Distributions
Uniform Distribution

Problem: Waiting for the missing cog


Returning to the car manufacturer waiting on the cog
delivery from UPS:
I What is the probability that the cog comes
between 10:15am and 10:45am?
I What is the expected arrival time?

124/139
Continuous Probability Distributions
Uniform Distribution

Properties of Uniform distributions:

125/139
Continuous Probability Distributions
Uniform Distribution

Properties of Uniform distributions:


I E[Y U [a,b] ] =

125/139
Continuous Probability Distributions
Uniform Distribution

Properties of Uniform distributions:


I E[Y U [a,b] ] = a+b
2

125/139
Continuous Probability Distributions
Uniform Distribution

Properties of Uniform distributions:


I E[Y U [a,b] ] = a+b
2

I V [Y U [a,b] ] =

125/139
Continuous Probability Distributions
Uniform Distribution

Properties of Uniform distributions:


I E[Y U [a,b] ] = a+b
2

I V [Y U [a,b] ] = 1
12
(b − a)2

125/139
Continuous Probability Distributions
Uniform Distribution

Properties of Uniform distributions:


I E[Y U [a,b] ] = a+b
2

I V [Y U [a,b] ] = 1
12
(b − a)2
I SD[Y U [a,b] ] =

125/139
Continuous Probability Distributions
Uniform Distribution

Properties of Uniform distributions:


I E[Y U [a,b] ] = a+b
2

I V [Y U [a,b] ] = 1
12
(b − a)2
I SD[Y U [a,b] ] = √1 (b − a)
12

125/139
Continuous Probability Distributions
Normal Distribution

Suppose an economic consulting firm surveys a large


number of economists about their forecasts for the
unemployment rate.

In this case, we might expect the distribution of forecasts


to be a Normal random variable with mean 5% and
standard deviation 0.5%.

126/139
Continuous Probability Distributions
Normal Distribution
Definition: Normal probability distribution
Let Y be a continuous random variable. Y is said to
have a Normal probability distribution iff, for σ > 0 and
−∞ < µ < ∞, the density function Y is given by:
1 2 2
f (y) = √ e−(y−µ) /2σ for −∞ ≤ y ≤ ∞.
σ 2π

I Infinite support
I Ubiquitous in real world
I Notation: Y ∼ N (µ, σ 2 )
127/139
Continuous Probability Distributions
Normal Distribution

128/139
Continuous Probability Distributions
Normal Distribution

129/139
Continuous Probability Distributions
Normal Distribution

Definition: Standard Normal probability distribution


If Y is Normally distributed, then Y is said to have a
Standard Normal probability distribution iff µ = 0 and
σ = 1.

I Notation: N (0, 1)
I We can convert any Normal RV into a standard
Normal RV.

130/139
Continuous Probability Distributions
Normal Distribution

Proposition: Conversion to standard Normal


Y −µ
If Y ∼ N (µ, σ 2 ), then Z ≡ σ
∼ N (0, 1).

I We can prove this.

131/139
Continuous Probability Distributions
Normal Distribution

Problem: Forecasting unemployment


Returning to the consulting firm surveying economists,
suppose forecasts of unemployment rate follow a Normal
distribution with µ = 5% and σ = 0.5%.
I What fraction of economists believe the
unemployment rate will be between 4% and 6%?

132/139
Continuous Probability Distributions
Normal Distribution

Problem: Forecasting unemployment


We could numerically approach this problem, but the
integral is ugly. The rule of thumb with this type of
problem is to consult a “Z-table” which reports areas
underneath the PDF of a standard Normal RV.
1. Goal: P (4 ≤ Y ≤ 6) =?
Y −5
2. Standardize: Y ∼ N (5, 0.52 ) → Z ≡ 0.5
∼ N (0, 1)
3. Consult table: P (−2 ≤ Z ≤ 2)

133/139
Continuous Probability Distributions
Normal Distribution

134/139
Continuous Probability Distributions
Normal Distribution

135/139
Continuous Probability Distributions
Normal Distribution

136/139
Continuous Probability Distributions
Normal Distribution

137/139
Continuous Probability Distributions
Normal Distribution

Problem: Forecasting unemployment (cont’d)


Thus, we know:

P (4 ≤ Y ≤ 6) = P (−2 ≤ Z ≤ 2)

= 0.9772 − 0.0228

= 0.9544.

So roughly 95% of economists expect the unemployment


rate to fall between 4% and 6%.

138/139
Continuous Probability Distributions
Normal Distribution

Properties of Normal distributions:


I E[Y N [µ,σ2 ] ] = µ
I V [Y N [µ,σ2 ] ] = σ 2
I SD[Y N [µ,σ2 ] ] = σ

The distribution is directly parameterized by its mean and


variance.

139/139

You might also like