Course-Notes.Org
Published on Course-Notes.Org (http://www.course-notes.org)

Home > Random Variables

Random Variables

  • Log in [1] or register [2] to post comments

A random variable is a function that can take
on values corresponding to a sample point in a sample space. As
each sample point is associated with a probability value, random
variables assumes its values with a certain probability that
depends on the sample point on which the value is based. A random
variable that is defined over a discrete sample space has a
finite or countable number of possible values and is called a discrete
random variable
. A random variable that is defined over
a continuous sample space has an infinite set of possible values
and is called a continuous random variable.

Subject: 
Statistics [3]
Subject X2: 
Statistics [3]

Expected Value of a Random Variable

Expected Value of a Random Variable

The mean of a random variable, also known as its expected value, is the weighted average of all the values that a random variable would assume in the long run. The expected value of a random variable can be thought of this way: the random variable is made to assume values according to its probability distribution, all the values are recorded and the mean is computed. If this process is repeated indefinitely, the calculated mean of the values will approach some finite quantity, assuming that the mean of the random variable does exist (i.e., it does not diverge to infinity). This finite value is the mean of the random variable.

The expected value of a random variable X is denoted by E(X). For a discrete random variable, E(X) is calculated as

5rv033

EX. The random variable X has the following probability distribution:

x pX(x)
   
2 1 / 36
3 2 / 36
4 3 / 36
5 4 / 36
6 5 / 36
7 6 / 36
8 5 / 36
9 4 / 36
10 3 / 36
11 2 / 36
12 1 / 36

The random variable X assumes a value equal to the sum of two dice rolls. Its expected value is calculated as

5rv034

= 2(1/36) + 3(2/36) + 4(3/36) + 5(4/36) + 6(5/36) + 7(6/36) + 8(5/36) + 9(4/36) + 10(3/36) + 11(2/36) + 12(1/36)
= (1/36) (2 + 6 + 12 + 20 + 30 + 42 + 40 + 36 + 30 + 22 + 12)
= (252/36) = 7

In the long run, the average value of two dice rolls using regular dice is 7.

The expected value of the function g(X) of a discrete random variable X is the mean of another random variable Y which assumes the values of g(X) according to the probability distribution of X. Denoted by E[g(X)], it is calculated as

5rv035

The expected value of a discrete random variable X is actually a special case of E[g(X)], where g(X) = x.

The expected value of the function g(X,Y) of two discrete random variables, with joint probability mass function pX,Y(x,y), is denoted by E[g(X,Y)] and is calculated as

5rv036

This definition can be extended to three or more discrete random variables. In general, if a set of random variables X1 , X2, .... , Xn has a joint probability function p(x1 , x2 , ...., xn), the expected value of the function g(X1 , X2 , .... , Xn ) is given by

5rv037

EX. The random variable X that assumes the value of a dice roll has the probability mass function p(x) = 1/6 for x ÃŽ {1, 2, 3, 4, 5, 6}. If g(X) = X2, then

5rv038

= (1/6) (1 + 4 + 9 + 16 + 25 + 36)
= 91/6

EX. Two random variables X and Y have the following joint probability distribution

(x,y) pX,Y(x,y)
(1,1) 1/3
(1,2) 1/8
(2,1) 1/2
(2,2) 1/24

The expected value of the function g(X,Y) = XY is calculated as follows:

5rv039

= (1)(1)(1/3) + (1)(2)(1/8) + (2)(1)(1/2) + (2)(2)(1/24)
= 1/3 + 1/4 + 1 + 1/6
= 7/4

For any discrete random variable whose expected value exists and is E(X), the expected value of g(X) = aX + b, where a and b are constants, is given by

5rv040

From this equality,

(1) E[aX] = aE(X)
(2) E[b] = b

The first statement asserts that the expected value of a scalar function of a random variable is the product of the expected value of the random variable and the scalar value. The second statement asserts that the expected value of a constant is the constant itself.

The expected value of the sum of two discrete random variables X and Y is

5rv041

Similarly, E(X - Y) = E(X) - E(Y).

The mean of the product of two independent discrete random variables is

5rv042

The mean of the product of two independent random variables is simply the product of the mean of the two independent random variables.

 

Subject: 
Statistics [3]
Subject X2: 
Statistics [3]

Variance of a Random Variable

  • Log in [4] or register [5] to post comments

Variance of a Random Variable

The variance of a random variable is the variance of all the values that the random variable would assume in the long run. The variance of a random variable can be thought of this way: the random variable is made to assume values according to its probability distribution, all the values are recorded and their variance is computed. If this process is repeated indefinitely, the calculated variance of the values will approach some finite quantity, assuming that the variance of the random variable does exist (i.e., it does not diverge to infinity). This finite value is the variance of the random variable.

The variance of the random variable X is denoted by Var(X). For a discrete random variable, Var(X) is calculated as

5rv043

Although this formula can be used to derive the variance of X, it is easier to use the following equation:

5rv044

= E(x2) - 2E(X)E(X) + (E(X))2
= E(X2) - (E(X))2

The variance of the function g(X) of the random variable X is the variance of another random variable Y which assumes the values of g(X) according to the probability distribution of X. Denoted by Var[g(X)], it is calculated as

5rv045

EX. The random variable X that assumes the value of a dice roll has the probability mass function:
p(x) = 1/6 for x
ÃŽ {1, 2, 3, 4, 5, 6}.

5rv046

5rv047

=91/6 - 12.25
= 35/12

 5rv048

5rv049

For any random variable X whose variance is Var(X), the variance of X + b, where b is a constant, is given by

Var(X + b) = E [(X + b) - E(X + b)]2 = E[X + b - (E(X) + b)]2

= E [(X - E(X)]2
= Var(X)

i.e. the variance of a random variable does not change if a constant is added to all values of the random variable.

For any random variable X whose variance is Var(X), the variance of aX, where a is a constant, is given by

Var(aX) = E [aX - E(aX)]2 = E [aX - aE(X)]2

= a2E[(X - E(X)]2
= a2Var(X)

The variance of a scalar function of a random variable is the product of the variance of the random variable and the square of the scalar.

For any two independent random variables X and Y, E(XY) = E(X) E(Y). Thus, the variance of two independent random variables is calculated as follows:

Var(X + Y) = E[(X + Y)2] - [E(X + Y)]2

=E(X2 + 2XY + Y2) - [E(X) + E(Y)]2
=E(X2) + 2E(X)E(Y) + E(Y2) - [E(X)2 + 2E(X)E(Y) + E(Y)2]
=[E(X2) - E(X)2] + [E(Y2) - E(Y)2]
= Var(X) + Var(Y)

Note that Var(-Y) = Var((-1)(Y)) = (-1)2 Var(Y) = Var(Y). Therefore

Var(X - Y) = Var(X + (-Y)) = Var(X) + Var(-Y) = Var(X) + Var(Y)

The variance of the sum or difference of two independent random variables is the sum of the variances of the independent random variables. Similarly, the variance of the sum or difference of a set of independent random variables is simply the sum of the variances of the independent random variables in the set.

 

Subject: 
Statistics [3]
Subject X2: 
Statistics [3]

Source URL: http://www.course-notes.org/Statistics/Random_Variables

Links:
[1] http://www.course-notes.org/user/login?destination=node/478%23comment-form
[2] http://www.course-notes.org/user/register?destination=node/478%23comment-form
[3] http://www.course-notes.org/Subject/Math/Statistics
[4] http://www.course-notes.org/user/login?destination=node/505%23comment-form
[5] http://www.course-notes.org/user/register?destination=node/505%23comment-form