GEC410 Note3 Module1
GEC410 Note3 Module1
A random variable is a numerical variable whose measured value can change from
one replicate of the experiment to another.
In an experiment, a measurement is usually denoted by a variable such as X. For
example, X might denote the current measurement in the copper wire experiment.
An uppercase letter is used to denote a random variable. After the experiment is
conducted, the measured value of the random variable is denoted by a lowercase
letter.
Discrete Random Variable/ Continuous Random variable
Let S be the sample space of random experiment and X be the random variable
defined on S. The random variable X is said to be discrete if the range space Rx
consist of a finite number of sample points. A discrete random variable is used to
model count data such as the number of scratches on a surface, the number of
defective parts among 1000 tested, the number of transmitted bits received in error,
the number of accidents in a year, the number of convenience options selected by
an automobile buyer, the number of molecules in a sample of gas.
A continuous random variable is a random variable with an interval (either finite or
infinite) of real numbers for its range.
Examples of continuous random variables: electrical current, length, pressure,
temperature, time, voltage, weight
Probability Distributions.
The set of all possible values of a random variable X together with their associated
probabilities is called the probability distribution of the random variable X. The
probability distribution of a discrete random variable is often referred to as the
probability mass function (pmf) and denoted by 𝑓(𝑥) = 𝑃(𝑋 = 𝑥) 𝑎𝑛𝑑
0 ≤ 𝑓(𝑥) ≤ 1 𝑎𝑛𝑑 ∑𝑎𝑙𝑙 𝑥 𝑓(𝑥) = 1 .
Example.
Let X be the number of heads that appear when a fair coin is thrown three times.
Give the probability distribution of X.
Example.
Let the discrete random variable X have the probability density function
1
, 𝑥 = 1,2,3,4,5,6
𝑓(𝑥) = {6
0, 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
(a). Show that f(x) is indeed a probability function. (b). Find 𝑝(1 < 𝑥 ≤ 3).
Solution.
(a). We need to show that 𝑓(𝑥) ≥ 0 𝑎𝑛𝑑 ∑ 𝑓(𝑥) = 1
1
(i). 𝑓(𝑥) = > 0 ∀𝑥.
6
1 1 1
(ii). ∑ 𝑓(𝑥) = 𝑓(1) + 𝑓(2) + ⋯ + 𝑓(6) = + + ⋯ + = 1
6 6 6
(b). The probability 𝑝(1 < 𝑥 ≤ 3) = 𝑝(𝑥 = 2 𝑜𝑟 𝑥 = 3)
1 1 1
= 𝑝(𝑥 = 2) + 𝑝(𝑥 = 3) = + =
6 6 3
4. 𝑓(𝑥) = 𝑑𝐹(𝑥)
𝑑𝑥
Example .
3𝑥 2 , 𝑓𝑜𝑟 0 < 𝑥 < 1
𝑓(𝑥) = {
0, 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
3 3
(a). Show that f(x) is indeed a probability function. (b). Find 𝑝(− < 𝑥 < ) (c)
4 4
Obtain the cumulative distribution F(X)
Solution.
1
(a). (𝑖). 𝑓(𝑥) = 3𝑥 2 > 0 𝑓𝑜𝑟 0 < 𝑥 < 1 (ii).∫ 𝑓(𝑥)𝑑𝑥 = ∫0 3𝑥 2 𝑑𝑥 = 𝑥 3 | 10 = 1,
therefore f(x) is a probability density function.
3 3
3 3 0 54
(b). 𝑝 (− < 𝑥 < ) = ∫ 3𝑥 2 𝑑𝑥 = ∫−3 3𝑥 2 𝑑𝑥 + ∫04 3𝑥 2 𝑑𝑥 =
4
3
4 4 − 4 64
4
a.)𝐸[𝑋] = 𝛴𝑥𝑓(𝑥)
1 3 3 1 3
𝐸[𝑥] = 𝛴𝑥𝑓(𝑥) = 0 + 1 + 2 + 3 =
8 8 8 8 2
b).𝐸[𝑥 2 ] = 𝛴𝑥 2 𝑓(𝑥)
1 1 1 1 1 1 91
𝐸[𝑥 2 ] = 𝛴𝑥 2 𝑓(𝑥) = 12 + 22 + 32 + 42 + 52 + 62 =
6 6 6 6 6 6 6
Exercise.
1. The random variable X has the following probability function
1, 𝑓𝑜𝑟 0 < 𝑥 < 1
𝑓(𝑥) = {
0, 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
Calculate the first 4 moments of X
2. The random variable X has the following probability function
3𝑥 2 , 𝑓𝑜𝑟 0 < 𝑥 < 1
𝑓(𝑥) = {
0, 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
Calculate the first 4 moments of X.