Chapter 2-1
Chapter 2-1
Definition
A random variable is a function that associates a real
number with each element in the sample space.
𝑋: 𝑆 → 𝑅
We shall use a capital letter, say X, to denote a random
variable and its corresponding small letter, x in this
case, for one of its values.
Definition
A random variable is called a discrete random variable if
its set of possible outcomes is countable.
Definition
A random variable can take on values on a continuous
scale, it is called a continuous random variable
EXAMPLES
Discrete Random Continuous Random
Variable Variable
Represent count data Represent measured data
the number of defectives heights
the number of accidents per
weights
years
temperatures
distance
life periods
CONCEPT OF A RANDOM VARIABLE
x 0 1 2 3
𝑷 𝑫 = 𝟎. 𝟓 𝑷 𝑵 = 𝟎. 𝟓
DDD 3 𝑷 𝑫𝑫𝑫 =𝑷 𝑫 . 𝑷 𝑫 . 𝑷 𝑫 =0.5*0.5*0.5= 1/8
DDN 𝟐 𝑷 𝑫𝑫𝑵 =𝑷 𝑫 . 𝑷 𝑫 . 𝑷 𝑵 =0.5*0.5*0.5=1/8
DND 1 𝑷 𝑫𝑵𝑫 =𝑷 𝑫 . 𝑷 𝑵 . 𝑷 𝑫 =0.5*0.5*0.5=1/8
DNN 1 𝑷 𝑫𝑵𝑵 =𝑷 𝑫 . 𝑷 𝑵 . 𝑷 𝑵 =0.5*0.5*0.5=1/8
NDD 𝟐 𝑷 𝑵𝑫𝑫 =𝑷 𝑵 . 𝑷 𝑫 . 𝑷 𝑫 =0.5*0.5*0.5=1/8
NDN 𝟏 𝑷 𝑵𝑫𝑵 =𝑷 𝑵 . 𝑷 𝑫 . 𝑷 𝑵 =0.5*0.5*0.5=1/8
NND 1 𝑷 𝑵𝑵𝑫 =𝑷 𝑵 . 𝑷 𝑵 . 𝑷 𝑫 =0.5*0.5*0.5=1/8
NNN 𝟎 𝑷 𝑵𝑵𝑵 =𝑷 𝑵 . 𝑷 𝑵 . 𝑷 𝑵 =0.5*0.5*0.5=1/8
EXAMPLE 1
A shipment of 20 similar laptop computers to a retail
outlet contains 3 that are defective. If a school makes a
random purchase of 2 of these computers, find the
probability distribution for the number of defectives.
Solution: Let x are the possible numbers of defective
computers purchased by the school. Then x can only take
the numbers 0, 1 and 2.
f(0) = P(X = 0)=136/190
f(1) = P(X = 1)=51/190
f(2) = P(X = 2)=3/190
The probability distribution of X is
x 0 1 2
f(x) 136/190 51/190 3/190
0 𝑓𝑜𝑟 𝑥 < 0
136
𝑓𝑜𝑟 0 ≤ 𝑥 < 1
190
F(x)= 187
𝑓𝑜𝑟 1 ≤ 𝑥 < 2
190
1 𝑓𝑜𝑟 𝑥 ≥ 2
Continuous probability distributions
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 all x ϵR.
∞
2. −∞ f(x) dx = 1.
𝑏
3. P(a < X < b) = 𝑎f(x ) dx
The cumulative distribution function F(x) of a
continuous random variable X with density function
𝑥
f(x) is F(x) = P(X ≤ x) = −∞ f(t) dt, for −∞ < x < ∞
EXAMPLE 2
Suppose that the error in the reaction temperature, in ◦
C, for a controlled laboratory experiment is a
continuous random variable X having the probability
density function
𝑥2
𝑓 𝑥 =ቐ3 , −1 < 𝑥 < 2
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).
Solution:
∞ 2 𝑥2 𝑥3 2
(a) −∞ f(x) dx = −1 3 dx = ฬ =1
9 −1
1 𝑥2 1
(b) P(0 < X ≤ 1)= 0 dx =
3 9
0, 𝑥 < −1
𝑥 3 +1
(c) F(x)=൞ 9 , −1 ≤𝑥<2
1, 𝑥 ≥ 2
2 1 1
P(0 < X ≤ 1)=F(1)-F(0)= − =
9 9 9
EXERCISES
1. Classify the following random variables as discrete or
continuous:
X: the number of automobile accidents per year in
Virginia.
Y : the length of time to play 18 holes of golf.
2. Let W 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 W.
3. Determine the value c so that each of the following
functions can serve as a probability distribution of
the discrete random variable X:
(a) f(x) = c(𝑥 2 + 4), for x = 0, 1, 2, 3;
2 3
(b) f(x) =c 𝑥 3−𝑥
, for x = 0, 1, 2
4. Consider the density function f 𝑥
𝑘 𝑥, 0 < 𝑥 < 1
=ቊ
0, 𝑒𝑙𝑠𝑤ℎ𝑒𝑟𝑒
(a) Evaluate k.
(b) Find F(x) and use it to evaluate P(0.3 < X < 0.6).