Random Variables and Probability


Conditional, Unconditional, and Joint Probabilities

Unconditional Probability:

The marginal probability. It is the probability of an event where the occurrence of other events is not important.

Conditional Probability:

The knowledge of another event is important. The probability of A given B, or P(A|B).

P(recession | increase in interest rates) or P(R|I)

Joint Probability:

The probability that both events occur at the same time. The probability of A and B, or P(AB).

The multiplication rule for probabilities:

\[P(AB) = P(A|B)*P(B)\]

\[P(A|B) = \frac{P(AB)}{P(B)}\] Example:

  • The probability of the Fed increases rates, “I”, is 40%:
    • \(P(I) = 0.4\)
  • The probability of a recession “R” given an increase in rates is 70%:
    • \(P(R|I) = 0.7\)
  • The probability of “R” without an increase in interest rates is 10%:
    • \(P(R|I^C) = 0.1\)

Assuming that the events an increase in rates and no increase in rates are mutually exclusive and exhaustive, we can calculate

  • \(P(I^C) = 0.6\)
    • C stands for compliment

What is the probability of recession and an increase in rates

\[P(RI) = P(R|I)*P(I) = 0.7 \times 0.4 = 0.28\] What is the probability of recession and no increase in rates

\[P(RI^C) = P(R|I^C)*P(I^C) = 0.1 \times 0.6 = 0.06\]

We can now use the total probability rule:

\[P(R) = P(R|I)*P(I) + P(R|I^C)*P(I^C)\] \[P(R) = P(RI)+ P(RI^C)\] \[P(R) = 0.28 + 0.06 = 0.34\]

Bayes Formula

Given a set of prior probabilities for an event of interest, if you can receive new information, the rule for updating the probability of the event is:

\[\text{Updated Probability} = \]

\[\frac{\text{Probability of new information given event}}{\text{Unconditional probability of new information}} \times \text{Prior probability of event}\]

If you are given \(P(B)\), \(P(A|B)\), and \(P(A|B^C)\), you can then compute \(P(B|A)\).

Example:

Doxa makes dive watches. There’s speculation that Doxa will soon announce a major expansion into overseas markets. Doxa would only do this if its managers estimated the demand to be sufficient to support the sales. If demand is sufficient, Doxa would also be more likely to raise prices. Overseas = “O” and Increase Prices = “I.”

An analyst determines the following probabilities:

  • \(P(I) = 0.3 \text{ and } P(I^C) = 0.7\)
  • \(P(O|I) = 0.6\)
  • \(P(O|I^C) = 0.2\)

The probabilities \(P(I)\) and \(P(I^C)\) are called the priors. Bayes’ formula allows us to compute \(P(I|O)\) where this is the updated probability given new information about “I.”

\[P(I|O) = P(IO)/P(O)\] \[P(IO) = P(O|I)*P(I)\]

Bayes Formula:

\[P(I|O) = \frac{P(O|I)}{P(O)}\times P(I)\]

\[P(O) = P(O|I)*P(I) + P(O|I^C)*P(I^C)\]

\[P(O) = 0.6 * 0.3 + 0.2 * 0.7 = 0.32\]

\[P(I|O) = \frac{0.6}{0.32}\times{0.3} = 0.5625\]

If the new information of “expand overseas” is announced, the prior probability of P(I) = 0.3 must be updated with the new information to give P(I|O) = 0.5625.

The Addition Rule

\[P(A \text{ or } B)=P(A)+P(B)-P(AB)\]

Prob recession P(R) = 0.34, Prob interest rate hike P(I) = 0.40, P(RI) = 0.28

\[P(R \text{ or } I) = 0.34 + 0.40 - 0.28 = 0.46\]

Independent Events

Knowledge on one event has no influence on the other.

\[P(A|B) = P(A)\] \[P(B|A) = P(B)\]

\[P(A)*P(B) = P(AB)\]

Example:

P(BBB bond default) = 0.03
P(CCC bond default) = 0.45

P(Both default) = 0.03 x 0.45 = 0.0135

Example:

The DJIA closes up on \(2/3\) of all days.

P(up for 5 consecutive days) = \((2/3)^5 = 0.132\)

EV, VAR, COV, SD


Expected Value

The probability-weighted average of the possible outcomes of the random variable.

\[E(X) = \sum_{i=1}^n x_i*P(x_i)=x_1*P(x_1)+x_2*P(x_2)+\dotsc+x_n*P(x_n)\]

Event \(x_i\): Stock Return \(P(x_i)\): Prob. of event \(x_i*P(x_i)\)
Fall short of forecast -0.03 0.20 -0.0060
Meet forecast 0.01 0.45 0.0045
Exceed forecast 0.04 0.35 0.0140
Expected Value = 0.0125

Conditional Expected Value

A refined forecast that uses additional information.

Suppose that falling short, meeting, or exceeding expectations depends on weather.

  • P(fall short| good) = 0.10
  • P(meet| good) = 0.50
  • P(exceed| good) = 0.40

     

  • P(fall short| bad) = 0.30
  • P(meet| bad) = 0.40
  • P(exceed| bad) = 0.30

\[E(X|good)=-0.03*0.10+0.01*0.50+0.04*0.40=0.018\] \[E(X|bad)=-0.03*0.30+0.01*0.40+0.04*0.30=0.007\]

Variance

The expected value of the squared deviations of each observation from the random variable’s expected value.

\[\sigma^2=\sum_{i=1}^n[x_i-E(X)]^2*P(x_i)\]

Event \(x_i\) \(P(x_i)\) \(x_i*P(x_i)\) \([x_i-E(X)]^2*P(x_i)\)
Fall short of forecast -0.03 0.20 -0.0060 0.000361
Meet forecast 0.01 0.45 0.0045 0.000003
Exceed forecast 0.04 0.35 0.0140 0.000265
\(E(X)=\) 0.0125 \(\sigma^2=\) 0.000629

Standard Deviation

The positive square root of variance.

\[\sigma = \sqrt{0.000629} = 0.0251 \text{ or } 2.51\%\]

Covariance

The basic measure of how two assets move together. Covariance is the expected value of the product of the deviations of the two random variables around their respective means.

\[COV(R_i,R_j)= E\{[R_i-E(R_i)]*[R_j-E(R_j)]\}\]

The economy can experience three states. P(boom) = 0.30, p(normal) = 0.50, p(slow) = 0.20. How do the returns on stock A and B move together?

Event \(P(S)\) \(R_A\) \(R_B\) \([R_A-E(R_A)]*[R_B-E(R_B)]*P(S)\)
Boom 0.3 0.20 0.30 (0.2-0.13)(0.3-0.14)(0.3)=0.00336
Normal 0.5 0.12 0.10 (0.12-0.13)(0.1-0.14)(0.5)=0.00020
slow 0.2 0.05 0.000 (0.05-0.13)(0.0-0.14)(0.2)=0.00224
\(E(R_A)=0.13\) \(E(R_B)=0.14\) \(COV(R_A,R_B)\) 0.0058
  • The covariance of \(R_A\) with itself is the variance of \(R_A\)
  • Covariance can be zero or negative

Correlation

The strength of the linear relationship between two random variables.

\[\rho_{A,B}=\frac{COV(R_A,R_B)}{\sigma(R_A)\sigma(R_B)}\]

\[\sigma(R_A)=(0.0028)^{0.5} = 0.0529\] \[\sigma(R_B)=(0.0124)^{0.5} = 0.1114\]

\[\rho_{A,B}=\frac{0.0058}{0.0529*0.1114}=0.984\]

  • CORR 1 = perfect positive correlation
  • CORR -1 = perfect negative correlation
  • CORR 0 = no linear relationship

Application to Portfolios


The expected return of a portfolio composed of \(n\) assets is the weighted average of expected returns:

\[E(R_p) = \sum_{i=1}^n w_i \times E(R_i)\]

The portfolio variance is a function of the asset weights and the covariance of each pair:

\[VAR(R_p) = \sum_{i=1}^n \sum_{j=1}^n w_iw_jCOV(R_i,R_j)\]

Basically, you take each of the \(n^2\) pairs, multiply their portfolio weights and covariance, and sum each result. Keep in mind that the covariance of an asset and itself is just its variance.

For a 3 asset (A,B,C) portfolio:

Asset 1 Asset 2 Result
A A \(w_A^2*VAR(R_A)\)
B B \(w_B^2*VAR(R_B)\)
C C \(w_C^2*VAR(R_C)\)
A B \(w_A*w_B*COV(R_A,R_B)\)
B A \(w_A*w_B*COV(R_A,R_B)\)
A C \(w_A*w_C*COV(R_A,R_C)\)
C A \(w_A*w_C*COV(R_A,R_C)\)
B C \(w_B*w_C*COV(R_B,R_C)\)
C B \(w_B*w_C*COV(R_B,R_C)\)

\[VAR(R_p) = w_A^2*VAR(R_A) + w_B^2*VAR(R_B) + w_C^2*VAR(R_C) + \\ 2w_A*w_B*COV(R_A,R_B) + 2w_A*w_C*COV(R_A,R_C) + \\ 2w_B*w_C*COV(R_B,R_C)\]

Example:

40% in asset A, 60% in asset B

Joint Probabilities \(R_B = 0.40\) \(R_B = 0.20\) \(R_B = 0.00\)
\(R_A = 0.20\) 0.15 0 0
\(R_A = 0.15\) 0 0.60 0
\(R_A = 0.04\) 0 0 0.25

\[E(R_A) = 0.13 = 0.20*0.15 + 0.15*0.60 + 0.04*0.25\] \[E(R_B) = 0.18 = 0.40*0.15 + 0.20*0.60 + 0.00*0.25\]
\[VAR(R_A) = 0.0030 = \\0.15*(0.20-0.13)^2 + 0.6*(0.15-0.13)^2 + 0.25*(0.04-0.13)^2\]
\[VAR(R_B) = 0.0156 = \\0.15*(0.40-0.18)^2 + 0.6*(0.20-0.18)^2 + 0.25*(0.00-0.18)^2\]
\[COV(R_A,R_B) = 0.0066 = \\0.15*(0.20-0.13)*(0.40-0.18) +\\ 0.60*(0.15-0.13)*(0.20-0.18) + \\0.25*(0.04-0.13)*(0.00-0.18)\]
\[E(R_P) = 0.16 = 0.40*0.13 + 0.6*0.18\]
\[VAR(R_P) = 0.009264 = \\0.40^2*0.003 + 0.60^2*0.0156 + 2*0.40*0.60*0.0066\]