Econ 482
Lecture 1
I. Administration:• Introduction• Syllabus• Thursday, Jan 16th, “Lab” class is from 5-6pm in
Savery 117
II. Material:• Start of Statistical Review:
• Discrete and continuous random variables• Expected value, variance
Random variables:A random variable is any variable whose value cannot be predicted exactly
1. Discrete random variables:Random variable which has a specific (countable set)
of possible valuesExamples?
2. Continuous random variables:Random variable which can take any value of a
continuous range of values
Properties of discrete random variables
© Christopher Dougherty 1999–2006
PROBABILITY DISTRIBUTION EXAMPLE: X IS THE SUM OF TWO DICE
red 1 2 3 4 5 6
This sequence provides an example of a discrete random variable. Suppose that you have a red die which, when thrown, takes the numbers from 1 to 6 with equal probability.
© Christopher Dougherty 1999–2006
red 1 2 3 4 5 6 green
1
2
3
4
5
6
Suppose that you also have a green die that can take the numbers from 1 to 6 with equal probability.
PROBABILITY DISTRIBUTION EXAMPLE: X IS THE SUM OF TWO DICE
© Christopher Dougherty 1999–2006
red 1 2 3 4 5 6 green
1
2
3
4
5
6
We will define a random variable X as the sum of the numbers when the dice are thrown.
PROBABILITY DISTRIBUTION EXAMPLE: X IS THE SUM OF TWO DICE
© Christopher Dougherty 1999–2006
For example, if the red die is 4 and the green one is 6, X is equal to 10.
red 1 2 3 4 5 6 green
1
2
3
4
5
6 10
PROBABILITY DISTRIBUTION EXAMPLE: X IS THE SUM OF TWO DICE
© Christopher Dougherty 1999–2006
red 1 2 3 4 5 6 green
1
2
3
4
5 7
6
Similarly, if the red die is 2 and the green one is 5, X is equal to 7.
PROBABILITY DISTRIBUTION EXAMPLE: X IS THE SUM OF TWO DICE
© Christopher Dougherty 1999–2006
red 1 2 3 4 5 6 green
1 2 3 4 5 6 7
2 3 4 5 6 7 8
3 4 5 6 7 8 9
4 5 6 7 8 9 10
5 6 7 8 9 10 11
6 7 8 9 10 11 12
The table shows all the possible outcomes.
PROBABILITY DISTRIBUTION EXAMPLE: X IS THE SUM OF TWO DICE
© Christopher Dougherty 1999–2006
red 1 2 3 4 5 6 green
1 2 3 4 5 6 7
2 3 4 5 6 7 8
3 4 5 6 7 8 9
4 5 6 7 8 9 10
5 6 7 8 9 10 11
6 7 8 9 10 11 12
X 23456789
101112
If you look at the table, you can see that X can be any of the numbers from 2 to 12.
PROBABILITY DISTRIBUTION EXAMPLE: X IS THE SUM OF TWO DICE
© Christopher Dougherty 1999–2006
red 1 2 3 4 5 6 green
1 2 3 4 5 6 7
2 3 4 5 6 7 8
3 4 5 6 7 8 9
4 5 6 7 8 9 10
5 6 7 8 9 10 11
6 7 8 9 10 11 12
X f 23456789
101112
We will now define f, the frequencies associated with the possible values of X.
PROBABILITY DISTRIBUTION EXAMPLE: X IS THE SUM OF TWO DICE
© Christopher Dougherty 1999–2006
red 1 2 3 4 5 6 green
1 2 3 4 5 6 7
2 3 4 5 6 7 8
3 4 5 6 7 8 9
4 5 6 7 8 9 10
5 6 7 8 9 10 11
6 7 8 9 10 11 12
X f 2345 46789
101112
For example, there are four outcomes which make X equal to 5.
PROBABILITY DISTRIBUTION EXAMPLE: X IS THE SUM OF TWO DICE
© Christopher Dougherty 1999–2006
red 1 2 3 4 5 6 green
1 2 3 4 5 6 7
2 3 4 5 6 7 8
3 4 5 6 7 8 9
4 5 6 7 8 9 10
5 6 7 8 9 10 11
6 7 8 9 10 11 12
X f 2 13 24 35 46 57 68 59 4
10 311 212 1
Similarly you can work out the frequencies for all the other values of X.
PROBABILITY DISTRIBUTION EXAMPLE: X IS THE SUM OF TWO DICE
© Christopher Dougherty 1999–2006
red 1 2 3 4 5 6 green
1 2 3 4 5 6 7
2 3 4 5 6 7 8
3 4 5 6 7 8 9
4 5 6 7 8 9 10
5 6 7 8 9 10 11
6 7 8 9 10 11 12
X f p 2 13 24 35 46 57 68 59 4
10 311 212 1
Finally we will derive the probability of obtaining each value of X.
PROBABILITY DISTRIBUTION EXAMPLE: X IS THE SUM OF TWO DICE
© Christopher Dougherty 1999–2006
red 1 2 3 4 5 6 green
1 2 3 4 5 6 7
2 3 4 5 6 7 8
3 4 5 6 7 8 9
4 5 6 7 8 9 10
5 6 7 8 9 10 11
6 7 8 9 10 11 12
X f p 2 13 24 35 46 57 68 59 4
10 311 212 1
If there is 1/6 probability of obtaining each number on the red die, and the same on the green die, each outcome in the table will occur with 1/36 probability.
PROBABILITY DISTRIBUTION EXAMPLE: X IS THE SUM OF TWO DICE
© Christopher Dougherty 1999–2006
red 1 2 3 4 5 6 green
1 2 3 4 5 6 7
2 3 4 5 6 7 8
3 4 5 6 7 8 9
4 5 6 7 8 9 10
5 6 7 8 9 10 11
6 7 8 9 10 11 12
X f p 2 1 1/363 2 2/364 3 3/365 4 4/366 5 5/367 6 6/368 5 5/369 4 4/36
10 3 3/3611 2 2/3612 1 1/36
Hence to obtain the probabilities associated with the different values of X, we divide the frequencies by 36.
PROBABILITY DISTRIBUTION EXAMPLE: X IS THE SUM OF TWO DICE
© Christopher Dougherty 1999–2006
The distribution is shown graphically. in this example it is symmetrical, highest for X equal to 7 and declining on either side.
6__36
5__36
4__36
3__36
2__36
2__36
3__36
5__36
4__36
probability
2 3 4 5 6 7 8 9 10 11 12 X
PROBABILITY DISTRIBUTION EXAMPLE: X IS THE SUM OF TWO DICE
1 36
1 36
© Christopher Dougherty 1999–2006
Definition of E(X), the expected value of X:
EXPECTED VALUE OF A RANDOM VARIABLE
The expected value of a random variable, also known as its population mean, is the weighted average of its possible values, the weights being the probabilities attached to the values.
n
iiinn pxpxpxXE
111 ...)(
© Christopher Dougherty 1999–2006
Definition of E(X), the expected value of X:
EXPECTED VALUE OF A RANDOM VARIABLE
Note that the sum of the probabilities must be unity, so there is no need to divide by the sum of the weights.
n
iiinn pxpxpxXE
111 ...)(
© Christopher Dougherty 1999–2006
xi
x1
x2
x3
x4
x5
x6
x7
x8
x9
x10
x11
EXPECTED VALUE OF A RANDOM VARIABLE
This sequence shows how the expected value is calculated, first in abstract and then with the random variable defined in the first sequence. We begin by listing the possible values of X.
© Christopher Dougherty 1999–2006
xi pi
x1 p1
x2 p2
x3 p3
x4 p4
x5 p5
x6 p6
x7 p7
x8 p8
x9 p9
x10 p10
x11 p11
EXPECTED VALUE OF A RANDOM VARIABLE
Next we list the probabilities attached to the different possible values of X.
© Christopher Dougherty 1999–2006
xi pi xi pi
x1 p1 x1 p1
x2 p2
x3 p3
x4 p4
x5 p5
x6 p6
x7 p7
x8 p8
x9 p9
x10 p10
x11 p11
EXPECTED VALUE OF A RANDOM VARIABLE
Then we define a column in which the values are weighted by the corresponding probabilities.
© Christopher Dougherty 1999–2006
xi pi xi pi
x1 p1 x1 p1
x2 p2 x2 p2
x3 p3
x4 p4
x5 p5
x6 p6
x7 p7
x8 p8
x9 p9
x10 p10
x11 p11
EXPECTED VALUE OF A RANDOM VARIABLE
We do this for each value separately.
© Christopher Dougherty 1999–2006
xi pi xi pi
x1 p1 x1 p1
x2 p2 x2 p2
x3 p3 x3 p3
x4 p4 x4 p4
x5 p5 x5 p5
x6 p6 x6 p6
x7 p7 x7 p7
x8 p8 x8 p8
x9 p9 x9 p9
x10 p10 x10 p10
x11 p11 x11 p11
EXPECTED VALUE OF A RANDOM VARIABLE
Here we are assuming that n, the number of possible values, is equal to 11, but it could be any number.
© Christopher Dougherty 1999–2006
xi pi xi pi
x1 p1 x1 p1
x2 p2 x2 p2
x3 p3 x3 p3
x4 p4 x4 p4
x5 p5 x5 p5
x6 p6 x6 p6
x7 p7 x7 p7
x8 p8 x8 p8
x9 p9 x9 p9
x10 p10 x10 p10
x11 p11 x11 p11
S xi pi = E(X)
EXPECTED VALUE OF A RANDOM VARIABLE
The expected value is the sum of the entries in the third column.
© Christopher Dougherty 1999–2006
xi pi xi pi xi pi
x1 p1 x1 p1 2 1/36
x2 p2 x2 p2 3 2/36
x3 p3 x3 p3 4 3/36
x4 p4 x4 p4 5 4/36
x5 p5 x5 p5 6 5/36
x6 p6 x6 p6 7 6/36
x7 p7 x7 p7 8 5/36
x8 p8 x8 p8 9 4/36
x9 p9 x9 p9 10 3/36
x10 p10 x10 p10 11 2/36
x11 p11 x11 p11 12 1/36
S xi pi = E(X)
EXPECTED VALUE OF A RANDOM VARIABLE
The random variable X defined in the previous sequence could be any of the integers from 2 to 12 with probabilities as shown.
© Christopher Dougherty 1999–2006
xi pi xi pi xi pi xi pi
x1 p1 x1 p1 2 1/36 2/36
x2 p2 x2 p2 3 2/36
x3 p3 x3 p3 4 3/36
x4 p4 x4 p4 5 4/36
x5 p5 x5 p5 6 5/36
x6 p6 x6 p6 7 6/36
x7 p7 x7 p7 8 5/36
x8 p8 x8 p8 9 4/36
x9 p9 x9 p9 10 3/36
x10 p10 x10 p10 11 2/36
x11 p11 x11 p11 12 1/36
S xi pi = E(X)
EXPECTED VALUE OF A RANDOM VARIABLE
X could be equal to 2 with probability 1/36, so the first entry in the calculation of the expected value is 2/36.
© Christopher Dougherty 1999–2006
xi pi xi pi xi pi xi pi
x1 p1 x1 p1 2 1/36 2/36
x2 p2 x2 p2 3 2/36 6/36
x3 p3 x3 p3 4 3/36
x4 p4 x4 p4 5 4/36
x5 p5 x5 p5 6 5/36
x6 p6 x6 p6 7 6/36
x7 p7 x7 p7 8 5/36
x8 p8 x8 p8 9 4/36
x9 p9 x9 p9 10 3/36
x10 p10 x10 p10 11 2/36
x11 p11 x11 p11 12 1/36
S xi pi = E(X)
EXPECTED VALUE OF A RANDOM VARIABLE
The probability of x being equal to 3 was 2/36, so the second entry is 6/36.
© Christopher Dougherty 1999–2006
xi pi xi pi xi pi xi pi
x1 p1 x1 p1 2 1/36 2/36
x2 p2 x2 p2 3 2/36 6/36
x3 p3 x3 p3 4 3/36 12/36
x4 p4 x4 p4 5 4/36 20/36
x5 p5 x5 p5 6 5/36 30/36
x6 p6 x6 p6 7 6/36 42/36
x7 p7 x7 p7 8 5/36 40/36
x8 p8 x8 p8 9 4/36 36/36
x9 p9 x9 p9 10 3/36 30/36
x10 p10 x10 p10 11 2/36 22/36
x11 p11 x11 p11 12 1/36 12/36
S xi pi = E(X)
EXPECTED VALUE OF A RANDOM VARIABLE
Similarly for the other 9 possible values.
© Christopher Dougherty 1999–2006
xi pi xi pi xi pi xi pi
x1 p1 x1 p1 2 1/36 2/36
x2 p2 x2 p2 3 2/36 6/36
x3 p3 x3 p3 4 3/36 12/36
x4 p4 x4 p4 5 4/36 20/36
x5 p5 x5 p5 6 5/36 30/36
x6 p6 x6 p6 7 6/36 42/36
x7 p7 x7 p7 8 5/36 40/36
x8 p8 x8 p8 9 4/36 36/36
x9 p9 x9 p9 10 3/36 30/36
x10 p10 x10 p10 11 2/36 22/36
x11 p11 x11 p11 12 1/36 12/36
S xi pi = E(X) 252/36To obtain the expected value, we sum the entries in this column.
EXPECTED VALUE OF A RANDOM VARIABLE
© Christopher Dougherty 1999–2006
The expected value turns out to be 7. Actually, this was obvious anyway. We saw in the previous sequence that the distribution is symmetrical about 7.
EXPECTED VALUE OF A RANDOM VARIABLE
xi pi xi pi xi pi xi pi
x1 p1 x1 p1 2 1/36 2/36
x2 p2 x2 p2 3 2/36 6/36
x3 p3 x3 p3 4 3/36 12/36
x4 p4 x4 p4 5 4/36 20/36
x5 p5 x5 p5 6 5/36 30/36
x6 p6 x6 p6 7 6/36 42/36
x7 p7 x7 p7 8 5/36 40/36
x8 p8 x8 p8 9 4/36 36/36
x9 p9 x9 p9 10 3/36 30/36
x10 p10 x10 p10 11 2/36 22/36
x11 p11 x11 p11 12 1/36 12/36
S xi pi = E(X) 252/36 = 7
© Christopher Dougherty 1999–2006
Alternative notation for E(X):
E(X) = mX
Very often the expected value of a random variable is represented by m, the Greek m. If there is more than one random variable, their expected values are differentiated by adding subscripts to m.
EXPECTED VALUE OF A RANDOM VARIABLE
© Christopher Dougherty 1999–2006
Definition of E[g(X)], the expected value of a function of X:
To find the expected value of a function of a random variable, you calculate all the possible values of the function, weight them by the corresponding probabilities, and sum the results.
EXPECTED VALUE OF A FUNCTION OF A RANDOM VARIABLE
n
iiinn pxgpxgpxgXgE
111 )()(...)()(
© Christopher Dougherty 1999–2006
Definition of E[g(X)], the expected value of a function of X:
Example:
For example, the expected value of X2 is found by calculating all its possible values, multiplying them by the corresponding probabilities, and summing.
EXPECTED VALUE OF A FUNCTION OF A RANDOM VARIABLE
n
iiinn pxpxpxXE
1
221
21
2 ...)(
n
iiinn pxgpxgpxgXgE
111 )()(...)()(
© Christopher Dougherty 1999–2006
xi pi
x1 p1
x2 p2
x3 p3
… …… …… …… …… …… …… …xn pn
First you list the possible values of X and the corresponding probabilities.
EXPECTED VALUE OF A FUNCTION OF A RANDOM VARIABLE
© Christopher Dougherty 1999–2006
xi pi g(xi)
x1 p1 g(x1)x2 p2 g(x2) x3 p3 g(x3) … … …...… … …...… … …...… … …...… … …...… … …...… … …...xn pn g(xn)
Next you calculate the function of X for each possible value of X.
EXPECTED VALUE OF A FUNCTION OF A RANDOM VARIABLE
© Christopher Dougherty 1999–2006
xi pi g(xi) g(xi ) pi
x1 p1 g(x1) g(x1) p1
x2 p2 g(x2) x3 p3 g(x3) … … …...… … …...… … …...… … …...… … …...… … …...… … …...xn pn g(xn)
Then, one at a time, you weight the value of the function by its corresponding probability.
EXPECTED VALUE OF A FUNCTION OF A RANDOM VARIABLE
© Christopher Dougherty 1999–2006
xi pi g(xi) g(xi ) pi
x1 p1 g(x1) g(x1) p1
x2 p2 g(x2) g(x2) p2
x3 p3 g(x3) g(x3) p3
… … …... ……... … … …... ……... … … …... ……... … … …... ……... … … …... ……... … … …... ……... … … …... ……... xn pn g(xn) g(xn) pn
You do this individually for each possible value of X.
EXPECTED VALUE OF A FUNCTION OF A RANDOM VARIABLE
© Christopher Dougherty 1999–2006
xi pi g(xi) g(xi ) pi
x1 p1 g(x1) g(x1) p1
x2 p2 g(x2) g(x2) p2
x3 p3 g(x3) g(x3) p3
… … …... ……... … … …... ……... … … …... ……... … … …... ……... … … …... ……... … … …... ……... … … …... ……... xn pn g(xn) g(xn) pn
S g(xi) pi The sum of the weighted values is the expected value of the function of X.
EXPECTED VALUE OF A FUNCTION OF A RANDOM VARIABLE
© Christopher Dougherty 1999–2006
xi pi g(xi) g(xi ) pi xi pi
x1 p1 g(x1) g(x1) p1 2 1/36
x2 p2 g(x2) g(x2) p2 3 2/36
x3 p3 g(x3) g(x3) p3 4 3/36
… … …... ……... 5 4/36
… … …... ……... 6 5/36
… … …... ……... 7 6/36
… … …... ……... 8 5/36
… … …... ……... 9 4/36
… … …... ……... 10 3/36
… … …... ……... 11 2/36
xn pn g(xn) g(xn) pn 12 1/36
S g(xi) pi The process will be illustrated for X2, where X is the random variable defined in the first sequence. The 11 possible values of X and the corresponding probabilities are listed.
EXPECTED VALUE OF A FUNCTION OF A RANDOM VARIABLE
© Christopher Dougherty 1999–2006
xi pi g(xi) g(xi ) pi xi pi xi2
x1 p1 g(x1) g(x1) p1 2 1/36 4
x2 p2 g(x2) g(x2) p2 3 2/36 9
x3 p3 g(x3) g(x3) p3 4 3/36 16
… … …... ……... 5 4/36 25
… … …... ……... 6 5/36 36
… … …... ……... 7 6/36 49
… … …... ……... 8 5/36 64
… … …... ……... 9 4/36 81
… … …... ……... 10 3/36 100
… … …... ……... 11 2/36 121
xn pn g(xn) g(xn) pn 12 1/36 144
S g(xi) pi First you calculate the possible values of X2.
EXPECTED VALUE OF A FUNCTION OF A RANDOM VARIABLE
© Christopher Dougherty 1999–2006
xi pi g(xi) g(xi ) pi xi pi xi2 xi
2 pi
x1 p1 g(x1) g(x1) p1 2 1/36 4 0.11
x2 p2 g(x2) g(x2) p2 3 2/36 9
x3 p3 g(x3) g(x3) p3 4 3/36 16
… … …... ……... 5 4/36 25
… … …... ……... 6 5/36 36
… … …... ……... 7 6/36 49
… … …... ……... 8 5/36 64
… … …... ……... 9 4/36 81
… … …... ……... 10 3/36 100
… … …... ……... 11 2/36 121
xn pn g(xn) g(xn) pn 12 1/36 144
S g(xi) pi The first value is 4, which arises when X is equal to 2. The probability of X being equal to 2 is 1/36, so the weighted function is 4/36, which we shall write in decimal form as 0.11.
EXPECTED VALUE OF A FUNCTION OF A RANDOM VARIABLE
© Christopher Dougherty 1999–2006
xi pi g(xi) g(xi ) pi xi pi xi2 xi
2 pi
x1 p1 g(x1) g(x1) p1 2 1/36 4 0.11
x2 p2 g(x2) g(x2) p2 3 2/36 9 0.50
x3 p3 g(x3) g(x3) p3 4 3/36 16 1.33
… … …... ……... 5 4/36 25 2.78
… … …... ……... 6 5/36 36 5.00
… … …... ……... 7 6/36 49 8.17
… … …... ……... 8 5/36 64 8.89
… … …... ……... 9 4/36 81 9.00
… … …... ……... 10 3/36 100 8.83
… … …... ……... 11 2/36 121 6.72
xn pn g(xn) g(xn) pn 12 1/36 144 4.00
S g(xi) pi Similarly for all the other possible values of X.
EXPECTED VALUE OF A FUNCTION OF A RANDOM VARIABLE
© Christopher Dougherty 1999–2006
xi pi g(xi) g(xi ) pi xi pi xi2 xi
2 pi
x1 p1 g(x1) g(x1) p1 2 1/36 4 0.11
x2 p2 g(x2) g(x2) p2 3 2/36 9 0.50
x3 p3 g(x3) g(x3) p3 4 3/36 16 1.33
… … …... ……... 5 4/36 25 2.78
… … …... ……... 6 5/36 36 5.00
… … …... ……... 7 6/36 49 8.17
… … …... ……... 8 5/36 64 8.89
… … …... ……... 9 4/36 81 9.00
… … …... ……... 10 3/36 100 8.83
… … …... ……... 11 2/36 121 6.72
xn pn g(xn) g(xn) pn 12 1/36 144 4.00
S g(xi) pi
54.83The expected value of X2 is the sum of its weighted values in the final column. It is equal to 54.83. It is the average value of the figures in the previous column, taking the differing probabilities into account.
EXPECTED VALUE OF A FUNCTION OF A RANDOM VARIABLE
© Christopher Dougherty 1999–2006
xi pi g(xi) g(xi ) pi xi pi xi2 xi
2 pi
x1 p1 g(x1) g(x1) p1 2 1/36 4 0.11
x2 p2 g(x2) g(x2) p2 3 2/36 9 0.50
x3 p3 g(x3) g(x3) p3 4 3/36 16 1.33
… … …... ……... 5 4/36 25 2.78
… … …... ……... 6 5/36 36 5.00
… … …... ……... 7 6/36 49 8.17
… … …... ……... 8 5/36 64 8.89
… … …... ……... 9 4/36 81 9.00
… … …... ……... 10 3/36 100 8.83
… … …... ……... 11 2/36 121 6.72
xn pn g(xn) g(xn) pn 12 1/36 144 4.00
S g(xi) pi
54.83Note that E(X2) is not the same thing as E(X), squared. In the previous sequence we saw that E(X) for this example was 7. Its square is 49.
© Christopher Dougherty 1999–2006
Population variance of X:
The previous sequence defined the expected value of a function of a random variable X. There is only one function that is of much interest to us, at least initially: the squared deviation from the population mean.
The expected value of the squared deviation is known as the population variance of X. It is a measure of the dispersion of the distribution of X about its population mean.
POPULATION VARIANCE OF A DISCRETE RANDOM VARIABLE
i
n
iinn pxpxpxXE
1
221
21
2 )()(...)()(
2)( XE
© Christopher Dougherty 1999–2006
We will calculate the population variance of the random variable X defined in the first sequence. We start as usual by listing the possible values of X and the corresponding probabilities.
POPULATION VARIANCE OF A DISCRETE RANDOM VARIABLE
xi pi xi – m (xi – m)2 (xi – m)2 pi
2 1/36 –5 25 0.69
3 2/36 –4 16 0.89
4 3/36 –3 9 0.75
5 4/36 –2 4 0.44
6 5/36 –1 1 0.14
7 6/36 0 0 0.00
8 5/36 1 1 0.14
9 4/36 2 4 0.44
10 3/36 3 9 0.75
11 2/36 4 16 0.89
12 1/36 5 25 0.69
5.83
© Christopher Dougherty 1999–2006
Next we need a column giving the deviations of the possible values of X about its population mean. In the second sequence we saw that the population mean of X was 7.
POPULATION VARIANCE OF A DISCRETE RANDOM VARIABLE
xi pi xi – m (xi – m)2 (xi – m)2 pi
2 1/36 –5 25 0.69
3 2/36 –4 16 0.89
4 3/36 –3 9 0.75
5 4/36 –2 4 0.44
6 5/36 –1 1 0.14
7 6/36 0 0 0.00
8 5/36 1 1 0.14
9 4/36 2 4 0.44
10 3/36 3 9 0.75
11 2/36 4 16 0.89
12 1/36 5 25 0.69
5.83
7)( XEX
© Christopher Dougherty 1999–2006
When X is equal to 2, the deviation is –5.
POPULATION VARIANCE OF A DISCRETE RANDOM VARIABLE
)(XEX
xi pi xi – m (xi – m)2 (xi – m)2 pi
2 1/36 –5 25 0.69
3 2/36 –4 16 0.89
4 3/36 –3 9 0.75
5 4/36 –2 4 0.44
6 5/36 –1 1 0.14
7 6/36 0 0 0.00
8 5/36 1 1 0.14
9 4/36 2 4 0.44
10 3/36 3 9 0.75
11 2/36 4 16 0.89
12 1/36 5 25 0.69
5.83
7)( XEX
© Christopher Dougherty 1999–2006
POPULATION VARIANCE OF A DISCRETE RANDOM VARIABLE
xi pi xi – m (xi – m)2 (xi – m)2 pi
2 1/36 –5 25 0.69
3 2/36 –4 16 0.89
4 3/36 –3 9 0.75
5 4/36 –2 4 0.44
6 5/36 –1 1 0.14
7 6/36 0 0 0.00
8 5/36 1 1 0.14
9 4/36 2 4 0.44
10 3/36 3 9 0.75
11 2/36 4 16 0.89
12 1/36 5 25 0.69
5.83
7)( XEX
© Christopher Dougherty 1999–2006
Next we need a column giving the squared deviations. When X is equal to 2, the squared deviation is 25.
POPULATION VARIANCE OF A DISCRETE RANDOM VARIABLE
xi pi xi – m (xi – m)2 (xi – m)2 pi
2 1/36 –5 25 0.69
3 2/36 –4 16 0.89
4 3/36 –3 9 0.75
5 4/36 –2 4 0.44
6 5/36 –1 1 0.14
7 6/36 0 0 0.00
8 5/36 1 1 0.14
9 4/36 2 4 0.44
10 3/36 3 9 0.75
11 2/36 4 16 0.89
12 1/36 5 25 0.69
5.83
© Christopher Dougherty 1999–2006
Similarly for the other values of X.
POPULATION VARIANCE OF A DISCRETE RANDOM VARIABLE
xi pi xi – m (xi – m)2 (xi – m)2 pi
2 1/36 –5 25 0.69
3 2/36 –4 16 0.89
4 3/36 –3 9 0.75
5 4/36 –2 4 0.44
6 5/36 –1 1 0.14
7 6/36 0 0 0.00
8 5/36 1 1 0.14
9 4/36 2 4 0.44
10 3/36 3 9 0.75
11 2/36 4 16 0.89
12 1/36 5 25 0.69
5.83
© Christopher Dougherty 1999–2006
POPULATION VARIANCE OF A DISCRETE RANDOM VARIABLE
xi pi xi – m (xi – m)2 (xi – m)2 pi
2 1/36 –5 25 0.69
3 2/36 –4 16 0.89
4 3/36 –3 9 0.75
5 4/36 –2 4 0.44
6 5/36 –1 1 0.14
7 6/36 0 0 0.00
8 5/36 1 1 0.14
9 4/36 2 4 0.44
10 3/36 3 9 0.75
11 2/36 4 16 0.89
12 1/36 5 25 0.69
5.83
Now we start weighting the squared deviations by the corresponding probabilities. What do you think the weighted average will be? Have a guess.
© Christopher Dougherty 1999–2006
A reason for making an initial guess is that it may help you to identify an arithmetical error, if you make one. If the initial guess and the outcome are very different, that is a warning.
POPULATION VARIANCE OF A DISCRETE RANDOM VARIABLE
xi pi xi – m (xi – m)2 (xi – m)2 pi
2 1/36 –5 25 0.69
3 2/36 –4 16 0.89
4 3/36 –3 9 0.75
5 4/36 –2 4 0.44
6 5/36 –1 1 0.14
7 6/36 0 0 0.00
8 5/36 1 1 0.14
9 4/36 2 4 0.44
10 3/36 3 9 0.75
11 2/36 4 16 0.89
12 1/36 5 25 0.69
5.83
© Christopher Dougherty 1999–2006
We calculate all the weighted squared deviations.
POPULATION VARIANCE OF A DISCRETE RANDOM VARIABLE
xi pi xi – m (xi – m)2 (xi – m)2 pi
2 1/36 –5 25 0.69
3 2/36 –4 16 0.89
4 3/36 –3 9 0.75
5 4/36 –2 4 0.44
6 5/36 –1 1 0.14
7 6/36 0 0 0.00
8 5/36 1 1 0.14
9 4/36 2 4 0.44
10 3/36 3 9 0.75
11 2/36 4 16 0.89
12 1/36 5 25 0.69
5.83
© Christopher Dougherty 1999–2006
xi pi xi – m (xi – m)2 (xi – m)2 pi
2 1/36 –5 25 0.69
3 2/36 –4 16 0.89
4 3/36 –3 9 0.75
5 4/36 –2 4 0.44
6 5/36 –1 1 0.14
7 6/36 0 0 0.00
8 5/36 1 1 0.14
9 4/36 2 4 0.44
10 3/36 3 9 0.75
11 2/36 4 16 0.89
12 1/36 5 25 0.69
5.83
The sum is the population variance of X.
POPULATION VARIANCE OF A DISCRETE RANDOM VARIABLE
© Christopher Dougherty 1999–2006
Population variance of X
In equations, the population variance of X is usually written sX2, s being the Greek s.
POPULATION VARIANCE OF A DISCRETE RANDOM VARIABLE
2)( XE
2X
© Christopher Dougherty 1999–2006
Standard deviation of X
The standard deviation of X is the square root of its population variance. Usually written sx, it is an alternative measure of dispersion. It has the same units as X.
POPULATION VARIANCE OF A DISCRETE RANDOM VARIABLE
])[( 2XE
X
Properties of continuous random variables
© Christopher Dougherty 1999–2006
CONTINUOUS RANDOM VARIABLES
A discrete random variable is one that can take only a finite set of values. The sum of the numbers when two dice are thrown is an example.
Each value has associated with it a finite probability, which you can think of as a ‘packet’ of probability. The packets sum to unity because the variable must take one of the values.
6__
36
5__
36
4__
36
3__
36
2__
36
2__
36
3__
36
5__
36
4__
36
probability
2 3 4 5 6 7 8 9 10 11 12 X
1
36
1
36
© Christopher Dougherty 1999–2006
55 60 70 75 X65
CONTINUOUS RANDOM VARIABLES
height
However, most random variables encountered in econometrics are continuous. They can take any one of an infinite set of values defined over a range (or possibly, ranges).
As a simple example, take the temperature in a room. We will assume that it can be anywhere from 55 to 75 degrees Fahrenheit with equal probability within the range.
© Christopher Dougherty 1999–2006
55 60 70 75 X65
CONTINUOUS RANDOM VARIABLES
height
In the case of a continuous random variable, the probability of it being equal to a given finite value (for example, temperature equal to 55.473927) is always infinitesimal.
For this reason, you can only talk about the probability of a continuous random variable lying between two given values. The probability is represented graphically as an area.
© Christopher Dougherty 1999–2006
55 60 70 75 X65
CONTINUOUS RANDOM VARIABLES
7
height
56
For example, you could measure the probability of the temperature being between 55 and 56, both measured exactly.
Given that the temperature lies anywhere between 55 and 75 with equal probability, the probability of it lying between 55 and 56 must be 0.05.
© Christopher Dougherty 1999–2006
55 60 70 75 X65
CONTINUOUS RANDOM VARIABLES
57
height
Similarly, the probability of the temperature lying between 56 and 57 is 0.05.
56
0.05
© Christopher Dougherty 1999–2006
55 60 70 75 X65
CONTINUOUS RANDOM VARIABLES
57 58
height
And similarly for all the other one-degree intervals within the range.
0.05
© Christopher Dougherty 1999–2006
55 60 70 75X
65
0.05
CONTINUOUS RANDOM VARIABLES
57 58
height
The probability per unit interval is 0.05 and accordingly the area of the rectangle representing the probability of the temperature lying in any given unit interval is 0.05.
The probability per unit interval is called the probability density and it is equal to the height of the unit-interval rectangle.
© Christopher Dougherty 1999–2006
55 60 70 75 X65
0.05
CONTINUOUS RANDOM VARIABLES
f(X) = 0.05 for 55 X 75f(X) = 0 for X < 55 and X > 75
57 58
Mathematically, the probability density is written as a function of the variable, for example f(X). In this example, f(X) is 0.05 for 55 < X < 75 and it is zero elsewhere.
height
© Christopher Dougherty 1999–2006
55 60 70 75 X65
0.05
CONTINUOUS RANDOM VARIABLES
probabilitydensity
f(X)
f(X) = 0.05 for 55 X 75f(X) = 0 for X < 55 and X > 75
57 58
The vertical axis is given the label probability density, rather than height. f(X) is known as the probability density function and is shown graphically in the diagram as the thick black line.
© Christopher Dougherty 1999–2006
55 60 70 75 X65
0.05
CONTINUOUS RANDOM VARIABLES
probabilitydensity
f(X)
f(X) = 0.05 for 55 X 75f(X) = 0 for X < 55 and X > 75
Suppose that you wish to calculate the probability of the temperature lying between 65 and 70 degrees. To do this, you should calculate the area under the probability density function between 65 and 70. Typically you have to use the integral calculus to work out the area under a curve, but in this very simple example all you have to do is calculate the area of a rectangle.
© Christopher Dougherty 1999–2006
55 60 70 75 X65
0.05
CONTINUOUS RANDOM VARIABLES
The height of the rectangle is 0.05 and its width is 5, so its area is 0.25.
probabilitydensity
f(X)
0.05
5
0.25
f(X) = 0.05 for 55 X 75f(X) = 0 for X < 55 and X > 75