Econ 120A Discrete Probability Distributions

Discrete Probability Distributions

Mean and Variance

  • Population Mean (μ\mu):
    • Formula: μ=xp(x)\mu = \sum x p(x)
    • This is the average value of the random variable XX, weighted by the probabilities of each value.
  • Population Variance (σ2\sigma^2):
    • Formula: σ2=(xμ)2p(x)\sigma^2 = \sum (x - \mu)^2 p(x)
    • This measures the spread or dispersion of the random variable XX around its mean.

Example: Errors in Economics Textbooks

  • XX = number of errors per page in Economics textbooks
xp(x)x . p
00.810
10.170.17
20.020.04
SUM1

Variance Decomposition

  • Formula:
    • σ2=(xμ)2p(x)\sigma^2 = \sum (x - \mu)^2 p(x)
    • Expanding the square:
      σ2=(x22μx+μ2)p(x)\sigma^2 = \sum (x^2 - 2\mu x + \mu^2) p(x)
    • Distributing p(x)p(x):
      σ2=x2p(x)2μxp(x)+μ2p(x)\sigma^2 = \sum x^2 p(x) - 2\mu \sum x p(x) + \mu^2 \sum p(x)
    • Since μ=xp(x)\mu = \sum x p(x) and p(x)=1\sum p(x) = 1:
      σ2=x2p(x)2μ2+μ2\sigma^2 = \sum x^2 p(x) - 2\mu^2 + \mu^2
    • Simplified formula:
      σ2=x2p(x)μ2\sigma^2 = \sum x^2 p(x) - \mu^2

Example Calculation

  • Using the errors in economics textbooks example:
    • Var(X) = 0.25 – (0.21)2 = 0.2059

Expectations Operator

  • E(.) Operator:
    • Takes the weighted average of (.), where the weights are the probabilities.
    • E(X)=xp(x)=μXE(X) = \sum x p(x) = \mu_X
  • Expected Value:
    • The expected value of a random variable is the weighted average of its possible values, weighted by their probabilities of occurring.
    • Note that this is the same as the mean.
    • The expected value of random variable X is its mean.

Expected Value of Functions of Random Variables

  • If R=g(X)R = g(X), then
    • E(R)=E[g(X)]=g(x)p(x)=μRE(R) = E[g(X)] = \sum g(x) p(x) = \mu_R
    • The expected value of random variable RR (a function of the random variable XX) is also its mean.

Example Continued

  • Calculating E(X2)E(X^2)
    • Given X=x<em>1,x</em>2,,xnX = {x<em>1, x</em>2, \ldots, x_n}
    • E(X2)=x2p(x)E(X^2) = \sum x^2 p(x)
    • Note that E(X2)=0.25[E(X)]2=0.212E(X^2) = 0.25 \neq [E(X)]^2 = 0.21^2

Expected Value of Squared Deviations from the Mean

  • If g(X)=(XμX)2g(X) = (X - \mu_X)^2
    • E[g(X)]=g(x)p(x)=(xμ<em>X)2p(x)=σ</em>X2E[g(X)] = \sum g(x) p(x) = \sum (x - \mu<em>X)^2 p(x) = \sigma</em>X^2
    • Thus, E[(Xμ<em>X)2]=σ</em>X2E[(X - \mu<em>X)^2] = \sigma</em>X^2
    • The expected value of the squared deviation from the mean of the random variable XX is its variance, just like the expected value of XX is its mean.

Useful Rules for Expectations

  • If cc is any constant:
    1. E(c)=cE(c) = c
    2. E(X+c)=E(X)+E(c)=E(X)+cE(X + c) = E(X) + E(c) = E(X) + c
    3. E(cX)=cE(X)E(cX) = c E(X)

Alternative Expression of Variance

  • Using the expectations operator:
    • σ<em>X2=E[(Xμ</em>X)2]=E[X22Xμ<em>X+μ</em>X2]\sigma<em>X^2 = E[(X - \mu</em>X)^2] = E[X^2 - 2X\mu<em>X + \mu</em>X^2]
    • Applying linearity of expectation:
      =E[X2]+E[2Xμ<em>X]+E[μ</em>X2]= E[X^2] + E[-2X\mu<em>X] + E[\mu</em>X^2]
    • =E[X2]2μ<em>XE[X]+E[μ</em>X2]= E[X^2] - 2\mu<em>X E[X] + E[\mu</em>X^2]
    • =E[X2]2μ<em>Xμ</em>X+μX2= E[X^2] - 2\mu<em>X \mu</em>X + \mu_X^2
    • =E[X2]μX2= E[X^2] - \mu_X^2
  • Thus,
    • σ<em>X2=E[(Xμ</em>X)2]=E[X2]μX2\sigma<em>X^2 = E[(X - \mu</em>X)^2] = E[X^2] - \mu_X^2

Summary

  • Population mean of random variable XX:
    • μX=xp(x)=E(X)\mu_X = \sum x p(x) = E(X)
  • Population variance of random variable XX:
    • σ<em>X2=(xμ</em>X)2p(x)=x2p(x)μX2\sigma<em>X^2 = \sum (x - \mu</em>X)^2 p(x) = \sum x^2 p(x) - \mu_X^2
    • =E[(Xμ<em>X)2]=E[X2]μ</em>X2= E[(X - \mu<em>X)^2] = E[X^2] - \mu</em>X^2

Useful Rules (Revisited)

  • If cc is any constant:
    1. E(c)=cE(c) = c
    2. E(X+c)=E(X)+E(c)E(X + c) = E(X) + E(c)
    3. E(cX)=cE(X)E(cX) = c E(X)
    4. Var(X+c)=Var(X)Var(X + c) = Var(X)
    5. Var(cX)=c2Var(X)Var(cX) = c^2 Var(X)

Rules Explained

  1. Expected value of a constant (cc):
    • E[c]=cE[c] = c
  2. Expected value of the sum (X+cX + c):
    • E[X+c]=(x+c)p(x)=xp(x)+cp(x)=E[X]+cp(x)E[X + c] = \sum (x + c) p(x) = \sum x p(x) + \sum c p(x) = E[X] + c \sum p(x)
    • Since p(x)=1\sum p(x) = 1:
      E[X+c]=E[X]+c=μX+cE[X + c] = E[X] + c = \mu_X + c
  3. Expected value of the product (cXcX):
    • E[cX]=cxp(x)=cxp(x)=cE[X]=cμXE[cX] = \sum c x p(x) = c \sum x p(x) = c E[X] = c \mu_X
  4. Variance of the sum (X+cX + c):
    • Var(X+c)=((x+c)(μ<em>X+c))2p(x)=(xμ</em>X)2p(x)=Var(X)Var(X + c) = \sum ((x + c) - (\mu<em>X + c))^2 p(x) = \sum (x - \mu</em>X)^2 p(x) = Var(X)
  5. Variance of the product (cXcX):
    • Var(cX)=(cxcμ<em>X)2p(x)=c2(xμ</em>X)2p(x)=c2Var(X)Var(cX) = \sum (cx - c \mu<em>X)^2 p(x) = c^2 \sum (x - \mu</em>X)^2 p(x) = c^2 Var(X)