Quantitative Analysis for Management – I
Prof. Tamalika Koley
Decision Sciences Area
Indian Institute of Management Lucknow
Module - II
Random
Variables Moments
CDF, PDF,
PMF
Introduction
A company randomly calls 3 customers to ask if they are satisfied (Yes or No). Assume each
customer has a known 70% chance of saying Yes (Satisfied) and 30% chance of saying No (Not
Satisfied).
What you know: P(Satisfied) = 0.70, P(Not Satisfied) = 0.30.
Outcomes: S = {YYY, YYN, YNY, YNN, NYY, NYN, NNY, NNN}.
Probability of each outcome can be calculated.
What you do not know: How many of the customers are satisfied out of 3?
Introduction of random variables.
Random variable: Assign numbers to outcomes.
X: number of customers satisfied.
Continues…
S = {YYY, YYN, YNY, YNN, NYY, NYN, NNY, NNN} {3,2,2,1,2,1,1,0}.
Without random variables: You know the chance of a person being satisfied, but can’t quantify
how many were satisfied out of 3.
With random variables:
What are the possible values X can take?
What is the probability of getting 2 satisfied customers?
What is the average or expected number of satisfied customers?
You can calculate probabilities of specific outcomes using basic probability rules (without naming
a random variable).
However, random variables organize and generalize those calculations by assigning numbers to
outcomes and allowing summary statistics like expected value, variance, etc.
Random Variables
Example: A person plays a game where he wins Rs. 100 if he gets at least a head in two tosses and
he loses Rs. 200 otherwise.
What is the long-term gain or loss to the person?
He has a 75% chance of winning Rs. 100, but at the same time, he could lose Rs. 200 with a 25%
chance.
What is lacking in this example is some quantitative measurement of his gain.
Random variables are the numerical descriptions of the outcomes of any statistical experiment.
In simple terms, a random variable is a rule that associates a numerical value with each outcome
in a sample space of an experiment.
Definition
A random variable X is a function X: S → from a sample space S to the real line .
Example: Toss a coin twice.
Example
Define X as his gain/profit in the same game.
Possible values of X: 100 (wins), -200 (looses).
X assigns any one of the values to each possible outcome of the experiment.
Outcomes Values of X Probability
{HH} 100 1/4
{HT} 100 1/4
{TH} 100 1/4
{TT} -200 1/4
Diagrammatic Representation
Random E: Event P(e)
Experiment S: Sample Space
Space
0 1
Random Variable:
Random: cannot be predicted with certainty.
Variable: Something that can change or vary – it does not have a fixed value.
Types of Random Variables
Random Variable Type Values
Flip a coin three times. Finite {0,1,2,3}
X = total heads
Throw two dice over and Countably Infinite {1,2,3,…..}
over until you roll double
six.
X = number of throws.
Select a group of 50 Uncountably infinite Any positive real number
people.
X = average height of the
group.
Types of Random Variables
Random Variables
Discrete: A random variable which can Continuous: A random variable
assume a finite or countably infinite number that can take any value within
of values. its range of variation.
Example: Sum of points obtained in two Example: Weight of a new born
throw of a dice, number of tosses of a baby, height of students.
coin before head appears.
Assigning Probability- Discrete Random Variable
• No use until we assign a probability to each possible value of a random variable.
• Once we have assigned probabilities to the values of a random variable, we can
construct what is known as a probability distribution.
• Probability distribution is a systematic way to assign probabilities to various
possible values, allowing us to understand the relative likelihood of each value.
Discrete Distribution
X is a discrete random variable with possible values given by
We can list the values of X, even though the list is never-ending.
Denote the range of X as R = {}, the collection of all possible values of X.
Assign probabilities to each , that is,
• for all , and
Example
You work in a customer service center. You receive many calls a day.
From past data: 1 out of every 10 calls results in a customer complaint.
P(complaint) = 0.1, P(no complaint) = 0.9.
Random variable: X = number of calls it takes to get the first complaint.
X takes values 1,2,3,4,…
(Recall sum of a geometric series).
Probability Mass Function (PMF)
X is a discrete random variable defined on a sample space S, with a range of R.
The probability mass function p(x) defined as p(x) = P[X = x], for x ∊ R, satisfies the
following two conditions:
1. for all x ∊ R.
2. = 1.
Earlier Example
100 0.75
-200 0.25
Total 1
Example:
Two coins are tossed. The random variable X is defined as the number of heads that can
come up.
Outcome {HH} {HT} {TH} {TT}
X 2 1 1 0
X takes values 0,1,2.
.
Exercise!
Check whether the function defined below represents the PMF of some random
variable X.
Exercise
A battery cell is labeled as good if it works for at least 300 days in a clock; otherwise it is labeled as bad. Three
manufacturers, A, B and C make cells with probability of making good cells as 0.95, 0.90 and 0.80 respectively.
Three identical clocks are selected and cells made by A, B and C are used in clock numbers 1, 2 and 3
respectively. Let X be the total number of clocks working after 300 days. Find the probability mass function of
X.
Moments: Expectation
Performing a single act of random experiment will result in a single value of X.
The expected value or mean of a discrete random variable X is a weighted
average of the possible values that the random variable can take.
Expectation
Sum of the values,
weighted by their
respected probabilities
Repeat the random experiment independently large number of times and take the average of the
observed data, the average gets closer and closer to E(X).
Average is the central value where most of the values of X, resulting from a number of trials will
cluster around.
Let g(X) be some function of the random variable X, then E[g(X)] =
Example
Suppose I offer to play a game with you. You roll a dice, and I’ll pay you Rs. 400 if you
get a 6 or 1, but you pay me Rs. 200 otherwise. If we play this game several times,
what is the expected amount of money you win?
Solution:
X is the random variable denoting the amount of money you win.
E(X) = Value of X P(x) = P[X=x]
Total 1
Exercise
A men's soccer team plays soccer 0, 1, or 2 days a week. The probability that they
play 0 days is 0.2, the probability that they play 1 day is 0.5, and the probability that
they play 2 days is 0.3. Find the long-term average or expected value of the days
per week the men's soccer team plays soccer.
Variance
Consider a random variable X which measures monthly income (in Rs.) of the
members of a family.
Suppose X takes values 100000 with probability 1/10, and 0 with probability
9/10.
= 10000.
Expected value of Rs. 10000 implies the average income as Rs. 10000 per annum.
But this information is deceiving. That's the reason variance came into picture.
Definition
the expected value E(X) or μ.
Variance measures how spread out the possible values of X are with respect to
Definition
Let X be a discrete random variable with range
The variance of X is defined as
Remarks
Variance measures the spread or variability of the random variable around its
mean.
High variance = values are spread out; low variance = values cluster near the
mean.
The standard deviation of X is given by
In finance, if something like an investment has a greater variance, it may be
interpreted as more risky or volatile.
Example
Suppose you are analyzing two stocks based on their daily returns (%), estimated from the past
data.
In which stock would you like to invest?
Solution
Stock A:
return of stock A.
Stock B:
return of stock B.
Interpretation
Stock A: Lower average return but also lower risk.
Stock B: Higher average return but higher risk.
Conclusion: Stock B gives you a higher expected gain, but the day-to-
day returns vary more. If you are risk-tolerant and want higher growth,
Stock B is better. If you want stable, predictable returns, Stock A is safer.
Example
A company introduces a new product in the market and expects to make a profit of
Rs. 2.5 lakh during the first year if the demand is good; Rs. 1.5 lakh if the demand is
moderate; and a loss of Rs. 1.0 lakh if the demand is poor. Market research studies
indicate that the probabilities for the demand to be good and moderate are 0.2 and
0.5 respectively. Find the company’s expected profit and the standard deviation.
Solution
X denote the company's profit (in Rs.).
The probability distribution of X is
Value of X 2.5 lakh 1.5 lakh -1.0 lakh
P(x) 0.2 0.5 0.3
The company’s expected profit is lakhs.
The variance of X is
The standard deviation of X is Rs. 1.331 lakhs.
Exercise
A shipment of 6 television sets contains 2 defective sets. A hotel makes
a random purchase of 3 of the sets. If X is the number of defective sets
purchased by the hotel, find the variance of X?
Remarks
For any random variable X, and
where a and b are constants.
For any random variables
Example
The probability distribution for the number of breakdowns in a day has been
determined for a machine shop. The probabilities for zero, one and two
breakdowns are 0.3, 0.6 and 0.1 respectively.
Daily repair costs, R, are found to be (in Rs): where X is the number of
breakdowns. Calculate expected repair cost.
Exercise
You are trying to develop a strategy for investing in two different stocks. Compute the following:
Expected return for stock A and for stock B.
Standard deviation for stock A and B.
If 30% of funds are allocated in stock A and 70% in stock B, then what is the expected return of
the portfolio.
The anticipated annual return for a $1000 investment in each stock under four different economic
conditions has the following distribution
Probability Economic Condition Return
Stock A Stock B
0.1 Recession -50 -100
0.3 Slow Growth 20 50
0.4 Moderate Growth 100 130
0.2 Fast Growth 150 200
Cumulative Distribution Function
Similar to PMF, the cumulative distribution function (CDF) of a random variable is
another method to describe the distribution of random variables.
for all
Recall PMF is a function from , the range of random variable X to [0,1]. However,
the CDF is a function from the real line to [0,1].
Cumulative Distribution Function
Graphical Representation
X be a discrete random variable with range
Without loss of generality, assume .
Remarks
For where a and b are constants.
For any real number
For any
.
Example
Nitrous oxide, more commonly known as “laughing gas”, is used extensively in dental procedures.
The probability distribution of the number of dentists in a random sample of five use laughing
gas in practice is given below.
X=x 0 1 2 3 4 5
p(x) 0.0102 0.0768 0.2304 0.3456 0.2592 0.0778
Find the probability that the number of dentists using laughing gas in the sample of five is
1. less than 4.
2. greater than 2.
3. greater than or equal to 2.
4. between 1 and 4.
Solution
X is the random variable denoting the number of dentists in a random sample of
five use laughing gas in practice.
Solution
Exercise
A team of consultants studied the service operation at the Wendy's Restaurant in
the Woodbridge Mall in Woodbridge, New Jersey. They measured the time
between customer arrivals to the restaurant over the course of a day and used
those data to develop a probability distribution to characterize customer arrivals
per 15-minute period.
x 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
P(x) .01 .02 .03 .05 .08 .09 .11 .13 .12 .10 .08 .06 .05 .03 .02 .01 .0
1
Check the conditions of pmf.
Find
Continuous Random Variable
Recall that a continuous random variable can assume any value within a defined range of
values.
Examples: length of time a telephone call lasts, daily temperature, height of students, etc.
We cannot list every possible value (uncountable).
Can we assign a probability to each possible value?
Point probability becomes meaningless in this case.
Assign probabilities to a range of values or intervals.
Probability Density Function (PDF)
Let X be a continuous random variable with range R.
For any
where is called the probability density function of the random variable X, satisfying
1. for all x
2.
PDF
The probability that X lies in the interval is equal to the area under the curve
between x = a and x = b.
PDF
Check for a continuous distribution, probability of a single point is 0.
Solution:
Remarks
Unlike discrete variables, which have distinct, countable values, continuous
variables can take on any value within a given range. For example, the height of a
person can be any value within a certain interval (e.g., between 5 feet and 6 feet).
Because there are infinitely many possible values, the probability of the variable
taking on exactly one specific value is practically zero. For example, the probability
of a person being exactly 5'10" is virtually zero.
Instead of assigning probabilities to single points, the PDF shows the density of
probability within a given interval. The area under the PDF curve within a specific
interval represents the probability of the variable falling within that interval.
The total area under the entire PDF curve is always equal to 1, representing the
certainty that the variable will take on some value within its range.
Cumulative Distribution Function (CDF)
X is a continuous random variable with range R = [a,b].
The CDF of X at a specific value in R is given by
In general, for any
Relationship between CDF and PDF
X is a continuous random variable.
For any
Example
• Suppose the research department of a steel manufacturer believes that one of
the company's rolling machines is producing sheets of steel of varying thickness.
The thickness (in millimeters) is a continuous random variable with density
function given by
Any sheets less than 160 millimeters must be scrapped because they are
unacceptable to buyers. Find the CDF and the probability of scrapped steel sheets
produced by the company.
Solution
• For
• For
For
The probability of scrapped steel sheets produced by the company is equal to
Moments of a Continuous Random
Variable
The moments of a continuous distribution are defined as in the discrete case,
but with the summation replaced by an integral.
Expectation: Let be a continuous random variable with range . The expected
value of denoted by is defined as
Variance
X is a continuous random variable with range R.
The variance of X, denoted by is defined as
The standard deviation, σ is the positive square root of the variance.
Example
A teacher travels to work by car and the journey time, in hours has a probability
density function
Find c.
Find the probability that the journey time will be more than 45 minutes.
Find the mean and variance of the journey time.