Lecture5 - Random Variable - 0923
Lecture5 - Random Variable - 0923
Yunduan Lin
Assistant Professor
Department of Decisions, Operations and Technology
CUHK Business School
Agenda
01 Random variable
o Probability mass function
o Mean
o Variance
Random Variable
Why?
o Sample space for tossing a coin ten times is large
o Using a random variable reduces the complexity
o Much easier to work (numbers rather than sets)
o P(0)=Pr(X=0)=Pr(T)=½
o P(1)=Pr(X=1)=Pr(H)=½
Cumulative Distribution Function - Definition
Since
o
o
o
o
Properties - Example
Example: Tossing a fair coin twice
o Sample space S={HH,HT,TH,TT}
o Let X be a random variable of total number of heads
o Consider four cases: X(HH)=2, X(HT)=1, X(HT)=1, X(TT)=0.
x 0 1 2
P(x) 1/4 1/2 1/4
F(x) 1/4 3/4 1
Expectation
x 1 2 3 4 5 6
P(x) 1/6 1/6 1/6 1/6 1/6 1/6
F(x) 1/6 1/3 1/2 2/3 5/6 1
o Expected value of X is
Expectation - Property
What is the expected value of portfolio that has 100 shares of stock X and 300 dollars of cash?
Expectation - Property
Variance
o The expectation is
o The variance is
Variance - Property
What is the variance of portfolio that has 100 shares of stock X and 300 dollars of cash?
Variance - Property
Definition of variance
Properties for Sum
Note that
Properties for Sum - Example
Example:
Suppose the mean return and variance for stock X are 0.1 and 0.05. Those for stock Y are 0.05 and
0.01. Consider a portfolio Z that equally divided between two stocks. That is, Z = 0.5X +0.5Y.
Uniform distribution
Every possible value of X is equally likely
Example:
o Number of heads tossing a fair coin
o Face value of rolling fair dice
Bernoulli Distribution - Definition
Bernoulli distribution
Example:
o Tossing a coin (fair/unfair)
o Running an experiment with binary outcomes
Bernoulli Distribution - Property
Bernoulli distribution
o Mean
o Variance
Intuition:
o mean: more successes with a higher p
o variance: lowest when most successes/failures (under
extreme values of p: p=0 or p=1), highest when most
uncertain (p=1/2)
Bernoulli Distribution - Property
o Expectation
o Variance
Binomial Distribution - Definition
Binomial distribution
Intuition:
o First, consider the probability that we have first x successes followed by n−x failures.
o Since each trial is independent, the probability of the union of these outcomes would simply the
multiplication of each outcomes px(1−p)n-x
o Next, there are nCx ways to rearrange these successes and failures. For example, another
extreme cases is that we have n−x failures followed by x successes.
Binomial Distribution - Property
Binomial distribution
o Mean
o Variance
Intuition:
o Binomial X is the sum of n independent Bernoulli.
o The mean and variance of X are simply n times of mean and
variance of a Bernoulli random variable.
Binomial Distribution - Property
o Expectation
o Variance
Binomial Distribution - Example
Example:
o What is the probability that out of five randomly chosen customers, 2 of them like spicy food?
o What is the probability that out of five randomly chosen customers, no more than 2 of them like
spicy food?
Binomial Distribution - Example
Example: Marketing campaign
A company launches a marketing campaign to promote a new product to targets 10,000 potential
customers. The company estimates that the probability of a customer making a purchase is 0.05.
o Using the binomial distribution, the company can calculate the probability of achieving a specific
number of purchases (e.g., 500)
This information can be used to assess the potential success of the campaign.
Binomial Distribution - Example
Example: Quality control
In a quality control inspection, the company randomly selects a sample of items from a production
batch. Let’s say the sample size is 100 and the overall defect rate in the batch is known to be 0.02.
o Using the binomial distribution, the company can determine the probability of finding a certain
number of defective items (e.g., 5) in the sample.
This information help the company assess the quality of the production batch.
Binomial Distribution - Example
Example: Employee Turnover
A company wants to analyze its employee turnover rate. Based on historical data, it is known that
the annual turnover rate is 0.10 (or 10%). The company currently has 200 employees.
o Using the binomial distribution, the company can calculate the probability of a specific number of
employees leaving the company in a given year (e.g., 20).
A software development company performs a series of tests on its latest software release. Each test
has a success rate of 0.95, and there are 20 tests in total.
o Using the binomial distribution, the company can calculate the probability of passing a specific
number of tests (e.g., 18 out of 20) and assess the overall quality of the software.
A retail store receives a shipment of 500 items from a supplier. Based on historical data, it is known
that the defect rate of items from this supplier is 0.03.
o Using the binomial distribution, the company can calculate the probability of a specific number of
defective items (e.g., 10) in the shipment.
This information helps the store determine appropriate actions for inventory management,
such as returning or repairing the defective items.
Poisson Distribution - Definition
Poisson distribution
o When n is very large and p is very small, the probability mass function becomes
Poisson Distribution - Property
Poisson distribution
Denote and
o Support of X: {0, 1, ...}
o Probability mass function
o Mean
o Variance
Intuition:
o Usage: arrival of customers over a period of time
o Different from binomial, we have mean = variance
• Var(X) = np(1−p) ≈ np because 1−p ≈ 1.
Poisson Distribution - Property
Note that
o Expectation
o Variance
Poisson Distribution - Example
Example:
The number of customers for a restaurant each hour follows Poisson distribution with mean 5.
o What is the probability that exactly 2 customers will arrive in next hour?
o Using the Poisson distribution, the company can calculate the probability of receiving a specific
number of calls (e.g., 60) in a given hour.
This information can help in staffing decisions, resource allocation, and estimating
customer wait times.
Poisson Distribution - Example
Example: Website visitors
o By applying the Poisson distribution, the company can calculate the probability of having a
certain number of visitors (e.g., 600) on a specific day.
This information can be used for capacity planning, server allocation, and website
performance optimization.
Poisson Distribution - Example
Example: Manufacturing Process
o By applying the Poisson distribution, the company can calculate the probability of having a
specific number of defects (e.g., 3) on any given day.
This information can aid in quality control, identifying process improvements, and setting
customer expectations.
Poisson Distribution - Example
Example: Insurance claims
An insurance company receives an average of 5 claims per day for a particular type of coverage.
o By applying the Poisson distribution, the company can calculate the probability of receiving a
specific number of claims (e.g., 3) in a given day.
This information can aid in premium pricing, risk assessment, and claims management.
A Feedback Form for the Entire Term
https://docs.google.com/forms/d/e/1FAIpQLSfsEgnMFLypI_KW6GF7j_FXtVY5E4Jrmf2P_BDwaG8GXWDc0A/viewform?usp=sf_link