0% found this document useful (0 votes)
26 views28 pages

Chapter (2) (1) CCCCCCCCCCCC

Chapter 2 discusses discrete random variables, defining them as functions that assign real numbers to outcomes of random experiments. It covers classification of random variables, probability distribution functions, and properties of probability mass functions, including examples of calculating probabilities and expectations. The chapter also explains variance, standard deviation, and provides several examples to illustrate these concepts.

Uploaded by

mohassanin111
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views28 pages

Chapter (2) (1) CCCCCCCCCCCC

Chapter 2 discusses discrete random variables, defining them as functions that assign real numbers to outcomes of random experiments. It covers classification of random variables, probability distribution functions, and properties of probability mass functions, including examples of calculating probabilities and expectations. The chapter also explains variance, standard deviation, and provides several examples to illustrate these concepts.

Uploaded by

mohassanin111
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Chapter 2| Discrete Random Variables

1. The Notion of a Random Variable:


A random variable (RV) (or stochastic variable) X is a function that assigns a real
number, to each outcome in the sample space of a random experiment Fig.1.
The sample space of the experiment is S and the sample space of the random variable
is referred as SX.
ENGR340
S ρ

x-axis
x

Sx
Fig.1 A random variable assigns a number X(ρ) to each outcome ρ in the sample space S of a random experiment.

Example 1: Toss a fair coin three times, and let X denotes the number of heads find
S and Sx.
Solution
The sample space S = {HHH, HHT, HTH, HTT, THH, THT, TTH, TTT}, Fig.2

H
T
H
H
T

H
H
T
T
H
T
T

Fig 2 sample space of example 1


Chapter 2| Discrete Random Variables

The sample space of the random variable X is SX ={0, 1, 2, 3}.


As ‘0’ refers to no heads, ‘1’ refers one head, ‘2’ refers two heads, ‘3’ refers to three
heads.

Event ‘ρ’ HHH HHT HTH HTT THH THT TTH TTT
RV ‘X’ 3 2 2 1 2 1 1 0

2. Classification of a Random Variable:


A random variable can be classified into a discrete random variable or a continuous
random variable Fig.3:

Random variable

Discrete continuous

Fig.3. Classification of RV

2.1. Discrete Random Variables


A discrete random variable X is defined as a random variable that assumes values
from a countable set, that is SX ={x1, x2, x3, …}. A discrete random variable is said
to be finite if its range is finite, that is SX ={x1, x2, x3, …, xn}.
2.2. Continuous Random Variables
A random variable X is continuous if its set of possible values comprises either a
single interval on the number line or a union of disjoint intervals, such as weights,
time, age,… measurable data.
Chapter 2| Discrete Random Variables

3. Probability Distribution functions

Probability distribution function is a function that is used to give the probability of


all the possible values that a random variable can take Fig.4.

Probability distribution
function

Discrete Continuous
probability mass probability density
function(pmf) function(pdf)

Fig.4. Probability distribution function

A discrete probability distribution can be described by a probability distribution


function or a probability mass function (pmf). Similarly, a probability density
function (pdf) are used to describe a continuous probability distribution. Binomial,
Bernoulli, normal, and geometric distributions are examples of probability
distributions.
4. Discrete Probability Distributions (Probability Mass Function)
The probability mass function (pmf) of a discrete random variable X is defined
as:
𝑃(𝑥𝑘 ) = 𝑃[𝑋 = 𝑥𝑘 ] = 𝑓(𝑥𝑘 ), 𝑘 = 1,2,3, . . .. (1)
Note that 𝑃(𝑥𝑘 ) is a function of x over the real line, and that it can be nonzero only
at the values x1, x2, x3,…
For 𝑥 = 𝑥𝑘 , (1) can be written as:
𝑃[𝑋 = 𝑥] = 𝑃(𝑥) "𝑜𝑟" = 𝑓(𝑥)
Chapter 2| Discrete Random Variables

The properties of the probability mass function:


➢ 0 ≤ P(x) ≤ 1, for all x.
➢ ∑x P(x) = 1.

Example 2: Suppose that a fair coin is tossed twice, let X represent the number of
heads that can come up. Find the probability function corresponding to the random
variable X.
Solution

The sample space is S = {HH, HT, TH, TT}, Fig. 5. H


1 H
P(HH)=p(HT)=p(TH)=p(TT)= T
4

SX ={0, 1, 2}.
H

X 0 1 2 Sum T
T
P(X) 1 1 1 1 1 1
+ =
4 4 4 2 4
Fig.5. Sample space of Ex. 2

Remark ∑𝑥 𝑓(𝑥) = 1.

Example 3: A player receives $1 if the number of heads in three coin’s tosses is 2,


$8 if the number of heads is 3, but nothing otherwise. Find the pmf of the reward Y.
Solution

Sample space S = {HHH, HHT, HTH, HTT, THH, THT, TTH, TTT}, N = 8.
Sample space of the random variable SX ={0, 1, 2, 3}.
Chapter 2| Discrete Random Variables

Sample HHH HHT HTH HTT THH THT TTH TTT Sum
space
RV (X) 3 2 2 1 2 1 1 0 ---
P(X) 1 1 1 1 1 1 1 1 1
8 8 8 8 8 8 8 8

Reward Y $1 $8 $0 Sum
P(Y) 3 1 4 1
8 8 8

1
𝑃(𝑌 = 8) =
8
1 3
𝑃(𝑌 = 1) = 3 ∗ =
8 8
1 4 1
𝑃(𝑌 = 0) = 4 ∗ = =
8 8 2

Note that ∑𝑥 𝑓(𝑥) = 1.


𝑃(𝑥 = 8) + 𝑃(𝑥 = 1) + 𝑃(𝑥 = 0) = 1 (property 2)
Example 4: Consider the experiment of throwing a fair die. Let 𝑋 be the RV which
assigns 1 if the number that appears is even and 0 if the number that appears is odd.
(a) What is the range of 𝑋?
(b) Find 𝑃(𝑋 = 1 ) and 𝑃(𝑋 = 0).
Solution

Fig.6. Example 4

The sample space S= {1, 2, 3, 4, 5, 6}, Fig.6


Chapter 2| Discrete Random Variables

a) The range of SX ={0, 1}.


1
b) We have 3 even numbers {2, 4, 6} each one has a probability = ,
6
3 1
then 𝑃(𝑋 = 1) = = .
6 2

Similarly, have 3 odd numbers {1, 3, 5}, and 𝑃(𝑋 = 0) = 1/2.

4.1. Discrete RV mathematical expectations, variance and standard deviation


Mean (Expectation)=μ = x̅ = E(x) = ∑ x P(x)
Properties of expectations
a) 𝐸(𝑋 = 𝑐) = 𝑐 , 𝑐 𝑖𝑠 𝑎 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡.
b) 𝐸(𝑐𝑋) = 𝑐𝐸(𝑋).
c) 𝐸(𝑋 + 𝑌) = 𝐸(𝑋) + 𝐸(𝑌).
d) 𝐸(𝑋𝑌) = 𝐸(𝑋) ∗ 𝐸(𝑌), 𝑖𝑓 𝑋 𝑎𝑛𝑑 𝑌 𝑎𝑟𝑒 𝐼𝑛𝑑𝑒𝑝𝑒𝑛𝑑𝑒𝑛𝑡 𝑅𝑉.

The variance measures the “spread” or “dispersion” of X. Informally, it measures


how far a set of (random) numbers are spread out from their average value.

Variance =var(x)= 2 =∑ x 2 p(x) − μ2 = ∑ x 2 p(x) − E 2 (x).


Properties of variance
a) 𝑉𝑎𝑟(𝑐) = 0 , 𝑐 𝑖𝑠 𝑎 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡.
b) 𝑉𝑎𝑟(𝑐𝑋 + 𝑏) = 𝑐 2 𝑉𝑎𝑟(𝑋).
c) 𝑉𝑎𝑟(𝑋 + 𝑌) = 𝑉𝑎𝑟(𝑋) + 𝑉𝑎𝑟(𝑌),
𝑖𝑓 𝑋 𝑎𝑛𝑑 𝑌 𝑎𝑟𝑒 𝐼𝑛𝑑𝑒𝑝𝑒𝑛𝑑𝑒𝑛𝑡 𝑅𝑉.
d) 𝑉𝑎𝑟(𝑋 + 𝑌) = 𝑉𝑎𝑟(𝑋) + 𝑉𝑎𝑟(𝑌) − 2𝐶𝑜𝑣(𝑋, 𝑌),
𝑖𝑓 𝑋 𝑎𝑛𝑑 𝑌 𝑎𝑟𝑒 𝑛𝑜𝑡 𝐼𝑛𝑑𝑒𝑝𝑒𝑛𝑑𝑒𝑛𝑡 𝑅𝑉.
The standard deviation: Standard deviation is a measure that is used to quantify
the amount of variation or dispersion of a set of data values. A low standard deviation
Chapter 2| Discrete Random Variables

indicates that the data points tend to be close to the mean of the set, while a high
standard deviation indicates that the data points are spread out over a wider range of
values.
Standard deviation σ = √σ2 = √var(𝑥).
Example 5: A random number generator produces sequences of independent digits,
each of which is as likely to be any digit from 0 to 9 as any other. If X denotes any
single digit, find E(X), Var(X) and 𝜎.
Solution
X 0 1 2 3 4 5 6 7 8 9 Sum
P(X=x) 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1
XiP(Xi) 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 4.5
X2iP(Xi) 0 0.1 0.4 0.9 1.6 2.5 3.6 4.9 6.4 8.1 28.5
𝐸(𝑋) = ∑𝑛𝑖=0 𝑥𝑖 𝑃(𝑥𝑖 ) = 4.5
𝑉𝑎𝑟(𝑋) = 𝐸[𝑋 2 ] − (𝐸[𝑋])2 = 28.5 − (4.5)2 = 8.25.

σ = √σ2 = √8.25 = 2.87.

Example 6: A discrete random variable X has the following probability distribution:

X 1 2 3 4 5 6 7
P(X) 𝐶 2𝐶 2𝐶 3𝐶 𝐶2 2𝐶 2 7𝐶 2 + 𝐶

Find the value of C. Also find the mean, Var(X) and 𝜎 of distribution.

Solution
∑𝑛𝑖=1 𝑃(𝑋𝑖 ) = 1=𝑐 + 2𝑐 + 2𝑐 + 3𝑐 + 𝑐 2 + 2𝑐 2 + 7𝑐 2 + 𝑐
10𝑐 2 + 9𝑐 − 1 = (10𝑐 − 1)(𝑐 + 1) = 0
𝑐 = 0.1 𝑐 = −1 𝑟𝑒𝑗𝑒𝑐𝑡𝑒𝑑
Chapter 2| Discrete Random Variables

X 1 2 3 4 5 6 7 Sum
P(X) 0.1 0.2 0.2 0.3 0.01 0.02 0.17 1
XiP(Xi) 0.1 0.4 0.6 1.2 0.05 0.12 1.19 3.66
X2iP(Xi) 0.1 0.8 1.8 4.8 0.25 0.72 8.33 16.8
𝐸(𝑋) = ∑𝑛𝑖=0 𝑥𝑖 𝑃(𝑥𝑖 ) = 3.66
𝑉𝑎𝑟(𝑋) = 𝐸[𝑋 2 ] − (𝐸[𝑋])2 = 16.8 − (3.66)2 = 3.4.

σ = √σ2 = √3.4 = 1.844.

𝑥 2 −1
Example 7: A function 𝑓(𝑥) = , x=1, 2, 3, 4, check if 𝑓(𝑥) is a probability
25

distribution function or not?


Solution
1−1 4−1 3 9−1 8
𝑓(1) = = 0 < 1, 𝑓(2) = = <1, 𝑓(3) = = < 1,
25 25 25 25 25
16−1 15
𝑓(4) = = <1.
25 25
3 8 15 26
𝑓(1) + 𝑓(2) + 𝑓(3) + 𝑓(4) = 0 + + + = ≠1
25 25 25 25

𝑓(𝑥) is not a probability distribution function.

𝑥 2 −1
Example 8: Consider function 𝑓(𝑥) = , x=1,2,3,4 for what values of m, 𝑓(𝑥)
𝑚

is a probability distribution function? Then find 𝑝(𝑥 = 2), 𝑝(𝑥 ≤ 3), 𝑝(𝑥 =
1.5), 𝑝(𝑥 < 4), 𝑝(𝑥 < 6), and the mean, variance and standard deviation.
Solution
Satisfy the properties of the probability mass function.
1−1 4−1 9−1 16−1
𝑓(1) + 𝑓(2) + 𝑓(3) + 𝑓(4) = + + + =1
𝑚 𝑚 𝑚 𝑚

0 + 3 + 8 + 15 = 𝑚 then 𝑚 = 26
𝑥 2 −1
𝑓(𝑥) = is a probability distribution function
26
Chapter 2| Discrete Random Variables

x 1 2 3 4 Sum
1−1 4−1 3 9−1 8 16−1 15 ------
𝒇(𝒙) =0 = = =
26 26 26 26 26 26 26

0 6 24 60 90
x𝒇(𝒙)
26 26 26 26

0 12 72 240 324
𝒙𝟐 𝒇(𝒙)
26 26 26 26

3
𝑃(𝑥 = 2) = 𝑓(2) =
26
3 8 11
𝑃(𝑥 ≤ 3) = 𝑓(1) + 𝑓(2) + 𝑓(3) = 0 + + =
26 26 26

𝑃(𝑥 = 1.5) = 0
11
𝑃(𝑥 < 4) = 𝑓(1) + 𝑓(2) + 𝑓(3) =
26

𝑝(𝑥 < 6) = 1
6 24 60 90
Mean μ = ∑ x f(x)=0 + + + = =3.4615
26 26 26 26

12 72 240 90 2
Variance =var(x)= 2 =∑ x 2 f(x) − μ2 =0 + + + − ( ) =0.4793
26 26 26 26
9
Standard deviation=√var(𝑥)= .
13

4.2. The cumulative distribution function 𝑭(𝒙)


The cumulative distribution function, for a random variable X is defined by:
𝐹(𝑥) = 𝑃(𝑋 ≤ 𝑥) = ∑𝑥≤𝑥 𝑓(𝑥) , 𝑥 𝑖𝑠 𝑎𝑛𝑦 𝑟𝑒𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟, −∞ ≤ 𝑥 ≤ ∞.
The properties of the cumulative distribution function:
1- 𝐹(𝑥) is increasing.
2- lim 𝐹(𝑥) = 0, lim 𝐹(𝑥) = 1.
𝑥→−∞ 𝑥→∞

3- 𝐹(𝑥) is continuous from the right.


Chapter 2| Discrete Random Variables

Example 9: Find the cumulative distribution function of the function represented


in example 8?
Solution
We can solve in a table
x 1 2 3 4
+
3 8 15
𝒇(𝒙) 0
26 26 26

0 3 11 26
F(𝒙) =1
26 26 26

Example 10: A discrete random variable X has the following probability


distribution:
X 1 2 3 4
P(X) 0.4 0.3 0.2 𝐶

Find the value of C, find F(xi) and graph both f(x) and F(x)

Solution
∑𝑛𝑖=1 𝑃(𝑋𝑖 ) = 1 ⟹ 0.4 + 0.3 + 0.2 + 𝐶 = 1
∴ 𝐶 = 0.1

X 1 2 3 4
P(X) 0.4 0.3 0.2 0.1
F(x) 0.4 0.7 0.9 1
Chapter 2| Discrete Random Variables

The graph of both f(x) and F(x) is shown in Fig.7

Fig.7. Graph of both f(x) and F(x)

Example 11: A random variable X has the following probability distribution:


X -1 0 1 4
P(X) 0.2 0.5 a 0.1
Compute each of the following quantities.
a) a. b) P (0). c) P (X > 0). d) P (X ≥ 0). e) P (X ≤ −2).
f) The mean μ of X.
g) The variance of X. h) The standard deviation of X.
i) Draw A histogram probability distribution?
Solution:
a) Since all probabilities must add up to 1,
a = 1 −(0.2 + 0.5 + 0.1) = 0.2
b) P(0)=0.5, from the table.

X -1 0 1 4 Sum
P(X) 0.2 0.5 0.2 0.1 1
XP(X) -0.2 0 0.2 0.4 0.4
X2P(X) 0.2 0 0.2 1.6 2
Chapter 2| Discrete Random Variables

c) From the table


P (X > 0) = P (1) + P (4) = 0.2 + 0.1 = 0.3
d) From Table
P (X ≥ 0) = P (0) + P (1) + P (4) = 0.5 + 0.2 + 0.1 = 0.8
e) Since none of the numbers listed as possible values for X is less than or equal to
−2, the event X ≤ −2 is impossible, so
P (X ≤ −2) = 0
f) Using the formula in the definition of μ
μ = Σ xP (x)
= (−1) * (0.2) +(0) * (0.5) +(1) * (0.2) +(4) *(0.1) = 0.4
g) Using the formula in the definition of σ2 and the value of μ that was just computed,
σ2 = 𝐸(𝑥2)−𝜇2= 1.84
h) Using the result of part (g), σ = √1.84 = 1.3565.
i) A histogram that graphically illustrates the probability distribution in Fig.8

Fig.8. Graph of A histogram probability distribution


Chapter 2| Discrete Random Variables

4.3. Binomial Probability Distribution

Bernoulli trials are a set of independent trials with two outcomes only “success”
and “failure”. Like tossing a coin where the success could be H and the failure could
be T or vice versa. Let the probability of success be p, then the probability of failure
is ‘q = 1-p’ Let k be the number of successes.
The binomial law states that:
P [k successes in n Bernoulli trials] = 𝑃𝑛 (𝑘) = (𝑛𝑘)𝑃𝑘 (1 − 𝑃)𝑛−𝑘 = (𝑛𝑘)𝑃𝑘 𝑞 𝑛−𝑘
𝑛!
where (𝑛𝑘) = , n is the number of trials,
𝑘!(𝑛−𝑘)!

There are three characteristics of a binomial experiment.


1. There are a fixed number of trials (n trials).
2. There are only two possible outcomes, called "success" and "failure," for each
trial. The letter p denotes the probability of a success on one trial, and q denotes the
probability of a failure on one trial. p + q = 1.
3. The n trials are independent and are repeated using identical conditions.
Example 12: Suppose that we toss a fair coin 5 times, and we are interested in
determining the probability distribution of X, where X represents the number of
heads that we obtain.
Solution
We have two outcomes only “success = H” and “failure=T”.
SX ={0, 1, 2, 3, 4, 5}
p = p(H) = 0.5, q = (1-p) = p(T) = 0.5 and n= 5
∵ 𝑝𝑛 (𝑘) = (𝑛𝑘)𝑝𝑘 (1 − 𝑝)𝑛−𝑘
1
𝑝(0) = (50)0.50 (1 − 0.5)5−0 =
32
5
𝑝(1) = (51)0.51 (1 − 0.5)5−1 =
32
10
𝑝(2) = (52)0.52 (1 − 0.5)5−2 =
32
Chapter 2| Discrete Random Variables

10
𝑝(3) = (53)0.53 (1 − 0.5)5−3 =
32
5
𝑝(4) = (54)0.54 (1 − 0.5)5−4 =
32
1
𝑝(5) = (55)0.55 (1 − 0.5)5−5 =
32

Binomial Distribution
No. of heads 0 1 2 3 4 5

P(x) 1 5 10 10 5 1 ∑ P(x) = 1
32 32 32 32 32 32

Graphical Representation of the above binomial distribution in Fig.9

Fig.9. Graphical Representation of example 12 binomial distribution

4.3.1. The mean, the variance and the standard deviation of the binomial
distribution
The mean (Expectation) of the binomial distribution
E(X)= = np
The variance of the binomial distribution
Var(X)= 2 = npq
The standard deviation of the binomial distribution
SD= =√𝑣𝑎𝑟 (𝑋)=√𝑛𝑝𝑞
Chapter 2| Discrete Random Variables

Example 13: For the previous example 20, n = 5, p = ½ and q = ½ find the mean,
the variance and the standard deviation of the binomial distribution
Solution
Mean = E(X) = np = 5(½) = 2.5
SD= =√𝑛𝑝𝑞=√5 ∗ 0.5 ∗ 0.5 =1.12
Coefficient of Variation:
 1.12
CV= ∗ 100 = ∗ 100 = 44.8%
 2.5

Example 14: Suppose that a coin is tossed three times. If we assume that the tosses
are independent and the probability of heads is p, then find the probability of :
a) zero heads, b) 1 head, c) 2 heads, d) 3 heads
Solution
We have a Bernoulli experiment, then we can follow the Binomial Law, where n=3
and probability of heads is p then probability of tail is (1-p)
Let k be the number of heads
∵ 𝑝𝑛 (𝑘) = (𝑛𝑘)𝑝𝑘 (1 − 𝑝)𝑛−𝑘

𝑝(0) = (30)𝑝0 (1 − 𝑝)3−0 = (1 − 𝑝)3

𝑝(1) = (31)𝑝1 (1 − 𝑝)3−1 = 3𝑝(1 − 𝑝)2

𝑝(2) = (32)𝑝2 (1 − 𝑝)3−2 = 3𝑝2 (1 − 𝑝)

𝑝(3) = (33)𝑝3 (1 − 𝑝)3−3 = 𝑝3


Chapter 2| Discrete Random Variables

Example 15: Let k be the number of active (non-silent) speakers in a group of eight
non-interacting (i.e., independent) speakers. Suppose that a speaker is active with
probability 1/3. Find the probability that the number of active speakers is greater
than six.
Solution
We have a Bernoulli trials with two outcomes only : success (non silent) and failure
(silent), so we can use the Binomial Law, where n = 8 and probability of active
speaker is p=1/3 then probability of non-active speaker is q=(2/3)
Let k be the number of active speakers in a group of 8,
1 7 2 8−7 1 8 2 8−8
𝑝[𝑘 > 6] = 𝑝[𝑘 = 7] + 𝑝[𝑘 = 8] = (87) ( ) ( ) + (88) ( ) ( )
3 3 3 3

= 0.00244 + 0.00015 = 0.00259.

4.3.2. Cumulative Binomial

𝐵(𝑛, 𝑥; 𝑝) = 𝑃(𝑋 ≤ 𝑥) = ∑𝑥𝑘=0 𝑏(𝑛, 𝑘; 𝑝)

Example 16: Based on past experience, the probability that a certain electrical
component will be satisfactory is 0.98. The components are sampled item by item
from continuous production. In a sample of five components, what are the
probabilities of finding:

(a) Zero defectives?,

(b) Exactly one defectives?

(c) Exactly two defectives?

(d) Two or more defectives?


Chapter 2| Discrete Random Variables

Solution:

Here 𝑛 = 5, 𝑝 = 0.0.2 and 𝑞 = 1 – 𝑝 = 0.98

𝑎) 𝑃(𝑋 = 0) = (50)0.020 0.985 = 0.9039

𝑏) 𝑃(𝑋 = 1) = (51)0.021 0.984 = 0.0922

𝑐) 𝑃(𝑋 = 2) = (52)0.022 0.983 = 0.0038

𝑐) 𝑃(𝑋 ≥ 2) = 1 − [𝑃(0) + 𝑃(1)] = 0.0038

4.4. The Geometric Probability Law

The geometric distribution describes the probability of experiencing a certain


amount of failures before experiencing the first success in a series of binomial
experiments.
If a Bernoulli trial is repeated m times, then the geometric probability law finds the
probability of having the first success on the mth trial when all the trials from 1 to
m-1 are failures.
𝑝(𝑘 = 𝑚) = 𝑝(1 − 𝑝)𝑚−1
{ 𝑝(𝑘 ≥ 𝑚) = (1 − 𝑝)𝑚−1 , 𝑚 = 1,2,3, …
𝑝(𝑘 > 𝑚) = (1 − 𝑝)𝑚
There are three main characteristics of a geometric experiment.
1. There are one or more Bernoulli trials with all failures except the last one, which
is a success. In other words, you keep repeating what you are doing until the first
success. Then you stop.
2. In theory, the number of trials could go on forever. There must be at least one
trial.
3. The probability, p, of a success and the probability, q, of a failure is the same for
each trial.
Chapter 2| Discrete Random Variables

4.4.1. The geometric probability Law vs the binomial probability Law


Similarities:
The binomial and geometric distribution share the following similarities:
•The outcome of the experiments in both distributions can be classified as “success”
or “failure”.
•The probability of success is the same for each trial.
•Each trial is independent.
Differences:
Binomial distribution Geometric distribution
There is a fixed number of trials (i.e. flip a we’re interested in the number of trials
coin 3 times) required until we obtain a success (i.e. how
many flips will we need to make
before we see a Head?)
Example Example
Mr. A makes 80% of all free throws he Mr. B plays a game of luck in which she
attempts. Suppose he shoots 10 free- keeps rolling a dice until it lands on the
throws. Let X be the number of times Mr. number 4. Let X be the number of rolls until
A makes a basket during the 10 attempts. a 4 appears. What type of distribution does
What type of distribution does the random the random variable X follow?
variable X follow? Answer
Answer X follows a geometric distribution because
X follows a binomial distribution because we’re interested in estimating the number
there is a fixed number of of rolls required until we finally get a 4.
trials (10 attempts), the probability of This is not a binomial distribution because
“success” on each trial is the same, and there is not a fixed
each trial is independent. number of trials.
41
Chapter 2| Discrete Random Variables

Example 17: Suppose Mr. A owns a lightbulb manufacturing company and


determines that 3 out of every 75 bulbs are defective.
a) What is the probability that he will find the first faulty lightbulb on the 6th one that
he tested?
b) What is the probability if he wants to know the likelihood that it takes at least six
trials until he finds the first defective lightbulb?
c) What is the probability if he wants to know the likelihood that it takes more than
six trials until he finds the first defective lightbulb?
Solution
3
a) 𝑚 = 6, 𝑝 = = 0.04.
75

∵ 𝑝(𝑘 = 𝑚) = 𝑝(1 − 𝑝)𝑚−1 .


∴ 𝑝(𝑘 = 6) = 0.04(1 − 0.04)6−1 = 0.0326.
3
b) 𝑚 ≥ 6, 𝑝 = = 0.04.
75

𝑝(𝑘 ≥ 6) = (1 − 0.04)6−1 = 0.8.


3
c) 𝑚 > 6, 𝑝 = = 0.04.
75

𝑝(𝑘 > 6) = (1 − 0.04)6 = 0.783.


Example 18: Computer A sends a message to computer B over an unreliable radio
link. The message is encoded so that B can detect when errors have been introduced
into the message during transmission. If B detects an error, it requests A to retransmit
it. If the probability of a message transmission error is q=0.1, what is the probability
that a message needs to be transmitted more than two times (for error free
transmission)?
Solution
Each transmission of a message is a Bernoulli trial with probability of success p =
1-q= 0.9
𝑝(𝑘 > 2) = (1 − 𝑝)𝑘 = (1 − 0.9)2 = 0.01.
Chapter 2| Discrete Random Variables

Example 19: A sharpshooter normally hits the target 70% of the time

➢ Find the probability that her first hit is on the second shot.
𝑃(2) = 𝑝 𝑞 𝑘−1 = 0.7 0.32−1 = 0.21
➢ Find the mean
mean = 1/p = 1/0.7 =1.43
➢ Find the variance
𝑞 0.3
𝜎2 = = ≈ 0.6122
𝑝2 0.49

➢ Find the standard deviation


𝑞 √1−0.7
𝜎=√ = ≈ 0.78
𝑝 0.7

4.5. The Poisson distribution

This is a discrete distribution that is used in two situations. It is used, when


certain conditions are met, as a probability distribution in its own right, and it is also
used as a convenient approximation to the binomial distribution in some
circumstances. The distribution is named for S.D. Poisson, a French mathematician
of the nineteenth century.

The Poisson distribution applies in its own right where the possible number
of discrete occurrences is much larger than the average number of occurrences in a
given interval of time or space. The number of possible occurrences is often not
known exactly. The outcomes must occur randomly, that is, completely by chance,
and the probability of occurrence must not be affected by whether or not the
outcomes occurred previously, so the occurrences are independent. In many cases,
although we can count the occurrences, such as of a thunderstorm, we cannot count
the corresponding nonoccurrences. (We can’t count “non-storms”!)
Chapter 2| Discrete Random Variables

Examples of occurrences to which the Poisson distribution often applies


include counts from a Geiger counter, collisions of cars at a specific intersection
under specific conditions, flaws in a casting, and telephone calls to a particular
telephone or office under particular conditions. For the Poisson distribution to apply
to these outcomes, they must occur randomly.

𝜆𝑥 𝑒 −𝜆
𝑃(𝑋) = 𝑥 = 0, 1, 2, …
𝑥!

where λ is the average number of occurrences per base unit, and t is the number of
base units inspected

Consider the following scenarios:


➢ The hourly number of customers arriving at a bank
➢ The daily number of accidents on a particular stretch of highway
➢ The hourly number of accesses to a particular web server
➢ The daily number of emergency calls in Dallas
➢ The number of typos in a book
➢ The monthly number of employees who had an absence in a large company
➢ Monthly demands for a particular product

1) Mean 𝜇 = 𝐸(𝑋) = 𝜆
2) Variance 𝜎 2 = 𝜆
3) Standard Deviation 𝜎 = √𝜆

Example 20: New cases of H5 N1 Virus in New England are occurring at a rate of
about 2 per month, Find the probabilities that: 0,1, 2, 3, 4, 5, 6 cases will occur in
New England in the next month
Chapter 2| Discrete Random Variables

Solution
20 𝑒 −2
𝑃(𝑥 = 0) = = 0.135
0!
21 𝑒 −2
𝑃(𝑥 = 1) = = 0.27
1!
22 𝑒 −2
𝑃(𝑥 = 2) = = 0.27
2!
23 𝑒 −2
𝑃(𝑥 = 3) = = 0.18
3!
24 𝑒 −2
𝑃(𝑥 = 4) = = 0.09
4!

Example 21: Message arrives at a computer at an average rate of 15 messages /


second. The number of messages that arrive in 1 second is known to be a Poisson
random variable.

a) Find the probability that no messages arrive in 1 second


b) Find the probability that more than 10 messages arrive in a 1- second period

Solution
𝜆0 𝑒 −𝜆
𝑎) 𝑃(0) = = 𝑒 −15 = 3.06 ∗ 10−7
0!
15𝑖 𝑒 −15
𝑏) 𝑃(𝑥 > 10) = 1 − 𝑃(𝑛 ≤ 9) = 1 − ∑9𝑖=0 = 0.8815
𝑖!

Example 22: The mean number of people arriving per hour at a shopping center is 18.
Find the probability that the number of customers arriving in an hour is 20.

Solution
18𝑥 𝑒 −𝜆
𝜆 = 18 𝑃(𝑋 = 𝑥) =
𝑥!
180 𝑒 −18
𝑃(0) = = 0.0798
0!
Chapter 2| Discrete Random Variables

Example 23: The number of meteors(‫ )الشهب‬found by a radar system in any 30-
second interval under specified conditions averages 1.81. Assume the meteors
appear randomly and independently.
a) What is the probability that no meteors are found in a one-minute interval?
b) What is the probability of observing at least five but not more than eight
meteors in two minutes of observation?
Solution

𝑎) 𝜆 𝑡𝑖𝑚𝑒
1.81 30 𝑠𝑒𝑐𝑜𝑛𝑑 𝜆𝑛𝑒𝑤1 = 3.62/𝑚𝑖𝑛
𝜆𝑛𝑒𝑤1 60 𝑠𝑒𝑐𝑜𝑛𝑑
3.62𝑥 𝑒 −𝜆 3.620 𝑒 −3.62
𝑃(𝑋 = 𝑥) = 𝑃(0) = = 0.0268
𝑥! 0!

𝑏) 𝜆 𝑡𝑖𝑚𝑒
1.81 30 𝑠𝑒𝑐𝑜𝑛𝑑 𝜆𝑛𝑒𝑤2 = 7.24/𝑚𝑖𝑛
𝜆𝑛𝑒𝑤2 120 𝑠𝑒𝑐𝑜𝑛𝑑

𝑃(5 ≤ X ≤ 8) = 𝑃(𝑋 = 5) + 𝑃(𝑋 = 6) + 𝑃(𝑋 = 7) + 𝑃(𝑋 = 8) = 0.545

Example 24: Suppose the average number of car accidents on the highway in one
day is 4. What is the probability of no car accident in one day? What is the probability
of 1 car accidence in two days?

Solution
It is sensible to use Poisson random variable representing the number of car accidents
on the high way. Let X representing the number of car accidents on the high way in
one day. Then,
𝜆=4
Chapter 2| Discrete Random Variables

𝑒 −4 40
Then, P(No car accident in one day) = 𝑃(𝑋 = 0) = = 𝑒 −4 = 0.0183
0!

Since the average number of car accidents in one day is 4, thus the average number
of car accidents in two days should be 8. Let Y represent the number of car accidents
in two days. Then,

𝜆𝑛𝑒𝑤 = 8
𝑒 −8 81
Then, Then, P(one car accident in two days) = 𝑃(𝑋 = 1) = = 8𝑒 −8 = 0.002
1!
Chapter 2| Discrete Random Variables

Exercises

1) Find the expectation 𝜇, variance 𝜎 2 and standard deviation 𝜎 of each of the


following distributions:

𝑥 2 3 5 𝑥 -5 -4 1 2
i) ii)
𝑓(𝑥) 1/3 1/2 1/9 𝑓(𝑥) 1/4 1/8 1/2 1/8

2) A discrete random variable X has the following probability distribution:

X 1 2 3 4 5 6 7
P(X) 𝐶 2𝐶 𝐶 2𝐶 𝐶 𝐶 2𝐶
Find the value of C. Also find the mean and variance of distribution.

3) A sample of 3 items is selected at random from a box containing 12 items of


which 3 are defective. Find the expected number E of defective items.

4) A project manager for an engineering firm submitted bids on three projects. The
following table summarizes the firm’s chances of having the three projects
accepted.
Project A B C
Prob of accept 0.30 0.80 0.10
Assuming the projects are independent of one another, what is the probability that
the firm will have all three projects accepted?

5) A coin weighted so that P(H) =2/3 and P(T) =1/3 is tossed three times. The
random variable X gives the number of heads is recorded.
a) Find the random variable.
b) Find the probabilities assigns to each random variable.
Chapter 2| Discrete Random Variables

c) Find and graph the probability density function and the cumulative distribution
function.
d) Find the mean and variance of distribution

6) Find E[X] where X is the outcome when we roll a fair die.

Additional Exercises

1) A company supplying transistors claims that they produce no more than 2%


defectives. A purchaser picks 50 at random from an order of 5000 and tests the
50. If he finds more than 1 defective, he rejects the order. If the supplier’s claim
is true and 2% of the transistors are defective, what is the probability that the
order will be rejected?
2) Ten judges are asked to pick the best tasting orange juice from two samples
labeled A and B. If, in fact, A and B are the same orange juice, what is the
probability that eight or more of the judges will declare the same sample to be
the best? Assume that no judge says that they are equal.
3) A sample of eleven electric bulbs is drawn every day from those manufactured at
a plant. The eleven bulbs are tested before shipment to the customer. An analysis
of the test data collected over a number of years reveals that the probability of
finding no defective bulb in a sample of eleven bulbs is 0.5688. Probabilities of
defective bulbs are random and independent of previous results.
a) What is the probability of finding exactly three defective bulbs in a sample?
b) What is the probability of finding three or more defective bulbs in a sample?
4) The probability that a certain type of IC chip will fail after installation is 0.06. A
memory board for a computer contains twelve such chips. The operation will be
satisfactory if ten or more of the chips on the board do not fail.
a) What is the probability that a memory board operates satisfactorily?
Chapter 2| Discrete Random Variables

b) If there are five such memory boards in a given computer, what is the probability
that at least four of them operate satisfactorily?
c) State any assumptions.
5) 5% of a large lot of electrical components are defective. Six batches of four
components each are drawn from this lot at random.
a) What is the probability that any one batch contains fewer than two defectives?
b) What is the probability that at least five of the six batches contain fewer than
two defectives each?
c) State any assumptions.
6) A company is considering drilling four oil wells. The probability of success for
each well is 0.40, independent of the results for any other well. The cost of each
well is $200,000. Each well that is successful will be worth $600,000.
a) What is the probability that one or more wells will be successful?
b) What is the expected number of successes?
c) What is the expected gain?
d) What will be the gain if only one well is successful?
e) Considering all possible results, what is the probability of a loss rather than a
gain?
f) What is the standard deviation of the number of successes?
7) The number of cars entering a small parking lot is a random variable having a
Poisson distribution with a mean of 1.5 per hour. The lot holds only 12 cars.
a) Find the probability that the lot fills up in the first hour (assuming that all cars
stay in the lot longer than one hour).
b) Find the probability that more than 3 cars arrive between 9 am and 11 am.
8) Customers arrive at a checkout counter at an average rate of 1.5 per minute. What
distribution will apply if reasonable assumptions are made? List those
assumptions. Find the probabilities that
Chapter 2| Discrete Random Variables

a) Exactly two will arrive in any given minute;


b) At least three will arrive during an interval of two minutes;
c) At most 13 will arrive during an interval of six minutes.
9) Records of an electrical distribution system in a particular area indicate that over
the past twenty years there have been just six years in which lightning has not hit
a transformer. Assume that the factors affecting lightning hits on transformers
have not changed over that time, and that hits occur at random and independently.
a) Then what would be the best estimate of the average number of hits on
transformers per year?
b) In how many of the next ten years would we expect to have more than two
hits on transformers in a year?
10) 5% of the tools produced by a certain process are defective. Find the probability
that in a sample of 40 tools chosen at random, exactly three will be defective.
Calculate
a) Using the binomial distribution
b) Using the Poisson distribution as an approximation.
11) The average number of collisions occurring in a week during the summer months
at a particular intersection is 2.00. Assume that the requirements of the Poisson
distribution are satisfied.
a) What is the probability of no collisions in any particular week?
b) What is the probability that there will be exactly one collision in a week?
c) What is the probability of exactly two collisions in a week?
d) What is the probability of finding not more than two collisions in a week?
e) What is the probability of finding more than two collisions in a week?
f) What is the probability of exactly two collisions in a particular two-week
interval?

You might also like