Читать книгу Pricing Insurance Risk - Stephen J. Mildenhall - Страница 52
3.5.5 Algorithm to Evaluate Expected Loss for Discrete Random Variables
ОглавлениеThe algorithm in this subsection is very basic. We present it to establish an approach to working with discrete random variables that we generalize in subsequent chapters.
We present an algorithm to compute E[X] in two ways, based on Eq. 3.1,
(3.9)
The two integrals correspond to the areas shown in Figure 3.11, panels (a) and (b), respectively. In (a), dF equals minus the backward difference of S, and in (b) dx equals the forward difference of x.
Figure 3.11 Two ways of computing expected loss from a discrete sample.
Follow these steps to evaluate Eq. 3.9.
Algorithm.
Algorithm Input: X is a discrete random variable, taking finitely many values Xj≥0, and pj=P(X=xj).
Algorithm Steps
1 Pad the input by adding a zero outcome X = 0 with probability 0.
2 Group by Xj and sum the corresponding pj.
3 Sort events by outcome Xj into ascending order. Relabel events X0<X1<⋯<Xm and probabilities p0,…,pm.
4 Decumulate probabilities to compute the survival function Sj:=S(Xj) using S0=1−p0 and Sj=Sj−1−pj, j > 0.
5 Difference the outcomes to compute ΔXj=Xj+1−Xj, j=0,…,m−1.
6 Outcome-probability sum-product: (3.10)
7 Survival function sum-product: (3.11)
Comments.
1 Step (1) treats 0 as special because the second integral in Eq. 3.9 starts at X = 0. The case where the smallest outcome is > 0 is illustrated in Figure 3.12. Now S(x)=1 for 0≤x<X1 and ∫0∞S(x)dx includes the shaded dashed rectangle of area X1. Step (1) allows us to systematically deal with any discrete data. It adds a new outcome row only when the smallest observation is > 0.Figure 3.12 Accounting for the effect of adding 1 to each outcome.
2 After Step (3), the Xj are distinct, they are in ascending order, X0=0, and pj=P(X=Xj).
3 In Step (4), Sm=P(X>Xm)=0 since Xm is the maximum value of X.
4 The forward difference ΔX computed in Step (5) replaces dx in various formulas. Since it is a forward difference ΔXm is undefined. It is also unneeded.
5 Step (6) computes the first integral in Eq. 3.9. It is a sum because X is discrete and has a probability mass function, like a Poisson, rather than a density, like a normal—explaining why we use the notation dF(x), not f(x)dx. The sum starts at i = 1 because X0=0. Notice that P(X=Xj)=Sj−1−Sj is the negative backward difference of S.
6 Step (7) computes the second integral in Eq. 3.9. The sum starts at i = 1, corresponding to the first vertical bar in Panel (b) that extends from X0=0 to X1 and has height S(X0).
7 Note the index shift between Eq. 3.10, 3.11.
8 Both Eqs. 3.10 and 3.11 are exact evaluations. The approximation occurs when the underlying distribution being modeled is replaced with the discrete sample given by X.
Exercise 29 Apply the Algorithm to X defined by the Simple Discrete Example, Section 2.4.1.
Solution. The sorted data, starting with X0=0, is shown in Table 3.2. From now on we label the outcomes Xj as shown there.
Table 3.2 shows event rank j=0,…,m=8, and the columns S and ΔX from Steps (4) and (5). For future applications, it is important we can recover P(X=Xj) as a difference of Sj. This is easy: P(X=Xj)=ΔSj:=S(Xj−1)−S(Xj) is the jump at Xj and ΔS0 is the jump at X0=0, i.e, 1−P(X>0). It is the negative backward difference because S is the survival function. Finally, the table shows two computed columns: XΔS and SΔX. The totals show that Steps (6) and (7) give the same result for E[X], 27.25.
Table 3.2 Simple Discrete Example with nine possible outcomes, ordered by portfolio loss X, with layer width ΔX and exceedance probability S
j | X | ΔX | PX=ΔS | S | X ΔS | S ΔX |
---|---|---|---|---|---|---|
0 | 0 | 1 | 0.25 | 0.75 | 0 | 0.75 |
1 | 1 | 7 | 0.125 | 0.625 | 0.125 | 4.375 |
2 | 8 | 1 | 0.125 | 0.5 | 1 | 0.5 |
3 | 9 | 1 | 0.0625 | 0.4375 | 0.563 | 0.4375 |
4 | 10 | 1 | 0.125 | 0.3125 | 1.25 | 0.3125 |
5 | 11 | 79 | 0.0625 | 0.25 | 0.688 | 19.75 |
6 | 90 | 8 | 0.125 | 0.125 | 11.25 | 1 |
7 | 98 | 2 | 0.0625 | 0.0625 | 6.125 | 0.125 |
8 | 100 | 0.0625 | 0 | 6.25 | ||
Sum | 1 | 27.25 | 27.25 |
Exercise 30 Apply the Algorithm to X + 100.
Solution. Step (1) now introduces the 0 row, see Table 3.3.
Table 3.3 Solution to Exercise 30.
j | X | ΔX | PX=ΔS | S | X ΔS | S ΔX |
---|---|---|---|---|---|---|
0 | 0 | 100 | 0 | 1 | 0 | 100 |
1 | 100 | 1 | 0.250 | 0.75 | 25 | 0.75 |
2 | 101 | 7 | 0.125 | 0.625 | 12.625 | 4.375 |
3 | 108 | 1 | 0.125 | 0.5 | 13.5 | 0.5 |
4 | 109 | 1 | 0.0625 | 0.4375 | 6.8125 | 0.4375 |
5 | 110 | 1 | 0.125 | 0.3125 | 13.75 | 0.3125 |
6 | 111 | 79 | 0.0625 | 0.25 | 6.9375 | 19.75 |
7 | 190 | 8 | 0.125 | 0.125 | 23.75 | 1 |
8 | 198 | 2 | 0.0625 | 0.0625 | 12.375 | 0.125 |
9 | 200 | 0.0625 | 0 | 12.5 | ||
Sum | 127.25 | 127.25 |
Exercise 31 The loss outcomes are all distinct in Table 3.2. When there are ties, Step (3) is needed. Recompute the table if X1 can take values 1,9,10.
The algorithm’s computations can be visualized using a Lee diagram, as shown in Figure 3.13. The horizontal axis shows events and their cumulative probabilities (in 1/16ths and decimals). The width of each event corresponds to its objective probability, ΔS in the table. The vertical axis shows potential outcomes from 1 to 100. The horizontal black lines show the outcome X for each event. In this case, there are nine events with nine distinct outcomes. The shaded area shows the chances each unit of assets is needed to fund an event. For example, the 99th and 100th units are only at risk from (or needed to fund) event j = 9, which has outcome 100 (upper right-hand corner). We might say these units are potentially consumed by event j = 9. The eight units 91–98 are at risk from events j = 8 and j = 9. The step heights of the shaded area correspond to ΔX in the table and ΔX7 for row j = 7 is shown. At the bottom of the graph, the first unit of assets is needed to fund events j = 2 through 9. Event j = 1 has a zero loss, which does not require any assets. The plots in Figure 3.11 show the same function (different data values) rotated by 90 degrees to make the interpretation as ∫S(x)dx clearer.
Figure 3.13 Lee diagram showing relationship between differen asset layers and the events they fund.
Given the increasing sequence Xj, it is convenient to define j(a)=max{j:Xj<a} and j(0)=0. It is the index of the largest observation strictly less than a. For example, j(90)=6 and j(91)=7. It is used in calculations as follows. To compute the limited expected value of X at a > 0, the survival function form evaluates
(3.12)
because ΔXj is the forward difference. It computes the integral as a sum of horizontal slices, e.g. the ΔX7 block in Figure 3.13. For a = 0 obviously E[X∧0]=0. For a=∞, j is set to j + 1, where j is the maximum index with S(Xj)>0, resulting in the unlimited E[X].
The outcome-probability form is
(3.13)
It computes the integral as a sum of vertical slices, e.g. the ΔS5 block in Figure 3.13.
When a = 80, Table 3.4 shows the above calculations through the simple expedient of replacing X values with X∧a and recomputing other columns that depend on X. Notice that columns involving S still use X’s survival function. Numbers changed from Table 3.2 are displayed in bold.
Table 3.4 Computing the limited expected value of X, limited to a = 80. X’ refers to X∧ a but values related to S are unchanged
j | X' | ΔX' | ΔS | S | X'ΔS | SΔX' |
---|---|---|---|---|---|---|
0 | 0 | 1 | 0.25 | 0.75 | 0 | 0.75 |
1 | 1 | 7 | 0.125 | 0.625 | 0.125 | 4.375 |
2 | 8 | 1 | 0.125 | 0.5 | 1 | 0.5 |
3 | 9 | 1 | 0.0625 | 0.4375 | 0.563 | 0.438 |
4 | 10 | 1 | 0.125 | 0.3125 | 1.25 | 0.313 |
5 | 11 | 69 | 0.0625 | 0.25 | 0.688 | 17.25 |
6 | 80 | 0 | 0.125 | 0.125 | 10 | 0 |
7 | 80 | 0 | 0.0625 | 0.0625 | 5 | 0 |
8 | 80 | 0 | 0.0625 | 0 | 5 | 0 |
Sum | 1 | 23.625 | 23.625 |