Sei sulla pagina 1di 40

Chapter 2 Some Basic Probability Concepts

2.1

Experiments, Outcomes and Random Variables

A random variable is a variable whose value is unknown until it is observed. The value of a random variable results from an experiment; it is not perfectly predictable. A discrete random variable can take only a finite number of values, which can be counted by using the positive integers. Discrete variables are also commonly used in economics to record qualitative, or nonnumerical, characteristics. variables. A continuous random variable can take any real value (not just whole numbers) in an interval on the real number line.
Slide 2.1 Undergraduate Econometrics, 2nd Edition Chapter 2

In this role they are sometimes called dummy

2.2

The Probability Distribution of a Random Variable

The values of random variables are not known until an experiment is carried out, and all possible values are not equally likely. We can make probability statements about certain values occurring by specifying a probability distribution for the random variable. If event A is an outcome of an experiment, then the probability of A, which we write as P(A), is the relative frequency with which event A occurs in many repeated trials of the experiment. For any event, 0 P(A) 1, and the total probability of all possible event is one.

2.2.1 Probability Distributions of Discrete Random Variables When the values of a discrete random variable are listed with their chances of occurring, the resulting table of outcomes is called a probability function or a probability density function.
Slide 2.2 Undergraduate Econometrics, 2nd Edition Chapter 2

The probability density function spreads the total of 1 unit of probability over the set of possible values that a random variable can take. Consider a discrete random variable, X = the number of heads obtained in a single flip of a coin. The values that X can take are x = 0,1. If the coin is fair then the probability of a head occurring is 0.5. The probability density function, say f(x), for the random variable X is Coin Side tail head

x 0 1

f(x) 0.5 0.5

The probability that X takes the value 1 is 0.5 means that the two values 0 and 1 have an equal chance of occurring and, if we flipped a fair coin a very large number of times, the value x = 1 would occur 50 percent of the time. We can denote this as P[X
Slide 2.3 Undergraduate Econometrics, 2nd Edition Chapter 2

= 1] = f(1) = 0.5, where P[X = 1] is the probability of the event that the random variable X = 1. For a discrete random variable X the value of the probability density function f(x) is the probability that the random variable X takes the value x, f(x) = P(X=x). Therefore, 0 f(x) 1 and, if X takes n values x1, .., xn, then
f ( x1 ) + f ( x2 ) + L + f ( xn ) = 1.

2.2.2 The Probability Density Function of A Continuous Random Variable For the continuous random variable Y the probability density function f(y) can be represented by an equation, which can be described graphically by a curve. For continuous random variables the area under the probability density function corresponds to probability. For example, the probability density function of a continuous random variable Y might be represented as in Figure 2.1. The total area under a probability density function is 1,
Slide 2.4 Undergraduate Econometrics, 2nd Edition Chapter 2

and the probability that Y takes a value in the interval [a, b], or P[a Y b], is the area under the probability density function between the values y = a and y = b. This is shown in Figure 2.1 by the shaded area. Since a continuous random variable takes an uncountable infinite number of values, the probability of any one occurring is zero. That is, P[Y = a] = P[a Y a] = 0. In calculus, the integral of a function defines the area under it, and therefore

P[a Y b] =

b y =a

f ( y)dy .

For any random variable x, the probability that x is less than or equal to a is denoted F(a). F(x) is the cumulative distribution function (cdf). For a discrete random variable,

F ( x) =

x f ( x) = Prob( X x) X

Slide 2.5 Undergraduate Econometrics, 2nd Edition Chapter 2

In view of the definition of f(x), f ( xi ) = F ( xi ) F ( xi1) For a continuous random variable,


F ( x) = and
f ( x) = dF ( x) dx In both the continuous and discrete cases, F(x) must satisfy the following properties:
Slide 2.6 Undergraduate Econometrics, 2nd Edition Chapter 2

f (t )dt

1. 0 F ( x) 1. 2. If x y , then F ( x) F ( y) . 3. F (+) = 1. 4. F () = 0 . 5. Prob(a < x b) = F (b) F (a) .

Slide 2.7 Undergraduate Econometrics, 2nd Edition Chapter 2

2.3

Expected Values Involving a Single Random Variable

When working with random variables, it is convenient to summarize their probability characteristics using the concept of mathematical expectation. These expectations will make use of summation notation.

2.3.1 The Rules of Summation 1. If X takes n values x1, ..., xn then their sum is

x
i =1

= x1 + x2 + L + xn

2. If a is a constant, then

a = na
i =1
Slide 2.8 Undergraduate Econometrics, 2nd Edition Chapter 2

3. If a is a constant then it can be pulled out in front of a summation

ax
i =1 n

=a xi
i =1

4. If X and Y are two variables, then

( x + y ) = x + y
i =1 i i i =1 i i =1

5. If a and b are constants, then

(a + bx ) =na + b x
i =1 i i =1 n n

6. If X and Y are two variables, then

(ax + by ) = a x + b y
i =1 i i i =1 i i =1

Slide 2.9 Undergraduate Econometrics, 2nd Edition Chapter 2

7. The arithmetic mean (average) of n values of X is

x=

x
i =1

x1 + x2 + L + xn . n

Also,

(x x ) = 0
i =1 i

8. We often use an abbreviated form of the summation notation. For example, if f(x) is a function of the values of X,

f (x ) = f (x ) + f (x ) +L + f (x )
= f ( xi ) ("Sum over all values of the index i") = f ( x) ("Sum over all possible values of X ")
x i i =1 i 1 2 n

Slide 2.10 Undergraduate Econometrics, 2nd Edition Chapter 2

9. Several summation signs can be used in one expression. Suppose the variable Y takes n values and X takes m values, and let f(x,y) = x+y. Then the double summation of this function is

f ( x , y ) = ( x + y )
i =1 j =1 i j i =1 j =1 i j

To evaluate such expressions work from the innermost sum outward. First set i=1 and sum over all values of j, and so on. To illustrate, let m = 2 and n = 3. Then

f ( x , y ) = f ( x , y ) + f ( x , y ) + f ( x , y )
i =1 j =1 i j i =1 i 1 i 2 i 3

= f ( x1 , y1 ) + f ( x1 , y2 ) + f ( x1 , y3 ) + f ( x2 , y1 ) + f ( x2 , y2 ) + f ( x2 , y3 ) The order of summation does not matter, so

f ( x , y ) = f ( x , y )
i =1 j =1 i j j =1 i =1 i j
Slide 2.11 Undergraduate Econometrics, 2nd Edition Chapter 2

2.3.2 The Mean of a Random Variable The expected value of a random variable X is the average value of the random variable in an infinite number of repetitions of the experiment (repeated samples); it is denoted E[X]. If X is a discrete random variable which can take the values x1, x2,,xn with probability density values f(x1), f(x2),, f(xn), the expected value of X is

E[ X ] = x1 f ( x1 ) + x2 f ( x2 ) + L + xn f ( xn ) = xi f ( xi )
i =1 n

(2.3.1)

= xf ( x)
x

Slide 2.12 Undergraduate Econometrics, 2nd Edition Chapter 2

If X is a continuous random variable, the expected value of X is

E[ X ] = xf ( x)dx
x

The notation

means integral over the entire range of values of x.

2.3.3 Expectation of a Function of a Random Variable If X is a discrete random variable and g(X) is a function of it, then E[ g ( X )] = g ( x) f ( x)
x

(2.3.2a)

Slide 2.13 Undergraduate Econometrics, 2nd Edition Chapter 2

However, E[ g ( X )] g[ E ( X )] in general. If X is a discrete random variable and g(X) = g1(X) + g2(X), where g1(X) and g2(X) are functions of X, then

E[ g ( X )] = [ g1 ( x) + g 2 ( x)] f ( x)
x

= g1 ( x) f ( x) + g 2 ( x) f ( x)
x x

(2.3.2b)

= E[ g1 ( x)] + E[ g 2 ( x)]

The expected value of a sum of functions of random variables, or the expected value of a sum of random variables, is always the sum of the expected values.

Slide 2.14 Undergraduate Econometrics, 2nd Edition Chapter 2

The idea of how to determine the expected value of a function of a continuous random variable Y, say g(y), is exactly the same as in the discrete case. The terms g(y) must be weighted by f(y) and then all those products summed. This operation is carried out via integration, but the interpretation of the result is the same. Specifically, if Y is a continuous random variable, then E[ g ( y)] = g ( y) f ( y)dy
y

Some properties of mathematical expectation work for both discrete and continuous
random variable. For the discrete case, these results are shown as follows: 1. If c is a constant,

E[c] = c
2. If c is a constant and X is a random variable, then

(2.3.3a)

E[cX ] = cE[ X ]
Undergraduate Econometrics, 2nd Edition Chapter 2

(2.3.3b)
Slide 2.15

3. If a and c are constants and X is a random variable, then

E[ a + cX ] = a + cE[ X ]
4. If a, b, and c are constants and X and Y are random variables, then

(2.3.3c)

E[aX + bY + c] = aE[ X ] + bE[Y ] + c


A conditional mean is the mean of the conditional distribution and is defined by
E[ y | x] = yf ( y | x)
y

if y is discrete if y is continuous

E[ y | x] = yf ( y | x)dy
y

The conditional mean function E[y|x] is called the regression of y on x.

Slide 2.16 Undergraduate Econometrics, 2nd Edition Chapter 2

2.3.4 The Variance of a Random Variable The variance of a discrete or continuous random variable X, based on the rules in Section 2.3.3, is defined as the expected value of g ( X ) = [ X E ( X )]2 . Algebraically,
var( X ) = 2 = E[ g ( X )] = E[ X E ( X )]2 = E[ X ]2 = E[ X 2 ] [ E ( X )]2 = ( x )2 f ( x)
x

(2.3.4) if x is discrete if x is continuous

= ( x )2 f ( x)dx
x

where E[ X ] = . Examining g(X) = [X E(X)]2, we observe that the variance of a random variable is the average squared difference between the random variable X and its mean variable E[X]. Thus, the variance of a random variable is the weighted
Slide 2.17 Undergraduate Econometrics, 2nd Edition Chapter 2

average of the squared differences (or distances) between the values x of the random variable X and the mean (center of the probability density function) of the random variable. The larger the variance of a random variable, the greater the average squared distance between the values of the random variable and its mean, or the more spread out are the values of the random variable. Let a and c be constants, and let Z = a + cX. Then Z is a random variable and its variance is var(a + cX) = E[(a + cX) E(a + cX)]2 = c2var(X) The result in Equation (2.3.5) says that if you: 1. Add a constant to a random variable it does not affect its variance, or dispersion. This fact follows, since adding a constant to a random variable shifts the location of its probability density function but leaves its shape, and dispersion, unaffected.
Slide 2.18 Undergraduate Econometrics, 2nd Edition Chapter 2

(2.3.5)

2. Multiply a random variable by a constant, the variance is multiplied by the square of the constant. The square root of the variance of a random variable is called the standard deviation; it is denoted by . It, too, measures the spread or dispersion of a distribution, and it has the advantage of being in the same units of measure as the random variable. A conditional variance is the variance of the conditional distribution:

var[ y | x] = E[( y E[ y | x])2 | x] = ( y E[ y | x])2 f ( y | x)


y

if y is discrete if y is continuous

var[ y | x] = ( y E[ y | x])2 f ( y | x)dy


y

The computation can be simplified by using var[y|x] = E[y2|x] (E[y|x])2.

Slide 2.19 Undergraduate Econometrics, 2nd Edition Chapter 2

Two other measures often used to describe a probability distribution are skewness = E[( x )3] and kurtosis = E[( x )4 ] Skewness is a measure of the asymmetry of a distribution. For symmetric

distributions, f ( x) = f ( + x) and skewness = 0. For asymmetric distributions, the skewness will be positive (negative) if the long tail is in the positive (negative) direction. Kurtosis is a measure of the thickness of the tails of the distribution.

Slide 2.20 Undergraduate Econometrics, 2nd Edition Chapter 2

Two common measures are


3 skewness coefficient = E[( x ) ] 3

and E[( x )4 ] 3 degree of excess = 4 The second is based on the normal distribution, which has excess of zero.

Slide 2.21 Undergraduate Econometrics, 2nd Edition Chapter 2

2.4

Using Joint Probability Density Functions

Frequently we want to make probability statements about more than one random variable at a time. To answer probability questions involving two or more random variables, we must know their joint probability density function. For the continuous random variables X and Y, we use f(x,y) to represent their joint density function. A typical joint density function might look something like Figure 2.3. See Example 2.5.

2.4.1 Marginal Probability Density Functions If X and Y are two discrete random variables then

Slide 2.22 Undergraduate Econometrics, 2nd Edition Chapter 2

f ( x ) = f ( x, y )
y

for each value X can take (2.4.1)

f ( y ) = f ( x, y )
x

for each value Y can take

Note that the summations in Equation (2.4.1) are over the other random variable, the one that we are eliminating from the joint probability density function. If the random variables are continuous the same idea works, with integrals replacing the summation sign as follows:

f ( x) = f ( x, y)dy
y

f ( y) = f ( x, y)dx
x

Slide 2.23 Undergraduate Econometrics, 2nd Edition Chapter 2

2.4.2 Conditional Probability Density Functions Often the chances of an event occurring are conditional on the occurrence of another event. For discrete random variables X and Y, conditional probabilities can be calculated from the joint probability density function f(x,y) and the marginal probability density function of the conditioning random variables. Specifically, the probability that the random variable X takes the value x given that Y = y, is written P[X = x|Y = y]. This conditional probability is given by the conditional probability density function f(x|y):

Slide 2.24 Undergraduate Econometrics, 2nd Edition Chapter 2

f ( x | y ) = P[ X = x | Y = y ] =

f ( x, y ) f ( y) (2.4.2) f ( x, y ) f ( x)

f ( y | x) = P[Y = y | X = x] =

2.4.3 Independent Random Variables Two random variables are statistically independent, or independently distributed, if knowing the value that one will take does not reveal anything about what value the other may take. When random variables are statistically independent, their joint probability density function factors into the product of their individual probability density functions, and vice versa. If X and Y are independent random variables, then

f ( x, y ) = f ( x ) f ( y )
Undergraduate Econometrics, 2nd Edition Chapter 2

(2.4.3)
Slide 2.25

for each and every pair of values x and y. The converse is also true. If X1, , Xn are statistically independent the joint probability density function can be factored and written as f(x1,x2,,xn) = f1(x1)f2(x2)fn(xn) (2.4.4)

If X and Y are independent random variables, then the conditional probability density function of X, given that Y = y is f ( x, y ) f ( x ) f ( y ) = = f ( x) f ( y) f ( y)

f ( x | y) =

(2.4.5)

for each and every pair of values x and y. The converse is also true.
Slide 2.26 Undergraduate Econometrics, 2nd Edition Chapter 2

2.5

The Expected Value of a Function of Several Random Variables: Covariance and Correlation

In economics we are usually interested in exploring relationships between economic variables. The covariance literally indicates the amount of covariance exhibited by the two random variables. If X and Y are random variables, then their covariance is

cov( X , Y ) = E[( X E[ X ])(Y E[Y ])]

(2.5.1)

If X and Y are discrete random variables, f(x,y) is their joint probability density function, and g(X,Y) is a function of them, then

Slide 2.27 Undergraduate Econometrics, 2nd Edition Chapter 2

E[ g ( X , Y )] = g ( x, y ) f ( x, y )
x y

(2.5.2)

If X and Y are discrete random variables and f(x,y) is their joint probability density function, then

cov( X , Y ) = E[( X E[ X ])(Y E[Y ])] (2.5.3) = [ x E ( X )][ y E (Y )] f ( x, y )


x y

If X and Y are continuous random variables, then the definition of covariance is similar, with integrals replacing the summation signs as follows: cov( X ,Y ) =
x

f ( x, y)dxdy y
Slide 2.28

Undergraduate Econometrics, 2nd Edition Chapter 2

The sign of the covariance between two random variables indicates whether their association is positive (direct) or negative (inverse). The covariance between X and Y is expected, or average, value of the random product [X E(X)][Y E(Y)]. If two random variables have positive covariance then they tend to be positively (or directly) related. See Figure 2.4. The values of two random variables with negative covariance tend to be negatively (or inversely) related. See Figure 2.5. Zero covariance implies that there is neither positive nor negative association between pairs of values. See Figure 2.6. The magnitude of covariance is difficult to interpret because it depends on the units of measurement of the random variables. The meaning of covariation is revealed more clearly if we divide the covariance between X and Y by their respective standard deviations. The resulting ratio is defined as the correlation between the random variables X and Y. If X and Y are random variables then their correlation is

Slide 2.29 Undergraduate Econometrics, 2nd Edition Chapter 2

cov( X , Y ) = xy var( X ) var(Y ) x y

(2.5.4)

If X and Y are independent random variables then the covariance and correlation between them are zero. The converse of this relationship is not true. Independent random variables X and Y have zero covariance, indicating that there is no linear association between them. However, just because the covariance or correlation between two random variables is zero does not mean that they are necessarily independent. Zero covariance means that there is no linear association between the random variables. Even if X and Y have zero covariance, they might have a nonlinear association, like X2 + Y2 = 1. If a, b, c, and d are constants and X and Y are random variables, then cov(aX + bY , cX + dY ) = ac var( X ) + bd var(Y ) + (ad + bc)cov( X ,Y )
Slide 2.30 Undergraduate Econometrics, 2nd Edition Chapter 2

Proof:

cov(aX + bY , cX + dY ) = E[((aX + bY ) E[aX + bY ])((cX + dY ) E[cX + dY ])] = E[(aX + bY aE[ X ] bE[Y ])(cX + dY cE[ X ] dE[Y ])] = E[(a( X E[ X ]) + b(Y E[Y ]))(c( X E[ X ]) + d (Y E[Y ]))] = E[ac( X E[ X ])2 + bd (Y E[Y ])2 + (ad + bc)( X E[ X ])(Y E[Y ])] = acE[( X E[ X ])2 ] + bdE[(Y E[Y ])2 ] + (ad + bc) E[( X E[ X ])(Y E[Y ])] = ac var( X ) + bd var(Y ) + (ad + bc)cov( X ,Y )

Slide 2.31 Undergraduate Econometrics, 2nd Edition Chapter 2

2.5.1 The Mean of a Weighted Sum of Random Variables Let the function g(X,Y) = aX + bY where a and b are constants. This is called a weighted sum. Now use Equation (2.5.2) to find the expectation

E[ aX + bY ] = aE[ X ] + bE[Y ]

(2.5.5)

This rule says that the expected value of a weighted sum of two random variables is the weighted sum of their expected values. This rule works for any number of random variables whether they are discrete or continuous. If X and Y are random variables, then
E [ X + Y ] = E [ X ] + E [Y ]

(2.5.6)

Slide 2.32 Undergraduate Econometrics, 2nd Edition Chapter 2

In general, the expected value of any sum is the sum of the expected values.

2.5.2 The Variance of a Weighted Sum of Random Variables


If X, Y, and Z are random variables and a, b, and c are constants, then

var[aX + bY + cZ] = a2var[X] + b2var[Y] + c2var[Z] + 2abcov[X,Y] + 2accov[X,Z] + 2bccov[Y,Z] Proof: (2.5.7)

Slide 2.33 Undergraduate Econometrics, 2nd Edition Chapter 2

var[aX + bY + cZ ]
= E[((aX + bY + cZ ) E[aX + bY + cZ ])2 ] = E[(a( X E[ X ]) + b(Y E[Y ]) + c(Z E[Z ]))2 ] = E[a2 ( X E[ X ])2 + b2 (Y E[Y ])2 + c2 (Z E[Z ])2 + 2ab( X E[ X ])(Y E[Y ]) + 2ac( X E[ X ])(Z E[Z ]) + 2bc(Y E[Y ])(Z E[Z ])] = a2 E[( X E[ X ])2 ] + b2 E[(Y E[Y ])2 ] + c2 E[(Z E[Z ])2 ] + 2abE[( X E[ X ])(Y E[Y ])] + 2acE[( X E[ X ])(Z E[Z ])] + 2bcE[(Y E[Y ])(Z E[Z ])] = a2 var( X ) + b2 var(Y ) + c2 var(Z ) + 2ab cov( X ,Y ) + 2ac cov( X , Z ) + 2bc cov(Y , Z )

If X, Y, and Z are independent, or uncorrelated, random variables, then the covariance

terms are zero and: var[aX + bY + cZ] = a2var[X] + b2var[Y] + c2var[Z]


Undergraduate Econometrics, 2nd Edition Chapter 2

(2.5.8)
Slide 2.34

If X, Y, and Z are independent, or uncorrelated, random variables, and if a = b = c = 1,

then var[X + Y + Z] = var[X] + var[Y] + var[Z] (2.5.9)

When the variance of a sum is the sum of the variances, the random variables

involved must be independent, or uncorrelated.

Slide 2.35 Undergraduate Econometrics, 2nd Edition Chapter 2

2.6

The Normal Distribution

If X is a normally distributed random variable with mean and variance 2,

symbolized as X ~ N(,2), then its probability density function is expected mathematically as:
( x ) 2 f ( x) = exp , 2 2 2 2 1

< x<

(2.6.1)

where exp[a] denotes the exponential function ea. The mean and variance 2 are the parameters of this distribution and they determine its location and dispersion. The range of the continuous normal random variable is minus infinity to plus infinity. See Figure 2.7.

Slide 2.36 Undergraduate Econometrics, 2nd Edition Chapter 2

A standard normal random variable is one that has a normal probability density function with mean 0 and variance 1. If, X ~ N(,2)then

Z=

X ~ N (0,1)

If X ~ N(,2) and a is a constant, then a X a P[ X a ] = P = P Z If X ~ N(,2) and a and b are constants, then

(2.6.2)

b a X b a = P Z P[ a X b] = P
Undergraduate Econometrics, 2nd Edition Chapter 2

(2.6.3)
Slide 2.37

When using Table 1, and Equations (2.6.2) and (2.6.3), to compute normal probabilities, remember that: 1. The standard normal probability density function is symmetric about zero. 2. The total amount of probability under the density function is 1. 3. Half the probability is on either side of zero. For example, if X ~ N(3,9), then using Table 1, P[4 X 6] = P[.33 Z 1] = .3413 .1293 = .212 See Figure 2.8. For the purposes of statistical testing, it is useful to know that: 1. The probability that a single observation of a normally distributed variable X will lie within 1.96 standard deviations of its mean is approximately 95%. 2. The probability that a single observation of a normally distributed variable X will lie within 2.57 standard deviations of its mean is approximately 99%.

Slide 2.38 Undergraduate Econometrics, 2nd Edition Chapter 2

2 2 2 If X 1 ~ N ( 1 , 1 ) , X 2 ~ N ( 2 , 2 ) , X 3 ~ N ( 3 , 3 ) and c1 , c2 , and c3 are constants,

then Z = c1X1 + c2X2 + c3X3 ~ N[E(Z),var(Z)] (2.6.4)

Slide 2.39 Undergraduate Econometrics, 2nd Edition Chapter 2

Exercises
2.1 2.6 2.15 2.22 2.2 2.7 2.16 2.24 2.3 2.8 2.18 2.4 2.10 2.19 2.5 2.11 2.21

Slide 2.40 Undergraduate Econometrics, 2nd Edition Chapter 2

Potrebbero piacerti anche