Lec 5
Lec 5
College of Engineering
Department of Electrical and Electronic Engineering
Lecture-5
) Random variables)
Note that the sign of integration here corresponds to the sign of the sum in the case
of the discrete random variable.
1
Definition: Let X be such a random variable. We say that X is a continuous random
variable if there exists a nonnegative function f, defined for all real x ∈ (−∞,∞),
having the property that, for any set B of real numbers,
…………………………………..(1)
In words, Equation (1) states that the probability that X will be in B may be obtained
by integrating the probability density function over the set B. Since X must assume
some value, f must satisfy
………………………(2)
Example-1: Find the value of the constant C that satisfies the first and second
conditions of the probability density function in the following function:
1- Calculate the probability that X is in the range from 1 to 2.
2- Calculate the probability that X does not belong to the range from 1 to 2
2
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
(b)
………..(3)
Assuming a, b are two points in the domain of definition of x where b > a .
Calculates the probability that X belongs to the domain [a, b]
3
Example 3: For the density function of Example 3, find F(x), and use it to evaluate
P (0 < X ≤ 1).
Sol.: For −1 < x < 2,
4
Example-4: Let the continuous random variable X denote the current measured in a
thin copper wire in mA. Assume that the range of X is [0, 20 mA], and assume that
the probability density function of X is f (x) = 0.05 for 0 ≤ x ≤ 20. What is the
probability that a current measurement (1) is less than 10 mA, (2) less than 5 and
greater than 20?
Sol.
The probability density function is shown in Fig.1. It is assumed that f (x) = 0
wherever it is not specifically defined. The probability requested is indicated by the
shaded area in Fig. below.
(1)
(2)
• Expected Value
Suppose X is a continues random variable with probability density function f(x).
the mean or expected value of X, denoted as E(X) or 𝜇, is
∞
𝜇 = 𝐸(𝑋) = ∫−∞ 𝑥𝑓(𝑥)𝑑𝑥 ………(4)
5
Example-5: Let X be a random variable that follows the exponential distribution
with parameter 𝜆, that is,
Sol.
Example 6: Let X be a random variable with the following density function, and Y
= g(x) = 3x² - 2x . Calculate E(Y)
6
• E(XY) = E(X)E(Y) . If the two variables are independent
• Variance
The variance of X, denoted as Var(X), V(X) or 𝜎 2 , is
∞ ∞
𝜎 2 = 𝑉(𝑋) = ∫−∞(𝑥 − 𝜇)2 𝑓(𝑥)𝑑𝑥 = ∫−∞ 𝑥 2 𝑓(𝑥)𝑑𝑥 − 𝜇2 …………(5)
𝜎 = √𝜎 2 …………………………(6)
Example-7: Let the continuous random variable X denote the current measured in
a thin copper wire in mA. Assume that the range of X is [0, 20 mA], and assume
that the probability density function of X is f (x) = 0.05 for 0 ≤ x ≤ 20. Find the
mean and variance of X.
Sol.
▪ Moments
Moments and variances are applications of expectation a function. We
distinguish between two types of moments: the nth general moment and the nth
central moment
i. The nth general moments
A function of particular importance is g (x) = xn , since this leads to the nth
general moments of the random variable. Thus,
7
∞
𝜇𝑛′ = 𝐸(𝑋 𝑛 ) = ∫−∞ 𝑥 𝑛 𝑓(𝑥)𝑑𝑥……………………………(7)
Note: By far the most important moments of X are those given by n = l , which is
the mean value discussed above, and by n = 2, which leads to the mean-square
value.
∞
𝜇2′ = 𝐸(𝑋 2 ) = ∫−∞ 𝑥 2 𝑓(𝑥)𝑑𝑥……………………(8)
The importance of the mean-square value lies in the fact that it may often be
interpreted as being equal to the time average of the square of a random voltage or
current. In such cases, the mean-square value is proportional to the average power
(in a resistor) and its square root is equal to the rms or effective value of the
random voltage or current.
ii. The nth central moments تشتت القيمة عن املتوسط الحسابي
It is also possible to define nth central moments, which are simply the moments
of the difference between a random variable and its mean value. Thus the nth
central moment is الدرجة صفر يساوي واحد
من
∞
𝜇𝑛 = 𝐸[(𝑋 − 𝜇)𝑛 ] = ∫−∞(𝑥 − 𝜇)𝑛 𝑓(𝑥)𝑑𝑥…………..(9)
من الدرجة واحد يساوي صفر
Example-8: To illustrate some of the above ideas concerning mean values and
moments, consider a random variable having a uniform probability density function
as shown in Figure below. A voltage waveform that would lead to such a probability
density function might be a sawtooth waveform that varied linearly between 20 and
40 V. The appropriate mathematical representation for this density function is
This value is the average value of the sawtooth waveform just described. The mean
square value is obtained
8
The variance of the random variable can be obtained
The value o f k can b e determined from the 0th moment of f (x) since that is just
the area of the density function and must be 1 . Thus,
9
H.W.
1- Find the density function of the variable X if the distribution function is as
follows:
2- The random variable X takes values on interval [1-∞]and has the following
probability density function
3 5
𝑓(𝑥) = 𝑥 −2 𝑑𝑥
2
Calculate the mean and variance and standard deviation.
i. The nth general moment of X is defined as E(Xn) if the expectation
exists.
ii. The nth central moment of X is defined as E(X -𝜇)n if the expectation
exists.
3- Let the continuous random variable X denote the diameter of a hole drilled
in a sheet metal component. The target diameter is 12.5 mm. Most random
disturbances to the process result in larger diameters. Historical data show
that the distribution of X can be modeled by a probability density function f
(x) = 20 e -20(x-12.5), x ≥ 12.5. If a part with a diameter larger than 12.60
millimeters is scrapped, what proportion of parts is scrapped? What
proportion of parts is between 12.5 and 12.6 millimeters?
4- Calculate the central moments of degree 0, 1, 2, and 3 for the random
variable with a density function:
10