RandomVari_2
RandomVari_2
Definition: A random variable is a function that associates a real number with each elementin
the sample space. (or simply a real-valued function defined on the sample space, S.)
Example 2.1: Suppose a sampling plan involves sampling items from a process until a defective
is observed. Let X be a random variable defined by the number of items observed before a
defective is found.
sample spaces are S = {D} given X = 1, S = {ND} given X = 2, S = {NND} given X = 3, and so on.
The set of ordered pairs (x, p(x)) is a probability function, probability mass function, or
probability distribution of the discrete random variable X if, for each possible outcome x,
If a sample space contains an infinite number of possibilities equal to the number of points on a
line segment, it is called a continuous sample space.
The function f(x) is a probability density function (pdf) for the continuous random variable X,
defined over the set of real numbers, if
1. f(x) ≥ 0 for allx∈ ℛ
∞
2. ∫;∞ 𝑓(𝑥)𝑑𝑥 = 1
𝑏
3. 𝑃(𝑎 < 𝑋 < 𝑏) = ∫𝑎 𝑓(𝑥)𝑑𝑥
The cumulative distribution function F(x) of a continuous random variable X with density
function f(x) is
𝑥
𝐹(𝑥) = 𝑃(𝑋 ≤ 𝑥) = ∫ 𝑓(𝑥)𝑑𝑥
;∞
As an immediate consequence of the, one can write the two results
𝑑𝐹(𝑥)
𝑃(𝑎 < 𝑥 < 𝑏) = 𝐹(𝑏) − 𝐹(𝑎) 𝑎𝑛𝑑 𝑓(𝑥) =
𝑑𝑥
Example2.2: Let X be a random variable giving the number of heads minus the number of tails
in three tosses of a coin. List the elements of the sample space S for the three tosses of the coin
and to each sample point assign a value w of X.
Find the probability distribution of the random variable X, assuming that the coin is biased so
that a head is twice as likely to occur as a tail.
Sample Space S={HHH, HHT, HTH, THH, HTT, THT, TTH, TTT}
𝜔1 𝜔2 𝜔8
Example 2.3:A shipment of 20 similar laptop computers to a retail outlet contains 3 that
aredefective. If a school makes a random purchase of 2 of these computers, find theprobability
distribution for the number of defectives.
Solution :Let X be a random variable whose values x are the possible numbers of
defectivecomputers purchased by the school. Then x can only take the numbers 0, 1, and 2.
3 17 3 17
. / . / 68 . /. / 51
𝑝(0) = 𝑃(𝑋 = 0) = 0 2 = 𝑝(1) = 𝑃(𝑋 = 1) = 1 1 =
20 95 20 190
. / . /
2 2
3 17
. /. / 3
𝑝(2) = 𝑃(𝑋 = 2) = 2 0 =
20 190
. /
2
The probability distribution is
x 0 1 2
68 51 3
p(x) 95 190 190
Example2.4: Suppose that the error in the reaction temperature, in ◦C, for a controlled
laboratoryexperiment is a continuous random variable X having the probability densityfunction.
𝑥2
𝑖𝑓 − 1 ≤ 𝑦 ≤ 2
𝑓(𝑦) = { 3
0 𝑜𝑡𝑒𝑟𝑤𝑖𝑠𝑒
(a) Verify that f(x) is a density function.
(b) Find P(0 < X ≤ 1).
c) Find F(x), and use it to evaluate P(0 < X ≤ 1).
b)
Therefore
0, 𝑖𝑓 𝑥 < −1
2
𝑥 +1
𝐹(𝑥) = −1 ≤𝑥 ≤2
9
{1 𝑖𝑓 𝑥 ≥ 2
Definition: Let X be a random variable with probability distribution f(x). The mean, or expected
value, of X is
𝜇 = 𝐸(𝑋) = ∑ 𝑥𝑃(𝑥) 𝑖𝑓 𝑋 𝑖𝑠 𝐷𝑖𝑠𝑐𝑟𝑒𝑡𝑒
𝑥
∞
𝜇 = 𝐸(𝑋) = ∫ 𝑥𝑓(𝑥)𝑑𝑥 𝑖𝑓 𝑋 𝑖𝑠 𝑐𝑜𝑛𝑡𝑖𝑛𝑢𝑜𝑢𝑠
;∞