Вы находитесь на странице: 1из 79

Random Variables (Part 2)

Dr. Raahat Devender Singh


CSED, TIET
In this lecture, we will discuss

i.  Mathematical Expectation

ii.  Median and Quartiles of Random Variables

iii.  Variance of Random Variables

iv.  Moments and Moment Generating Functions

v.  Functions of Random Variables


Mathematical Expectation

The mathematical expectation E(X) of a random variable X, also known as the


expected value, is the long-run average value of X that would emerge after a
very large number of observations.

We often denote the expected value as μX or μ.

μX = E(X) is also referred to as the mean of the random variable X,


or the mean of the probability distribution of X.

3
Mathematical Expectation

Consider a university with 15,000 students and let x be the number of courses for which a
randomly selected student is registered. The probability distribution of x is as follows:

The mean, or average value of the random variable x is

4
Mathematical Expectation

5
Mathematical Expectation

6
Mathematical Expectation for Discrete Random Variables

Example 1:
Suppose that a random variable X has the following PMF:

Find E(X), the mathematical expectation of X.

7
Mathematical Expectation for Discrete Random Variables

Example 2:

8
Mathematical Expectation for Discrete Random Variables

Solution:

9
10
Mathematical Expectation for Continuous Random Variables

Example 3:

11
Mathematical Expectation for Continuous Random Variables

Solution:

12
Mathematical Expectation for Continuous Random Variables

Example 4:

Consider a random variable X with PDF

Find E(X).

13
Mathematical Expectation: Exercise 1

Six men and five women apply for an executive position in a small company.
Two of the applicants are selected for interview. Let X denote the number of
women in the interview pool.

(a)  Find the PMF of X.


(b)  What is the expected value of X?

14
Mathematical Expectation: Solution

(a)  PMF of X:

(b)  Expected value of X:

0(3/11) + 1(6/11) + 2 (2/11) = 10/11

15
Mathematical Expectation (continued)

Let us consider a new random variable g(X), which depends on X; that is, each
value of g(X) is determined by the value of X.

16
Mathematical Expectation (continued)

Example:

17
Mathematical Expectation (continued)

Example:

18
Mathematical Expectation in Case of Joint PD

19
Mathematical Expectation in Case of Joint PD

Example 1:

Let X and Y be the random variables with joint probability distribution as shown
below. Find the expected value of g(X,Y) = XY.

20
Mathematical Expectation in Case of Joint PD

Solution:

21
Mathematical Expectation in Case of Joint PD

Example 2:

Find E(Y/X) for the density function

22
Mathematical Expectation in Case of Joint PD

Solution:

23
Properties of Mathematical Expectation

24
Median of Discrete Random Variables

The median of a discrete random variable is the "middle" value.

It is the value of X for which P(X ≤ x) is greater than or equal to 0.5


and P(X ≥ x) is greater than or equal to 0.5.

25
Median of Discrete Random Variables

26
Median of Discrete Random Variables

In this example, the median is X = 2 (because P(X ≤ 2) is equal to 0.60,


and P(X ≥ 2) is equal to 0.70).

27
Median of Continuous Random Variables

28
Median of Continuous Random Variables

29
Median of Continuous Random Variables

30
Median of Continuous Random Variables

31
Median of Continuous Random Variables

The median is the solution of the equation F(m) = 1/2

32
Median of Continuous Random Variables

The median is the solution of the equation F(m) = ½

Alternatively, the median is obtained by solving the equation

33
Median of Continuous Random Variables

Example 1

34
Median of Continuous Random Variables

Solution We need to solve the equation

35
Median of Continuous Random Variables

Solution We need to solve the equation

36
Median of Continuous Random Variables

Solution We need to solve the equation

37
Median of Continuous Random Variables

Solution We need to solve the equation

38
Median of Continuous Random Variables

Example 2

39
Median of Continuous Random Variables

Solution

40
Median of Continuous Random Variables

Solution

41
Median of Continuous Random Variables

Solution

42
Quartiles of Continuous Random Variables

Median is obtained by solving the equation

The lower quartile is obtained by solving the equation

The upper quartile is obtained by solving the equation

43
Median and Quartiles of Continuous Random Variables

Exercise

44
Median and Quartiles of Continuous Random Variables

Solution

45
Variance of Random Variables

46
Variance of Random Variables

Example:

Let the random variable X represent the number of automobiles that are used for official
business purposes on any given workday. The probability distribution for company A is

and that for company B is

Show that the variance of the probability distribution for company B is greater than that for
company A.
47
Variance of Random Variables

Solution:

48
Variance of Random Variables

Solution:

49
Variance of Random Variables: Alternative Method

50
Variance of Random Variables: Alternative Method

Example 1 (for discrete RVs)

51
Variance of Random Variables: Alternative Method

Solution (for discrete RVs)

52
Variance of Random Variables: Alternative Method

Example 2 (for continuous RVs)

53
Variance of Random Variables: Alternative Method

Solution (for continuous RVs)

54
Variance of Random Variables Related to Other Random Variables

For the random variable g(X), which is related to the random variable X, the variance
is calculated as follows:

55
Variance of Random Variables Related to Other Random Variables

Example 1 (for discrete RVs)

56
Variance of Random Variables Related to Other Random Variables

Solution (for discrete RVs)

57
Variance of Random Variables Related to Other Random Variables

Example 2 (for continuous RVs)

Let X be a random variable having the following density function.

Find the variance of the random variable g(X) = 4X + 3.

58
Variance of Random Variables Related to Other Random Variables

Solution (for discrete RVs)

First, we find μ4X+3 or E(4X+3)

59
Moments of Random Variables

60
Moments of Random Variables

The “moments” of a random variable (or of its distribution) are expected values of
powers or related functions of the random variable.

The rth moment of a random variable X about a point a is denoted by 𝜇r’


and is defined as:

61
Moments of Random Variables

If we take a = 0, 𝜇r’ will be the moment around the origin, and it will be given by

62
Moments of Random Variables

According to this definition, the 1st moment about the origin is given by
which is the same as mean.
Also, the 2nd moment about the origin is given by

So, we can write the mean and variance of a random variable as

63
Central Moments

There are some moments that are of special interest. These are defined by considering
point a as the expected value of X and these moments are called the central moments.
(Central moments are the moments around the mean.)

Central moments, denoted by 𝜇r are defined as

Or simply, 𝜇r = E [ X – E ( X ) ] r

64
Central Moments

When r = 1, 𝜇1 = 0 (the first central moment is zero)

When r = 2, (the second central moment is a measure of dispersion,


i.e., the variance of a random variable)

65
Central Moments

When r = 1, 𝜇1 = 0 (i.e., the first central moment is zero)

When r = 2, (i.e., the second central moment is the variance of a random variable)

Definition of variance from slide 46

66
Central Moments: Skewness

When r = 3, we have

The third central moment is the measure of asymmetry and is called skewness.

67
Central Moments: Kurtosis

When r = 4, we have

The fourth central moment is the measure of kurtosis, i.e., whether the values are concentrated
around the mean or are scattered. This measure defines the peakedness of the curve.

68
Skewness and Peakedness

69
Example

Consider the pdf,


f(x) = 3x2, 0≤x≤1
0, everywhere else

(a) Sketch the graph of f(x)


(b) Calculate the Mean, Median, Mode, Variance, Standard Deviation, Coefficient of Skewness,
and Coefficient of Kurtosis.

70
Solution

f(x) = 3x2, 0≤x≤1


0, everywhere else

Graph of f(x)

71
Solution (continued)

f(x) = 3x2, 0≤x≤1


0, everywhere else

Mean:

Median:

Mode: x = 1 (because the function has the maximum value at x = 1)

72
Solution (continued)

f(x) = 3x2, 0≤x≤1


0, everywhere else

Variance:

Standard Deviation:

Coefficient of Skewness: Coefficient of Kurtosis:

73
Moment Generating Functions
Although the moments of a random variable can be determined directly
using the previous definition, an alternative procedure exists.
This procedure requires us to utilize a moment-generating function.

74
Generate Moments using Moment Generating Functions
To obtain moments from a MGF, we need to differentiate the MGF and evaluate it at t = 0.

So for instance, if our moment generating function is

then, its first four moments can be calculated as

75
Support material for Page 75 of 2 Descriptive statistics_RK.pdf

76
Functions of Random Variables

77
Functions of Random Variables

From Set2_Probability_distribution_Continued.pdf

78
79

Вам также может понравиться