18

Reading 4

Quantitative Methods · Probability Trees and Conditional Expectations

MODULE 4.1: PROBABILITY MODELS, EXPECTED VALUES, AND BAYES' FORMULA

LOS 4.a

Calculate expected values, variances, and standard deviations and demonstrate their application to investment problems.

The expected value of a random variable is the weighted average of the possible outcomes for the variable. The mathematical representation for the expected value of random variable \(X\), that can take on any of the values from \(x_1\) to \(x_n\), is:

\[E(X) = \sum P(x_i) x_i = P(x_1)x_1 + P(x_2)x_2 + \dots + P(x_n)x_n\]

where:

\(P(x_i)\) = probability of outcome \(x_i\)

Example
Expected earnings per share

The probability distribution of earnings per share (EPS) for Ron's Stores is given in the following figure. Calculate the expected EPS.

EPS Probability Distribution
ProbabilityEPS
10%£1.80
20%£1.60
40%£1.20
30%£1.00
100%

Answer:

The expected EPS is simply a weighted average of each possible EPS, where the weights are the probabilities of each possible outcome:

\[E[\text{EPS}] = 0.10(1.80) + 0.20(1.60) + 0.40(1.20) + 0.30(1.00) = £1.28\]

Variance and standard deviation measure the dispersion of a random variable around its expected value, sometimes referred to as the volatility of a random variable. Variance (from a probability model) can be calculated as the probability-weighted sum of the squared deviations from the mean (or expected value). The standard deviation is the positive square root of the variance. The following example illustrates the calculations for a probability model of possible returns.

Example
Expected value, variance, and standard deviation from a probability model

Using the probabilities given in the following table, calculate the expected return on Stock A, the variance of returns on Stock A, and the standard deviation of returns on Stock A.

EventProb\(R_A\)Prob × \(R_A\)\(R_A - E(R_A)\)\([R_A - E(R_A)]^2\)Prob × \([R_A - E(R_A)]^2\)
Boom30%20%0.060.070.00490.00147
Normal50%12%0.06−0.010.00010.00005
Slow20%5%0.01−0.080.00640.00128
\(E(R_A) = 0.13\)\(\text{Var}(R_A) = 0.00280\)

Answer:

\[E(R_A) = (0.30 \times 0.20) + (0.50 \times 0.12) + (0.20 \times 0.05) = 0.13 = 13\%\]

The expected return for Stock A is the probability-weighted sum of the returns under the three different economic scenarios.

In Column 5, we have calculated the differences between the returns under each economic scenario and the expected return of 13%.

In Column 6, we squared all the differences from Column 5. In the final column, we have multiplied the probabilities of each economic scenario times the squared deviation of returns from the expected returns, and their sum, 0.00280, is the variance of \(R_A\).

The standard deviation of \(R_A = \sqrt{0.0028} = 0.0529\).

Note that in a previous reading, we estimated the standard deviation of a distribution from sample data, rather than from a probability model of returns. For the sample standard deviation, we divided the sum of the squared deviations from the mean by \(n - 1\), where \(n\) was the size of the sample. Here, we have no "n" because we have no observations; a probability model is forward-looking. We use the probability weights instead, as they describe the entire distribution of outcomes.

中文翻譯

LOS 4.a:計算期望值、變異數與標準差,並示範其在投資問題中的應用。

期望值(expected value)是隨機變數所有可能結果的加權平均。對於可以取值 \(x_1\) 到 \(x_n\) 的隨機變數 \(X\),其期望值的數學表達為:

E(X) = Σ P(xᵢ) xᵢ = P(x₁)x₁ + P(x₂)x₂ + … + P(xₙ)xₙ

其中:P(xᵢ) = 結果 xᵢ 發生的機率。

【例】期望每股盈餘(expected EPS)
Ron's Stores 的每股盈餘(EPS)機率分配如下表,求期望 EPS。

EPS 機率分配:機率 10% → EPS £1.80;機率 20% → EPS £1.60;機率 40% → EPS £1.20;機率 30% → EPS £1.00;合計 100%。

解:期望 EPS 就是每個可能 EPS 以機率為權重的加權平均:

E[EPS] = 0.10(1.80) + 0.20(1.60) + 0.40(1.20) + 0.30(1.00) = £1.28

變異數(variance)標準差(standard deviation)衡量隨機變數圍繞其期望值的離散程度,有時也稱為該隨機變數的波動度(volatility)。從機率模型計算的變異數是「以機率為權重的『與平均值(期望值)平方差』的加總」。標準差則是變異數的正平方根。下例示範如何從報酬率的機率模型計算這些量。

【例】用機率模型算期望值、變異數與標準差
根據下表機率,求 A 股票的期望報酬、變異數與標準差。

事件 Boom(榮景):機率 30%、R_A = 20%、Prob × R_A = 0.06、R_A − E(R_A) = 0.07、平方差 = 0.0049、加權平方差 = 0.00147。
事件 Normal(正常):機率 50%、R_A = 12%、Prob × R_A = 0.06、R_A − E(R_A) = −0.01、平方差 = 0.0001、加權平方差 = 0.00005。
事件 Slow(衰退):機率 20%、R_A = 5%、Prob × R_A = 0.01、R_A − E(R_A) = −0.08、平方差 = 0.0064、加權平方差 = 0.00128。
合計:E(R_A) = 0.13;Var(R_A) = 0.00280。

解:

E(R_A) = (0.30 × 0.20) + (0.50 × 0.12) + (0.20 × 0.05) = 0.13 = 13%。A 股票的期望報酬就是三個經濟情境下報酬率的機率加權總和。

第五欄計算了各情境下「實際報酬與期望報酬 13%」的差。第六欄是把第五欄的差值平方。最後一欄是把各情境機率乘上平方差,這些值的加總 0.00280 即為 R_A 的變異數。

R_A 的標準差 = √0.0028 = 0.0529

注意:先前的 Reading 中,我們是以「樣本資料」估計標準差,而非用報酬的機率模型。樣本標準差時,我們把「對平均的平方差總和」除以 \(n − 1\),其中 \(n\) 是樣本大小。這裡沒有「n」,因為沒有觀察值——機率模型是前瞻性的,我們以機率權重代替樣本,因為機率權重已描述了整個可能結果的分配。

LOS 4.b

Formulate an investment problem as a probability tree and explain the use of conditional expectations in investment application.

You may wonder where the returns and probabilities used in calculating expected values come from. A general framework, called a probability tree, is used to show the probabilities of various outcomes. In Figure 4.1, we have shown estimates of EPS for four different events: (1) a good economy and relatively good results at the company, (2) a good economy and relatively poor results at the company, (3) a poor economy and relatively good results at the company, and (4) a poor economy and relatively poor results at the company. Using the rules of probability, we can calculate the probabilities of each of the four EPS outcomes shown in the boxes on the right-hand side of the probability tree.

The expected EPS of $1.51 is simply calculated as follows:

\[(0.18 \times 1.80) + (0.42 \times 1.70) + (0.24 \times 1.30) + (0.16 \times 1.00) = \$1.51\]

Note that the probabilities of the four possible outcomes sum to 1.

Figure 4.1: A Probability Tree
  • Prob. of good economy = 60%
    • Prob. of good results = 30% → EPS = $1.80; Prob = (60% × 30%) = 18%
    • Prob. of poor results = 70% → EPS = $1.70; Prob = (60% × 70%) = 42%
  • Prob. of poor economy = 40%
    • Prob. of good results = 60% → EPS = $1.30; Prob = (40% × 60%) = 24%
    • Prob. of poor results = 40% → EPS = $1.00; Prob = (40% × 40%) = 16%

\[\text{Expected EPS} = (18\% \times \$1.80) + (42\% \times \$1.70) + (24\% \times \$1.30) + (16\% \times \$1.00) = \$1.51\]

Expected values or expected returns can be calculated using conditional probabilities. As the name implies, conditional expected values are contingent on the outcome of some other event. An analyst would use a conditional expected value to revise his expectations when new information arrives.

Consider the effect a tariff on steel imports might have on the returns of a domestic steel producer's stock in the previous example. The stock's conditional expected return, given that the government imposes the tariff, will be higher than the conditional expected return if the tariff is not imposed.

中文翻譯

LOS 4.b:將投資問題建構為機率樹(probability tree),並說明條件期望值(conditional expectations)在投資應用上的用途。

你或許會好奇,計算期望值時用到的報酬與機率究竟從哪來?一個通用的架構叫做機率樹(probability tree),用來顯示各種結果的機率。在 Figure 4.1 中,我們對四種事件估計 EPS:(1) 經濟好且公司表現相對好;(2) 經濟好但公司表現相對差;(3) 經濟差但公司表現相對好;(4) 經濟差且公司表現相對差。運用機率規則,我們可以算出機率樹右側四個方框中各 EPS 結果的機率。

期望 EPS $1.51 的計算如下:

(0.18 × 1.80) + (0.42 × 1.70) + (0.24 × 1.30) + (0.16 × 1.00) = $1.51

注意這四個可能結果的機率合計為 1。

Figure 4.1 機率樹:

  • 經濟好的機率 = 60%
    • 表現好的機率 = 30% → EPS = $1.80;聯合機率 = 60% × 30% = 18%
    • 表現差的機率 = 70% → EPS = $1.70;聯合機率 = 60% × 70% = 42%
  • 經濟差的機率 = 40%
    • 表現好的機率 = 60% → EPS = $1.30;聯合機率 = 40% × 60% = 24%
    • 表現差的機率 = 40% → EPS = $1.00;聯合機率 = 40% × 40% = 16%

期望 EPS =(18% × $1.80)+(42% × $1.70)+(24% × $1.30)+(16% × $1.00)= $1.51。

期望值或期望報酬可以用條件機率(conditional probabilities)來計算。顧名思義,條件期望值(conditional expected values)是「以某另一事件的結果為前提」下的期望值。當新資訊出現時,分析師會用條件期望值來修正自己的預期。

以前例為例,想想若政府對進口鋼鐵課徵關稅,會如何影響國內鋼鐵製造商的股票報酬。在「政府課徵關稅」此一條件下,股票的條件期望報酬會高於「未課徵關稅」條件下的條件期望報酬。

LOS 4.c

Calculate and interpret an updated probability in an investment setting using Bayes' formula.

Bayes' formula is used to update a given set of prior probabilities for a given event in response to the arrival of new information. The rule for updating prior probability of an event is as follows:

\[\text{updated probability} = \dfrac{\text{probability of new information for a given event}}{\text{unconditional probability of new information}} \times \text{prior probability of event}\]

We can derive Bayes' formula using the multiplication rule and noting that \(P(AB) = P(BA)\):

\[P(B \mid A) \times P(A) = P(BA), \text{ and } P(A \mid B) \times P(B) = P(AB)\]

Because \(P(BA) = P(AB)\), we can write \(P(B \mid A)\, P(A) = P(A \mid B)\, P(B)\), and \(\dfrac{P(B \mid A) P(A)}{P(B)}\) equals \(\dfrac{P(BA)}{P(B)}\), the joint probability of \(A\) and \(B\) divided by the unconditional probability of \(B\).

The following example illustrates the use of Bayes' formula. Note that \(A\) is outperform and \(A^C\) is underperform, \(P(BA)\) is (outperform + gains), \(P(A^C B)\) is (underperform + gains), and the unconditional probability \(P(B)\) is \(P(AB) + P(A^C B)\), by the total probability rule.

Example
Bayes' formula

There is a 60% probability that the economy will outperform—and if it does, there is a 70% probability a stock will go up and a 30% probability the stock will go down. There is a 40% probability the economy will underperform, and if it does, there is a 20% probability the stock in question will increase in value (have gains) and an 80% probability it will not. Given that the stock increased in value, calculate the probability that the economy outperformed.

Answer:

  • 60% outperform
    • 70% up → 42% (outperform + gains)
    • 30% dn → 18% (outperform + no gains)
  • 40% underperform
    • 20% up → 8% (underperform + gains)
    • 80% dn → 32% (underperform + no gains)

In the figure just presented, we have multiplied the probabilities to calculate the probabilities of each of the four outcome pairs. Note that these sum to 1. Given that the stock has gains, what is our updated probability of an outperforming economy? We sum the probability of stock gains in both states (outperform and underperform) to get \(42\% + 8\% = 50\%\). Given that the stock has gains and using Bayes' formula, the probability that the economy has outperformed is \(\dfrac{42\%}{50\%} = 84\%\).

中文翻譯

LOS 4.c:在投資情境中用貝氏公式(Bayes' formula)計算並解釋「更新後的機率」。

貝氏公式(Bayes' formula)用於「在新資訊出現時,對某事件的事前機率(prior probabilities)做更新」。其更新規則為:

更新後機率 =(在該事件為真下、新資訊出現的機率 ÷ 新資訊出現的無條件機率)× 事件的事前機率。

我們可以用乘法規則並注意到 P(AB) = P(BA) 來推導貝氏公式:

P(B|A) × P(A) = P(BA),且 P(A|B) × P(B) = P(AB)。

因為 P(BA) = P(AB),所以可寫成 P(B|A) P(A) = P(A|B) P(B);而 P(B|A) P(A) / P(B) = P(BA) / P(B),也就是 A 與 B 的聯合機率除以 B 的無條件機率。

下例示範貝氏公式的用法。注意:A 代表「景氣優於預期(outperform)」,A^C 代表「景氣不如預期(underperform)」;P(BA) 是(outperform + 股票上漲)的聯合機率;P(A^C B) 是(underperform + 股票上漲)的聯合機率;無條件機率 P(B) = P(AB) + P(A^C B),這正是「全機率法則(total probability rule)」。

【例】貝氏公式
景氣優於預期的機率為 60%;若景氣優於預期,則某股票上漲的機率為 70%、下跌為 30%。景氣不如預期的機率為 40%;若景氣不如預期,則該股票上漲(gains)的機率為 20%、未上漲為 80%。已知股票上漲,求景氣優於預期的條件機率。

解:

  • 60% outperform(景氣優於預期)
    • 70% 上漲 → 42%(outperform + gains)
    • 30% 下跌 → 18%(outperform + no gains)
  • 40% underperform(景氣不如預期)
    • 20% 上漲 → 8%(underperform + gains)
    • 80% 下跌 → 32%(underperform + no gains)

上面這張圖中,我們把機率相乘得到四個「結果配對」的聯合機率,這四個合計為 1。已知股票上漲,景氣優於預期的更新後機率是多少?我們把「outperform 與 underperform 兩種情況下股票上漲的機率」加總:42% + 8% = 50%。在「股票上漲」的條件下,用貝氏公式求得「景氣優於預期」的機率為 42% / 50% = 84%

📝 Module Quiz 4.1
1. Given the conditional probabilities in the following table and the unconditional probabilities \(P(Y = 1) = 0.3\) and \(P(Y = 2) = 0.7\), what is the expected value of \(X\)?
\(x_i\)\(P(x_i \mid Y = 1)\)\(P(x_i \mid Y = 2)\)
00.20.1
50.40.8
100.40.1
  • A. 5.0.
  • B. 5.3.
  • C. 5.7.
B — \(E(X \mid Y = 1) = (0.2)(0) + (0.4)(5) + (0.4)(10) = 6\); \(E(X \mid Y = 2) = (0.1)(0) + (0.8)(5) + (0.1)(10) = 5\); \(E(X) = (0.3)(6) + (0.7)(5) = 5.30\). (LOS 4.a)
2. An analyst believes that Davies Company has a 40% probability of earning more than $2 per share. She estimates that the probability that Davies Company's credit rating will be upgraded is 70% if its earnings per share (EPS) are greater than $2, and 20% if its EPS are $2 or less. Given the information that Davies Company's credit rating has been upgraded, what is the updated probability that its EPS are greater than $2?
  • A. 50%.
  • B. 60%.
  • C. 70%.
C — This is an application of Bayes' formula. As the following tree diagram shows, the updated probability that EPS are greater than $2 is \(\dfrac{28\%}{28\% + 12\%} = 70\%\):
  • 40% EPS > $2
    • 70% upgrade → 28% upgrade and EPS > $2
    • 30% no upgrade → 12% no upgrade and EPS > $2
  • 60% EPS < $2
    • 20% upgrade → 12% upgrade and EPS < $2
    • 80% no upgrade → 48% no upgrade and EPS < $2
(LOS 4.c)
KEY CONCEPTS
LOS 4.a

The expected value of a random variable is the weighted average of its possible outcomes:

\[E(X) = \sum P(x_i) x_i = P(x_1)x_1 + P(x_2)x_2 + \dots + P(x_n)x_n\]

Variance can be calculated as the probability-weighted sum of the squared deviations from the mean or expected value. The standard deviation is the positive square root of the variance.

LOS 4.b

A probability tree shows the probabilities of two events and the conditional probabilities of two subsequent events:

  • \(P(A)\)
    • \(P(C \mid A)\) → AC with Prob (AC)
    • \(P(D \mid A)\) → AD with Prob (AD)
  • \(P(B)\)
    • \(P(C \mid B)\) → BC with Prob (BC)
    • \(P(D \mid B)\) → BD with Prob (BD)

Conditional expected values depend on the outcome of some other event. Forecasts of expected values for a stock's return, earnings, and dividends can be refined, using conditional expected values, when new information arrives that affects the expected outcome.

LOS 4.c

Bayes' formula for updating probabilities based on the occurrence of an event \(O\) is as follows:

\[P(I \mid O) = \dfrac{P(O \mid I)}{P(O)} \times P(I)\]

Equivalently, based on the following tree diagram, \(P(A \mid C) = \dfrac{P(AC)}{P(AC) + P(BC)}\):

  • \(P(A)\)
    • \(P(C \mid A)\) → AC with Prob (AC)
    • \(P(D \mid A)\) → AD with Prob (AD)
  • \(P(B)\)
    • \(P(C \mid B)\) → BC with Prob (BC)
    • \(P(D \mid B)\) → BD with Prob (BD)
中文翻譯(重點整理)

LOS 4.a

隨機變數的期望值(expected value)= 各可能結果以機率為權重的加權平均:

E(X) = Σ P(xᵢ) xᵢ = P(x₁)x₁ + P(x₂)x₂ + … + P(xₙ)xₙ。

變異數可由「對平均(期望值)平方差的機率加權加總」計算;標準差是變異數的正平方根。

LOS 4.b

機率樹(probability tree)展示兩個事件的機率,以及兩個後續事件的條件機率:

  • P(A)
    • P(C|A) → AC,聯合機率 P(AC)
    • P(D|A) → AD,聯合機率 P(AD)
  • P(B)
    • P(C|B) → BC,聯合機率 P(BC)
    • P(D|B) → BD,聯合機率 P(BD)

條件期望值(conditional expected values)依某另一事件的結果而定。當新資訊到來、影響預期結果時,可以用條件期望值來修正對股票報酬、盈餘、股利等的期望值預測。

LOS 4.c

貝氏公式(Bayes' formula)——根據事件 O 發生來更新機率:

P(I|O) = [P(O|I) / P(O)] × P(I)。

等價地,依下面的樹狀圖,P(A|C) = P(AC) / [P(AC) + P(BC)]:

  • P(A)
    • P(C|A) → AC,聯合機率 P(AC)
    • P(D|A) → AD,聯合機率 P(AD)
  • P(B)
    • P(C|B) → BC,聯合機率 P(BC)
    • P(D|B) → BD,聯合機率 P(BD)
0% 0:00 / 0:00
0%