0% found this document useful (0 votes)
6 views11 pages

Lec 5

T

Uploaded by

engee22m53
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)
6 views11 pages

Lec 5

T

Uploaded by

engee22m53
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/ 11

University of Thi-Qar

College of Engineering
Department of Electrical and Electronic Engineering

Lecture-5
) Random variables)

Dr. Zahraa M. Baqir


Random variables:
• Continuous random variables:
▪ Probability Density Function (PDF),
▪ Cumulative Distribution Function (CDF)
▪ Expected value, variance and some of their properties.
▪ Moments.

❖ Continuous random variables:


A continuous random variable is a random variable where the data can take infinitely
many values. Where a continuous random variable X has a range in the form of an
interval on the real line. Also, for any x∈R, P(X=x)=0. Thus, we need to develop
new tools to deal with continuous random variables. Two examples are the time that
a train arrives at a specified stop and the lifetime of a transistor.
▪ Probability Density Function (PDF)
To determine the Probability Function of discrete random variable, we can provide
its PMF. However, the PMF does not work for continuous random variables, because
for a continuous random variable P(X=x) =0 for all x∈R. Instead, we can usually
define the Probability Density Function (PDF). The PDF is used to calculate the
field probability. This is done by calculating the area under the f(x) curve between
domain boundaries.

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

From Equation (1), letting B = [a, b], we obtain

………………………(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

For X to be density function, C = 1/9

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

(a) Verify that f(x) is a density function.


(b) Find P (0 < X ≤ 1).
Sol.: (a) We use Definition

(b)

▪ Cumulative Distribution Function (CDF)


The cumulative distribution function 𝐹(𝑥) of a continuous random variable 𝑋 with
𝑓(𝑥) is given by

………..(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,

Compute its expectation.

Sol.

• Expectation of a function of a random variable

Example 6: Let X be a random variable with the following density function, and Y
= g(x) = 3x² - 2x . Calculate E(Y)

• Mathematical expectation properties


• E (C) = C
• E(CX) = CE(X)
• E(X+Y) = E(X) + 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)

The standard deviation of X is

𝜎 = √𝜎 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.

The variance of X is:

▪ 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

The mean value of this random variable is obtained

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

If it were measured with an rms-reading ac voltmeter, the reading would be √33.3


V.

A uniform probability density function .

Example-9: As a second illustration of the determination of the moments of a


random variable, consider the probability density function

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,

The mean and mean-square value of X may now be calculated readily as

From these two quantities the variance becomes

Likewise, the 4th moment of X is

and the 4th central moment is given by

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

You might also like