4.1.
Random Variables Random Variable
riêng biệt
CHAPTER 4: DISCRETE RANDOM VARIABLES
Nguyễn Hoàng Huy Tú
October 9, 2025
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 1 / 33
4.1. Random Variables Random Variable
Random Variable
Definition
A random variable is a variable that takes on numerical values realized by the outcomes
in a random experiment.
We use capital letters, such as X, to denote the random variable and the corresponding
lowercase letter, x, to denote a possible value.
Example:
The face values of a single dice when a fair dice is rolled.
The number of claims on a medical insurance policy in a particular year.
The change in the price of a share of IBM common stock in a month.
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 1 / 33
4.1. Random Variables Discrete Random Variable
Discrete Random Variable
set of possible values is finite or countable.
Definition
A random variable is called a discrete random variable if the number of possible values
is finite or infinite but countable.
Example: cái nào không phải là khoảng, đoạn thì nó là discrete
The number of heads when three fair coins are tossed independently.
The number of customers arriving at a checkout counter in an hour.
ex: set of possible value:0,1,2-> finite-> discrete
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 2 / 33
4.1. Random Variables Continuous Random Variable
Continuous Random Variable
set of possible values is an interval
Definition
A random variable is a continuous random variable if it can take any value in an interval.
Example:
The yearly income for a family.
The amount of oil imported into the United States in a particular month.
Daily cell phone sales of a large company.
ex: (a,b); [a,b]; (a,b]; [a,b)
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 3 / 33
4.1. Random Variables Continuous Random Variable
Exercise
Ex 1: For each of the following, indicate if a discrete or a continuous random variable
provides the best definition:
a. The time to write a statistics exam in a university where the time limit is 3 hours
and students cannot leave before 30 minutes. continuous random variable
b. The number of cars that arrive each day for repair in a two-person repair shop discrete
c. Total daily e-commerce sales in dollars continuous random variable
d. The gender of a person that we observe at random in a street. discrete
sản phẩm lỗi
e. The number of defective items in a sample of 20 items from a large shipment.
discrete
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 4 / 33
4.2. Probability Distributions Probability Distribution Function
Probability Distribution Function
Suppose that X is a discrete random variable and that x is one of its possible values.
The probability that random variable X takes specific value x is denoted P(X = x).
Definition
The probability distribution function, denoted by P(x), of a discrete random variable X
is defined by
P(x) = Pr(X = x), ∀x
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 5 / 33
4.2. Probability Distributions Probability Distribution Function
Distribution Table bản phân phối xác suất
Definition
The possible values of a discrete random variable X are x1 , x2 , . . . , xn with the
corresponding probabilities P(X = xi ) = pi , i = 1, 2, . . . , n. distribution table is defined
as follow:
Biến ngẫu nhiên X có thể nhận giá trị nào, và mỗi giá trị đó xảy ra với xác suất bao nhiêu.
X x1 x2 … xn
P p1 p2 … pn
For example, let X be the face values of a single die when a fair dice is rolled. Then the
distribution table is
X 1 2 3 4 5 6
1 1 1 1 1 1
P 6 6 6 6 6 6
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 6 / 33
4.2. Probability Distributions Probability Distribution Function
Properties
Proposition
Let X be a discrete random variable with probability distribution P(x). Then,
0 ≤ P(x) ≤ 1, ∀x.
∑
x P(x) = 1.
Property 1 merely states that probabilities cannot be negative or exceed 1. Property 2
follows from the fact that the events “X = x”, for all possible values of x, are mutually
exclusive and collectively exhaustive.
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 7 / 33
4.2. Probability Distributions Probability Distribution Function
S={HT,HH,TH,TT) X: number of heads when two fair coins are tossed independently.
Ex 1: Show the probability distribution function (distribution table) of the number of
heads when two fair coins are tossed independently.
có khuyết điểm
Ex 2: A box has 10 products, including 4 defective products. Pick 2 products at
random. Make a probability distribution table of the number of defective products
taken out?
Ex 3: There are 2 packages. Package 1 has 3 good products and 2 bad products.
Package 2 has 2 good products and 3 bad products. Randomly take 2 products from
package 1 and 1 product from package 2. Establish a distribution table of the number
of good products among the 3 selected products?
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 8 / 33
4.2. Probability Distributions Probability Distribution Function
Exercise
Ex 4:The number of computers sold per day at Dan’s Computer Works is defined by
the following probability distribution:
X 0 1 2 3 4 5 6
P 0,05 0,10 0,20 0,20 0,20 0,15 0,10
Compute
a. P(3 ≤ X ≤ 6)
b. P(X > 3)
c. P(X ≤ 4)
d. P(2 < X ≤ 5)
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 9 / 33
4.2. Probability Distributions Probability Distribution Function
Exercise
Ex 5: The probability that a university graduate will be offered no jobs within a month
of graduation is estimated to be 5%. The probability of receiving one, two, and three
job offers has similarly been estimated to be 43%, 31%, and 21%, respectively.
Determine the following probabilities.
a. Make a distribution table.
b. Determine the probability that a graduate is offered fewer than two jobs.
c. Determine the probability that a graduate is offered more than one job.
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 10 / 33
4.2. Probability Distributions Cumulative Probability Distribution
Cumulative Probability Distribution
Definition
The cumulative probability distribution, denoted by F(x), of a random variable X is
defined by
F(x) = P(X ≤ x)
It represents the probability that X does not exceed the value x.
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 11 / 33
4.2. Probability Distributions Cumulative Probability Distribution
Example
Olaf Motors, Inc., is a car dealer in a small southern town. Based on an analysis of its
sales history, the managers know that on any single day the number of Prius cars sold
can vary from 0 to 5. The distribution table is as follow
X 0 1 2 3 4 5
P(x) 0,15 0,3 0,2 0,2 0,1 0,05
F(x) 0,15 0,45 0,65 0,85 0,95 1
The third row contains the cumulative distribution, F(x), and it is easily determined by
the second row.
This model could be used for planning the inventory of cars. For example, if there are
only four cars in stock, Olaf Motors could satisfy customers’ needs for a car 95% of the
time.
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 12 / 33
4.2. Probability Distributions Cumulative Probability Distribution
Properties
Proposition
Let X be a discrete random variable with cumulative probability distribution F(x). Then
∑
i) F(x0 ) = x≤x0 P(x).
ii) 0 ≤ F(x) ≤ 1, ∀x.
iii) if x1 and x2 are two numbers with x1 < x2 , then F(x1 ) ≤ F(x2 ).
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 13 / 33
4.2. Probability Distributions Expected Value
Expected Value
Definition
The expected value, denoted by E(X), of a discrete random variable X is defined as
∑
E(X) = xP(x)
x
The expected value of a random variable is also called its mean and is denoted by µ.
Solution steps: Discrete Random Variable −→ Distribution table −→ Compute the
expected value by the formula.
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 14 / 33
4.2. Probability Distributions Expected Value
Example
Suppose that the probability distribution for the number of errors, X, on pages from
business textbooks is as follows:
P(0) = 0, 81, P(1) = 0, 17, P(2) = 0, 02
Find the mean number (expected value) of errors per page.
We have ∑
E(X) = xP(x) = 0 × 0, 81 + 1 × 0, 17 + 2 × 0, 02
x
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 15 / 33
4.2. Probability Distributions Variance
Variance
Definition
Let X be a discrete random variable. The expectation of the squared deviations about
the mean, denoted by σ 2 , is called the variance and given by
σ2 = E[(X − µ)2 ]
= Σx (x − µ)2 P(x)
= (Σx x2 P(x)) − µ2
The square root of the variance, σ, is called the standard deviation.
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 16 / 33
4.2. Probability Distributions Variance
Example
A contractor is interested in the total cost of a project on which she intends to bid. She
estimates that materials will cost $ 25,000 and that her labor will be $900 per day. The
project will takes X days to complete. Given the probability distribution for completion
times
X 10 11 12 13 14
P 0,1 0,3 0,3 0,2 0,1
a. Find the mean and variance for completion time X.
b. Let Y denote the total cost of project (in dollars). Find the mean, variance and
standard deviation for total cost C.
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 17 / 33
4.2. Probability Distributions Linear Functions of a Random Variable
Linear Functions of a Random Variable
Properties
Let X be a random variable with mean µX and the variance σX2 . If Y = a + bX, then
µY = E(a + bX) = a + bµX .
σY2 = Var(a + bX) = b2 σX2 .
In particular,
E(a) = a, Var(a) = 0 where a is a constant number.
E(bX) = bµX and Var(bX) = b2 σX2 .
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 18 / 33
4.2. Probability Distributions Linear Functions of a Random Variable
Exercise
Ex 1:Given the probability distribution function:
X 0 1 2
P 0,25 0,5 0,25
a. Calculate the cumulative probability distribution.
b. Find the mean, variance and standard deviation.
Ex 2: A shipment of 20 parts contains 2 defectives. Two parts are chosen at random
from the shipment and checked. Let the random variable Y denote the number of
defectives found. Find the mean, variance and standard deviation of the random
variable Y.
Ex 3:A very large shipment of parts contains 10% defectives. Two parts are chosen at
random from the shipment and checked. Let the random variable Z denote the number
of defectives found. Find the expected value, variance and standard deviation of this
random variable.
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 19 / 33
4.2. Probability Distributions Linear Functions of a Random Variable
Exercise
Ex 4:A factory manager is considering whether to replace a temperamental machine. A
review of past records indicates the following probability distribution for the number of
breakdowns of this machine in a week.
Number of breakdowns 0 1 2 3 4
Probability 0,1 0,26 0,42 0,16 0,06
a. Find the mean and standard deviation of the number of weekly breakdowns.
b. It is estimated that each breakdown costs the company $1,500 in lost output. Find
the mean and standard deviation of the weekly cost to the company from breakdowns
of this machine.
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 20 / 33
4.2. Probability Distributions Linear Functions of a Random Variable
Exercise
Ex 5: An investor is considering three strategies for a $1,000 investment. The probable
returns are estimated as follows:
Strategy 1: A profit of $10,000 with probability 0.15 and a loss of $1,000 with
probability 0.85.
Strategy 2: A profit of $1,000 with probability 0.50, a profit of $500 with
probability 0.30, and a loss of $500 with probability 0.20.
Strategy 3: A certain profit of $400.
Which strategy has the highest expected profit? Explain why you would or would not
advise the investor to adopt this strategy.
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 21 / 33
4.3. Binomial Distribution
Binomial distribution: Example
Define
X: the number of heads when we toss 100 independent (fair) coins.
Y: the number of “Yes” responses when we survey 100 independent people with a
Yes/No question.
What are common things between X and Y?
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 22 / 33
4.3. Binomial Distribution
Binomial distribution: Example
Common aspects X Y
Random experiment Toss 100 independent coins Survey 100 independent people
Single trial 2 outcomes: H, T 2 outcomes: Y, N
Outcome of interest Head Yes
Random variable Number of heads Number of “Yes”
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 23 / 33
4.3. Binomial Distribution
Binomial Distribution
Definition
Suppose that
a random experiment can result in two possible outcomes, “success” and “failure,”
and that p is the probability of a success in a single trial.
Let X be the the number of resulting successes in n independent trials. The probability
distribution of X is called binomial distribution.
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 24 / 33
4.3. Binomial Distribution
Formulas of Binomial Distribution
Probability Distribution Function
P(k) = P(X = k) = Cnk pk (1 − p)n−k
Expected Value and Variance
µX = E(X) = np
and
σX2 = Var(X) = np(1 − p)
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 25 / 33
4.3. Binomial Distribution
Example: Sales of Airline Seats
Suppose that you are in charge of marketing airline seats for a major carrier. Four days
before the flight date you have 16 seats remaining on the plane. You know from past
experience data that 80% of the people that purchase tickets in this time period will
actually show up for the flight.
a. If you sell 20 extra tickets, what is the probability that you will overbook the flight?
b. If you sell 18 extra tickets, what is the probability that you have at least 1 empty
seat?
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 26 / 33
4.3. Binomial Distribution
Exercise
Ex 1: A production manager knows that 5% of components produced by a particular
manufacturing process have some defect. Six of these components, whose
characteristics can be assumed to be independent of each other, are examined.
a. What is the probability that none of these components has a defect?
b. What is the probability that one of these components has a defect?
c. What is the probability that at least two of these components have a defect?
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 27 / 33
4.3. Binomial Distribution
Exercise
Ex 2: A notebook computer dealer mounts a new promotional campaign. Purchasers
of new computers may, if dissatisfied for any reason, return them within 2 days of
purchase and receive a full refund. The cost to the dealer of such a refund is $100. The
dealer estimates that 15% of all purchasers will, indeed, return computers and obtain
refunds. Suppose that 50 computers are purchased during the campaign period.
a. Find the mean and standard deviation of the number of these computers that will be
returned for refunds.
b. Find the mean and standard deviation of the total refund costs that will accrue as a
result of these 50 purchases.
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 28 / 33
4.4. Poisson Distribution
Example
The following discrete random variables have the Poisson distribution.
The number of failures in a large computer system during a day.
The number of replacement orders for a part received by a firm in a month.
The number of ships arriving at a loading facility during a 6-hour loading period.
The number of delivery trucks to arrive at a central warehouse in an hour.
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 29 / 33
4.4. Poisson Distribution
Poisson Distribution
Definition
Let X be the number of occurrences in a given continuous interval (such as time,
surface area, or length). Then the probability distribution of X is called the Poisson
distribution.
e−λ λk
P(k) = P(X = k) = , for k = 0, 1, 2, . . .
k!
where
λ = the expected number of occurrences per time or space unit.
e = 2, 71828 (the base for natural logarithms)
Moreover,
µX = λ and σX2 = λ
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 30 / 33
4.4. Poisson Distribution
Example
Andrew Whittaker, computer center manager, reports that his computer system
experienced three component failures during the past 100 days.
a. What is the probability of no failures in a given day?
b. What is the probability of one or more component failures in a given day?
c. What is the probability of at least two failures in a 3-day period?
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 31 / 33
4.4. Poisson Distribution
Exercise
Ex 1: Customers arrive at a busy checkout counter at an average rate of 3 per minute.
If the distribution of arrivals is Poisson, find the probability that in any given minute
there will be 2 or fewer arrivals.
Ex 2: The number of accidents in a production facility has a Poisson distribution with
a mean of 31.2 per month.
a. For a given month what is the probability there will be fewer than 2 accidents?
b. For a given month what is the probability there will be more than 3 accidents?
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 32 / 33
4.5. Hypergeometric Distribution
Hypergeometric Distribution
SELF-STUDY
Nguyễn Hoàng Huy Tú (Forgein Trade University HCM Campus) Discrete Random Variables October 9, 2025 33 / 33