Professional Documents
Culture Documents
Chapter 3
Chapter 3
Chapter 3
Example 3.1:
Consider a random experiment that two electronic components are
tested.
The sample space is S = {NN, ND, DN, DD}, where N denotes
nondefective and D denotes defective.
One is naturally concerned with the number of defectives that occur.
Thus, each outcome in the sample space will be assigned a numerical
value of 0, 1 or 2.
These values are random quantities determined by the outcome of the
experiment.
They may be viewed as values assumed by the random variable X, the
number of defective items when two electronic components are tested.
Definition 3.1:
A random variable is a function/a rule that associates a real number with
each outcome in the sample space S, and denoted by X : S → SX ⊂ R.
SX is the set of all possible values of X, and is called the range of X.
If SX is finte or countable, then X is called discrete.
If SX is uncountable (SX is an interval), then X is called continuous.
Example 3.2:
Let X be the number of defective components when two electronic
components are tested.
X is a random variable.
The sample space S = {NN, ND, DN, DD}, where N denotes
nondefective and D denotes defective.
X : S → SX ⊂ R, where NN 7→ 0; ND 7→ 1; DN 7→ 1; DD 7→ 2
The range of X is SX = {0; 1; 2}.
SX = {0; 1; 2} is finte so X is discrete.
Example 3.3:
A box consists of 4 coins: one dollar coin; two fifty cent coins and one
twenty cent coin. Draw at random two coins from the box and let Y be
the total money of these 2 two coins.
Y is a random variable.
The sample space S = {DF , FD, DT , FF , FT , TF }, where D denotes
one dollar coin, F denotes fifty cent coin and T denotes twenty cent
coin.
Y : S → SY ⊂ R, where
DF 7→ 1.5; FD 7→ 1.5; DT 7→ 1.2; FF 7→ 1.0; FT 7→ 0.7; TF 7→ 0.7
The range of Y is SY = {0.7; 1.0; 1.2; 1.5}.
SY = {0.7; 1.0; 1.2; 1.5} is finte so Y is discrete.
Example 3.4:
Let Z be the height of the student selected randomly at a university.
The possible values of X belong to an interval (100; 200) (cm).
The range of Z is SZ = (100; 200) (cm) is uncountable (and
continuous) so Z is continuous.
Example 3.5:
Select at random an electronic component from a production line and let
T be the life time in years of this electronic component.
The possible values of T belong to an interval (0; +∞) (years).
The range of T , ST = (0; +∞) is uncountable (and continuous) so T
is continuous.
Example 3.6
Draw at random two coins from a box (consists of 4 coins: one dollar coin;
two fifty cent coins and one twenty cent coin.) and let Y be the total
money of these 2 two coins. Y is a discrete random variable.
The sample space S = {DF , FD, DT , FF , FT , TF } and the outcomes
are equally likely.
The range of Y is SY = {0.7; 1.0; 1.2; 1.5}.
The event (Y = 0.7) = {FT ; TF } so P(Y = 0.7) = 62 . Similarly,
P(Y = 1.0) = 16 ; P(Y = 1.2) = 16 and P(Y = 1.5) = 26
NV HANH Probability and statistics Second semester, 2022-2023 8 / 79
Random Variables
Example 3.6:
The distribution of Y is the following table:
Y 0.7 1.0 1.2 1.5
2 1 1 2
f (x) 6 6 6 6
or the following function (probability mass function p.m.f):
1
6 if x = 1.0 or x = 1.2
fY (x) = P(Y = x) = 26 if x = 0.7 or x = 1.5
0 otherwise.
or a graph:
Definition 3.3:
Let X be a discrete random variable where the range SX = {x1 , x2 , ...} is
finte or countable. The probability distribution of X is defined by a
probability distribution table
X x1 x2 ...
f (x) p1 p2 ...
Example 3.8:
Suppose that the rate of defective component in a production line is 5%.
Let X be the number of defective components when two electronic
components are tested. Develop the probability distribution of X .
The sample space S = {NN, ND, DN, DD}, where N denotes
nondefective and D denotes defective.
The range of X is SX = {0; 1; 2} and
P(X = 0) = P(NN) = 0.95 ∗ 0.95 = 0.9025;
P(X = 0) = P(DN) + P(ND) = 2 ∗ 0.05 ∗ 0.95 = 0.095; P(X = 2) =
P(DD) = 0.05 ∗ 0.05 = 0.0025
The distribution of X is the following table:
X 0 1 2
f (x) 0.9025 0.095 0.0025
Example 3.8:
Suppose that the rate of defective component in a production line is 5%.
Let X be the number of defective components when two electronic
components are tested. Develop the probability distribution of X .
The distribution of X is the following table:
X 0 1 2
f (x) 0.9025 0.095 0.0025
The probability mass function (pmf) of X is:
0.9025 if x = 0
0.095 if x = 1
fX (x) = P(X = x) =
0.0025 if x = 2
0 otherwise.
Example 3.9:
The probability distribution of Y , the number of imperfections per 10
meters of a synthetic fabric in continuous rolls of uniform width, is given by
Y 0 1 2 3 4
f (x) 0.41 0.37 c 0.05 0.01
Example 3.9:
The probability distribution of Y , the number of imperfections per 10
meters of a synthetic fabric in continuous rolls of uniform width, is given by
Y 0 1 2 3 4
f (x) 0.41 0.37 c 0.05 0.01
P
We have y ∈SY P(Y = y ) = 1 or 0.41 + 0.37 + c + 0.05 + 0.01 = 1,
so c = 0.16.
Then P(1 < Y ≤ 3) = P(Y = 2) + P(Y = 3) = 0.16 + 0.05 = 0.21;
P(Y > 2) = P(Y = 3) + P(Y = 4) = 0.05 + 0.01 = 0.06;
P(Y = 3.5) = 0.
Definition 3.4:
Let X be a discrete random variable. The cumulative distribution function
(cdf) of X is denoted by FX (t) and defined as the following:
X
FX (t) = P(X < t) = P(X = xi ) for t ∈ R.
xi <t
Example 3.10:
The discrete random variable X (Example 3.8) has the following
probability distribution table:
X 0 1 2
f (x) 0.9025 0.095 0.0025
Example 3.11:
A discrete random variable X has the following cdf:
0 if t ≤ 0
0.09 if 0 < t ≤ 1
FX (t) = c if 1 < t ≤ 2
0.79 if 2 < t ≤ 3
1 if t > 3.
Definition 3.5:
Let X be a continuous random variable. The probability density function
(pdf) of X is a function fX (x) defined over the set of real numbers that
satisfies the following requirements:
fX (x) ≥ 0 for all x ∈ R.
R +∞
−∞ fX (x)dx = 1.
Rb
P(a < X < b) = a fX (x)dx.
Definition 3.6:
Let X be a continuous random variable with the probability density
function (pdf) fX (x). The cumulative distribution function (cdf) of X is
defined by:
Z t
FX (t) = P(X < t) = fX (x)dx for t ∈ R.
−∞
Definition 3.6:
Let X be a continuous random variable with the probability density
function (p.d.f) fX (x). The cumulative distribution function (cdf) of X is
defined by:
Z t
FX (t) = P(X < t) = fX (x)dx for t ∈ R.
−∞
Example 3.12:
The life time X (in years) of a type of machines has the following pdf:
(
A(x − 2)(8 − x) if x ∈ [2; 8],
f (x) =
0 otherwise
Example 3.13:
A continuous random variable Y has the following cdf:
Expected Value
Example 3.14:
The probability distribution of the number of heads when two fair
coins were tossed is
X 0 1 2
f (x) 0.25 0.5 0.25
These probabilities are just the relative frequencies for the given
events in the long run.
The number of heads, on the average, when two fair coins were
tossed over and over again is µ = 0 ∗ 0.25 + 1 ∗ 0.5 + 2 ∗ 0.25 = 1.
This value is called the mean, or the expected value of X .
Expected Value
Definition 3.7:
Let X be a random variable with probability distribution f (x) (pmf or
pdf). The mean, or expected value, of X is defined by:
X
µ = E (X ) = xf (x)
x∈SX
if X is discrete, and
Z +∞
µ = E (X ) = xf (x)dx
−∞
if X is continuous.
The expected value of X is a measure of its central location and is
calculated by using the probability distribution.
Expected Value
Theorem 3.1:
Let X be a random variable with probability distribution f (x) (pmf or pdf)
and the random variable Y = g (X ). Then
X
E (Y ) = E [g (X )] = g (x)f (x)
x∈SX
if X is discrete, and
Z +∞
E (Y ) = E [g (X )] = g (x)f (x)dx
−∞
if X is continuous.
Expected Value
Example 3.15:
The number of times X that a sttudent entered a pizza store has the
following distribution:
Y 0 1 2 3 4
f (x) 0.41 0.37 0.16 0.05 0.01
Solution:
The expected value of X is:
µ = E (X ) = 0 ∗ 0.41 + 1 ∗ 0.37 + 2 ∗ 0.16 + 3 ∗ 0.05 + 4 ∗ 0.01 = 0.88.
The expected value of Y = X 2 is:
E (X 2 ) = 02 ∗ 0.41 + 12 ∗ 0.37 + 22 ∗ 0.16 + 32 ∗ 0.05 + 42 ∗ 0.01 = 1.62
NV HANH Probability and statistics Second semester, 2022-2023 32 / 79
Expectation and Variance
Expected Value
Example 3.16:
The life time X (in years) of a type of machines has the following pdf:
(
1
(x − 2)(8 − x) if x ∈ [2; 8],
f (x) = 36
0 otherwise
Expected Value
Expected Value
Definition 3.8:
Let X be a random variable with probability distribution f (x) (pmf or
pdf). The variance of X is defined by:
σ 2 = V (X ) = E [(X − µ)2 ] = E (X 2 ) − µ2
p
and the standard deviation of X is defined by σ(X ) = V (X ).
If X is discrete then V (X ) = x∈SX x 2 f (x) − µ2 .
P
R +∞
if X is continuous V (X ) = −∞ x 2 f (x)dx − µ2 .
The variance and the standard deviation of X are measures of its
variability (disperson).
Example 3.17:
A discrete random variable X has the following distribution:
Y 0 1 2 3 4
f (x) 0.41 0.37 0.16 0.05 0.01
Example 3.18:
The life time X (in years) of a type of machines has the following pdf:
(
1
(x − 2)(8 − x) if x ∈ [2; 8],
f (x) = 36
0 otherwise
Solution:
Let X be the monthly sales of the computer store and let Y be its
monthly profit.
We have E (X ) = 25000; σ(X ) = 4000 and Y = 0.3X − 6000.
The mean of the monthly profit is:
E (Y ) = E (0.3X − 6000) = 0.3E (X ) − 6000 = 1500
The variance of the monthly profit is:
V (Y ) = V (0.3X − 6000) = 0.32 V (X )
Then the standard deviation of the monthly profit is:
σ(Y ) = 0.3σ(X ) = 0.3 ∗ 4000 = 1200.
NV HANH Probability and statistics Second semester, 2022-2023 40 / 79
Some Important Discrete Probability Distributions Discrete Uniform Distribution
Definition 3.9:
A discrete random variable X with the range SX = {x1 , x2 , ..., xn } follows
uniform distribution if X has the following probability distribution table
X x1 x2 ... xn
1 1 1
f (x) n n ... n
Solution:
Let X be the discrete uniform distribution on the range
SX = {1, 2, ..., 50}. A formula linking X and T is T = 2X − 1.
Then E (T ) = 2E (X ) − 1 and V (T ) = 22 V (X ) = 4V (X ).
50(50+1) 1
The mean of X is E (X ) = 50 1
P
i=1 i ∗ 50 = 2 50 = 25.5, so the
mean of T is E (T ) = 2 ∗ 25.5 − 1 = 50.
The variance
P50 of 2X is1
V (X ) = i=1 i ∗ 50 − 25.52 = 50(50+1)(2∗50+1)
6
1 2
50 − 25.5 = 208.25,
so the variance of T is V (T ) = 4 ∗ 208.25 = 833.
NV HANH Probability and statistics Second semester, 2022-2023 42 / 79
Some Important Discrete Probability Distributions Hyper-Geometric Distribution
Hyper-Geometric Distribution
Definition 3.11:
A hypergeometric experiment, that is, one that possesses the
following two properties:
1 A random sample of size n is selected without replacement from N
items.
2 Of the N items, k may be classified as successes and N − k are
classified as failures.
The number X of successes of a hypergeometric experiment is called
a hyper-geometric random variable.
The probability distribution of the hypergeometric variable is called
the hypergeometric distribution and is given as follows:
n−x
Ckx CN−k
p(x; N, n, k) = if max{0, n − (N − k)} ≤ x ≤ min{n, k}.
CNn
Hyper-Geometric Distribution
Theorem 3.2:
The mean and variance of the hypergeometric distribution are
nk N −n k k
µ= and σ 2 = .n. . 1 −
N N −1 N N
Example 3.22:
Lots of 40 components each are deemed unacceptable if they contain 3 or
more defectives. The procedure for sampling a lot is to select 5
components at random and to reject the lot if a defective is found.
What is the probability that exactly 1 defective is found in the sample
if there are 3 defectives in the entire lot?
Find the mean and variance of the number of defective items found in
the sample if there are 3 defectives in the entire lot.
Hyper-Geometric Distribution
Solution of Example 3.22:
Using the hypergeometric distribution with n = 5, N = 40, k = 3:
The probability that exactly 1 defective is found in the sample if there
are 3 defectives in the entire lot is
C31 C37
4
p(1; 40, 5, 3) = 5
= 0.3011
C40
Binomial Distribution
Definition 3.12:
A Bernoulli process is a sequence of trials that satisfies the following
properties:
1 The experiment consists of repeated trials.
2 Each trial results in an outcome that may be classified as a success or
a failure.
3 The probability of success, denoted by p, remains constant from trial
to trial.
4 The repeated trials are independent.
Binomial Distribution
Example 3.23:
Some examples of Bernoulli process:
1 Testing 10 electronic components from a production line consisting of
5% defective items.
2 A salesperson calls to 20 customers where the probability that she
closes a sale is 0.6.
3 The probability that a patient recovers from a rare blood disease is
0.4. Consider 15 people that are known to have contracted this
disease and check the number of patients who will survive.
Binomial Distribution
Definition 3.13:
Consider a Bernoulli process of n trials where the probability of success in
each trial is p.
The number X of successes in n Bernoulli trials is called a binomial
random variable.
The probability distribution of this discrete random variable is called
the binomial distribution and given as follows:
Binomial Distribution
Example 3.24:
The probability that a patient recovers from a rare blood disease is 0.4. If
15 people are known to have contracted this disease, what is the
probability that
exactly 5 survive?
at least 10 survive?
from 3 to 8 survive?
Binomial Distribution
Binomial Distribution
Theorem 3.3:
The mean and variance of the Binomial distribution B(n, p) are
The mode of X is the value that occurs the most frequently (or the
value with the largest probability) and equals to:
(
np − q or np − q + 1 if np − q ∈ Z ,
m=
[np − q] + 1 if np − q ∈/ Z,
Binomial Distribution
Example 3.25:
The probability that a patient recovers from a rare blood disease is 0.4. If
15 people are known to have contracted this disease, what is the
average number of of patients who survive?
variance of the number of patients who survive?
mode of the number of patients who survive?
Binomial Distribution
Poisson Distribution
Definition 3.14:
Experiments yielding numerical values of a random variable X , the
number of outcomes occurring during a given time interval or in a
specified region, are called Poisson experiments.
The number X of outcomes occurring during a Poisson experiment is
called a Poisson random variable, and its probability distribution is
called the Poisson distribution.
The parameter of Poisson distribution is it mean µ, the average
number of outcomes occurring during the given time interval.
The range of X is SX = {0, 1, 2, 3, ....} and the probability associated
with each value is
µx
p(x; µ) = P(X = x) = e −µ for x = 0, 1, 2, 3, ....
x!
Poisson Distribution
Theorem 3.4:
The mean and variance of the Poisson distribution P(λ) is µ = σ 2 = λ.
Example 3.26:
During a laboratory experiment, the average number of radioactive
particles passing through a counter in 1 millisecond is 4.
What is the probability that 6 particles enter the counter in a given
millisecond?
What is the probability that 10 particles enter the counter in three
given milliseconds?
Binomial Distribution
46
P(X = 6) = e −4 = 0.1042.
6!
Let Y be the number of particles enter the counter in three given
milliseconds. Then Y ∼ P(12), so the probability that 10 particles
enter the counter in three given milliseconds is
1210
P(Y = 10) = e −12 = 0.105
10!
.
Example 3.27:
In a certain industrial facility, accidents occur infrequently. It is known
that the probability of at least one accident on any given day is 0.005 and
accidents are independent of each other.
What is the probability that in any given period of 400 days there will
be at least one accident on one day?
What is the probability that there are at most three days with at least
one accident?
Definition 3.15:
The density function of the continuous uniform random variable X on the
interval [a, b] is (
1
if x ∈ [a; b],
f (x) = b−a
0 otherwise.
Theorem 3.5:
The mean and variance of the continuous uniform distribution in [a; b] are
(b−a)2
µ = a+b 2
2 and σ = 12 .
Example 3.28:
The amount of gasoline sold daily at a service station is uniformly
distributed with a minimum of 2000 gallons and a maximum of 5000
gallons.
What is the probability density function?
Find the probability that daily sales will fall between 2500 and 3000
gallons.
What are the average amount of gasoline sold daily and the variance
of the amount of gasoline sold daily?
The probability that daily sales will fall between 2500 and 3000
gallons is:
1
P(2500 ≤ X ≤ 3000) = (3000 − 2500) 3000 = 16 .
The average amount of gasoline sold daily is µ = 2000+5000
2 = 3500
and the variance of the amount of gasoline sold daily is
2
σ 2 = (5000−2000)
12 = 750000.
Normal Distribution
Normal Distribution
Definition 3.16:
X is called a normal random variable if the density function of X is
1 (x−µ)2
f (x) = √ e− 2σ 2 , x ∈ R.
2πσ 2
Normal Distribution
Remark:
The values of function Φ(x) is given in the Table A.3.
Φ(−z) = 1 − Φ(z).
Example:
Φ(0.68) = 0.7517 and Φ(−0.68) = 1 − Φ(0.68) = 0.2483.
Standardization Rule
Standardization Rule:
X −µ
Let X ∼ N(µ, σ 2 ), then Z = σ ∼ N(0, 1).
x−µ
P(X < x) = P(Z < σ ) = Φ( x−µ
σ ).
P(X > x) = 1 − P(X < x) = 1 − Φ( x−µ µ−x
σ ) = Φ( σ ).
P(x1 < X < x2 ) = P(X < x2 ) − P(X < x1 ) = Φ( x2σ−µ ) − Φ( x1σ−µ ).
Normal Distribution
Example 3.29:
A certain type of storage battery lasts, on average, 3.0 years with a
standard deviation of 0.5 year. Assuming that battery life is normally
distributed, find the probability that
a given battery will last less than 2.3 years.
a given battery will last between 2.5 and 3.5 years.
Normal Distribution
Normal Distribution
Example 3.30:
The average grade for an exam is 7.4, and the standard deviation is 0.7. If
12% of the class is given As, and the grades are curved to follow a normal
distribution, what is the lowest possible A?
x − 7.4
⇔ Φ( ) = 0.88 = Φ(1.18) ⇔ x = 7.4 + 0.7 ∗ 1.18 = 8.2
0.7
NV HANH Probability and statistics Second semester, 2022-2023 71 / 79
Some Important Continuous Probability Distributions Normal Approximation for the Binomial Distribution
Example 3.31:
The probability that a patient recovers from a rare blood disease is 0.4. If
100 people are known to have contracted this disease, what is the
probability that
fewer than 30 survive?
between 35 and 45 survive?
45.5 − 40 34.5 − 40
≈Φ √ −Φ √
24 24
Exponential Distribution
Definition 3.18:
The random variable X follows an exponential distribution if the density
function of X is (
λe −λx if x > 0,
f (x) =
0 otherwise.
We denote by X ∼ E (λ).
Exponential Distribution
Theorem 3.6:
Let X ∼ E (λ). Then
1 1
E (X ) = λ and V (X ) = λ2
.
The cdf of X is
(
1 − e −λx if x > 0,
F (x) =
0 otherwise.
The Memoryless Property: P(X > t0 + t|X > t0 ) = P(X > t).
Exponential Distribution
Example 3.31:
Suppose that a system contains a certain type of component whose time,
in years, to failure is given by T . The random variable T is modeled
nicely by the exponential distribution with λ = 0.2. If 5 of these
components are installed in different systems, what is the probability that
at least 2 are still functioning at the end of 8 years?
Exponential Distribution
Student’s t- Distribution
Definition 3.19:
Student’s t-distribution has the probability density function (pdf) given by
Γ( ν+1 ) x 2 −(ν+1)/2
f (x) = √ 2 ν 1 + , x ∈ R,
νπΓ( 2 ) ν