icon picker
4. LPM + Integral - trial exam Q5, practical 2 A1&A2, in-lecture example, Other qs before exam 2016 (practical 2 ex 2)

Find the formula,
Understand the formula, without going into much details on math or statistic terms
Derive, write down formula for applying to specific task
Solve task step-by-step
Solve other tasks
Create a cheat sheet SOP, with formulas, algoritm of solution
check the robustenes/generalisation of SOP cheat sheet, adjust if needed
So we have general formula for Lower Partial Moment which is something like this (as per slides):
RM_02a-Risk measures_final.pdf 2025-07-30 21-14-48 copy.png
where:
z is critical value of x (also: threshold), we interested to know knid of probability of variables below that threshold
x is random variable, i.e profit magins, net income etc.
n is order
f(x) is for probability function, in continuous data it's probility density function (pdf), and in descrete data is a probability mass function
then (z-x)^n means that we basically sick for lower partial moments, meaning moments that are lower then the threshold and in n exponenta defines kind of the area we are looking into for checking that LPMs, right?
integral with dx is mostly for continious data or functions, and for descrete data that changes to summation with dx/Δx
And then integral is mostly for continious data or functions, in general denoted as calculation between our z threshold and - minus infinity
and if we asked to calculate the LPM order of 0, n= 0, then formula will look like this, right? LMP₀ = ₀∫ᶻ(z-x)⁰f(x)dx = ₀∫ᶻ * 1 * f(x)dx =
And if we asked to calculate the LPM order of 0, n= 0, then formula can be derived from universal formula like this, right?
LMP₀ = ₀∫ᶻ(z-x)⁰f(x)dx = ₀∫ᶻ * 1 * f(x)dx = ₀∫ᶻ * f(x)dx = ₀∫ᶻ *Pr (X=x)dx =
and formula for order of 1, n=1, then would be like this, right?
But if we have discrete data or specific values for our variable x like x_i (where i can be like years, and x is net income for year) then this formula would be different:
integral will be changed to summation cause we have discrete values, not a continious curve of variables where we can see tiny small dx, right? and f(x) in discrete variables is probability function, and it woud be defined specifically with discrete variables x_i as = Pr (X=x), which means in plain words that
LPM₀ = ₀ᶻ(z-x)⁰f(x)dx = ₀ᶻ * 1 * f(x)dx = ₀ᶻ * f(x)dx = number of variables that falls under threshold, divded by total number of virables data we have, which is defining probability of ?
LPM_1 =1_ᶻ(z-x)^1f(x)dx =? 1/n(x_i<z) x_i<z_^n(z-x_i) =
LPM_2 = 2_ᶻ(z-x)^2f(x)dx = ?
So general formula for Lower Partial Moment which is something like this (as per slides):
RM_02a-Risk measures_final.pdf 2025-07-30 21-14-48 copy.png
where:
z is critical value of x (also: threshold), we interested to know knid of probability of variables below that threshold
x is random variable, i.e profit magins, net income etc.
n is order
f(x) is for probability function, in continuous data it's probility density function (pdf), and in descrete data is a probability mass function
then (z-x)^n means that we basically seek for lower partial moments, meaning moments that are lower then the threshold and in n exponenta defines kind of the area we are looking into for checking that LPMs, right?
so (z−x)^n The loss size, raised to a power depending on how much we care about the severity
if n = 0 then we interested only in undersanding the probability of the loss, not the size of it
if n = 1 then we interested in learning loss size, average one
if n = 2 then we are interested in learning loss size squared
integral with dx is mostly for continious data or functions, and for descrete data that changes to summation with dx or even Δx (which represent kind of bigger chunks, and dx is for infinite small one that strives to 0)
In Discrete data
🎯 General Discrete LPM Formula (Order n)
If you have a list of possible outcomes x₁, x₂, ..., x_k (e.g. past profits or yields), and you're worried about anything falling below or equal to a threshold z, then the Lower Partial Moment of order n is:
ChatGPT - Risk management 2025-08-07 15-57-59.png
Вероятность дискретной случайной переменной (функция вероятности массы probability mass function PMF) P(X=xᵢ) — это шанс, что переменная X примет конкретное значение xᵢ
X — это случайная переменная, которая представляет годовой доход фермы. В нашем случае, это исторические данные за 14 лет.
xᵢ​ — это конкретный результат или наблюдение, то есть доход фермы в определённый год . Например,
В задаче Q5, однако, мы интересуемся не вероятностью конкретного дохода, а вероятностью того, что доход будет ниже €39,000. Эту вероятность можно выразить как
P(X<€39,000).
Формула для вычисления этой эмпирической вероятности с функцией CDF и PMF выглядит так:

Где:
Z — это пороговое значение, которое нас интересует, в данном случае €39,000.
N — это общее количество наблюдений, то есть 14 лет.
P(Xᵢ​<Z) —
Функция распределения вероятностей (CDF), или P(X≤x), дает кумулятивную вероятность — шанс, что X примет значение, меньшее или равное x.
Для дискретных случайных величин, чтобы найти кумулятивную вероятность P(X≤x), мы просто суммируем все значения PMF для всех xi​, которые меньше или равны x.
Google Gemini 2025-08-08 00-12-28.png
Здесь:
F(Z) — кумулятивная функция распределения (CDF) дискретная, вычисленная в точке Z.
P(X<Z) — кумулятивная вероятность, что X меньше Z.
P(X=xi​) — функция вероятности масс (PMF) для каждого наблюдения xi​.
LPM0 (Order 0): This measures the probability that the outcome falls below the defined threshold z. For example, for an investment, it calculates the probability of obtaining a certain loss level. if n = 0 then we interested only in undersanding the probability of the loss, not the size of it, so the formula derivation will look like → проще тупо написать формулу что на интересно проабибилити случаев которые меньще Z и это тупо N случаев меньше Z разделить на количество случаев всего
P(X<=z)=n случаев, где X<=z​/N
ChatGPT - Risk management 2025-08-10 17-51-05.png

ChatGPT - Risk management 2025-08-07 17-01-33.png
ChatGPT - Risk management 2025-08-07 17-02-01.png
ChatGPT - Risk management 2025-08-07 17-01-50.png
ChatGPT - Risk management 2025-08-07 19-39-49.png
или мы можем это переписать как CDF формулу, но нам не надо
LPM_o we can substitute basically with the formula where we calculate summation of n instances where(x_i<=z) as we do CDF? and then we can cancel out something and then we would see the LPM_1 formula kind of?
LPM1 (Order 1): This measures the "expected shortfall" or the average magnitude of the loss below the threshold z. Or it indicates the mean loss
photo_2025-08-08_00-44-00.jpg

◦ Formula: $\int_{-\infty}^{z} (z - x) f(x)dx$
.
◦ Example: For P1, LPM1 is 0.086, while for P2, it is 0.05, suggesting that while both have the same probability of loss (LPM0), P1 has a larger average magnitude of loss when a loss occurs
.
Example for LPM0 and LPM1
Great question. The “average gap” (LPM₁) tells you, in points, how far the typical farm sits below your threshold zz (counting 0 for those already above). Here’s what you can decide with it:
Nudge vs deep-catch-up strategy. Compare LPM₁ with LPM₀ (share below threshold): • High LPM₀, small LPM₁ → many farms are just under zz. Do light, broad nudges (training, minor grants, extension visits). • Low LPM₀, large LPM₁ → a few farms are far behind. Do intensive, tailored support; expect higher unit costs and longer timelines.
Targeting & prioritization. Rank regions/groups by LPM₁ to send resources where shortfalls are largest per farm. If you also have cost per “point” of improvement, prioritize by gap ÷ cost.
Budget sizing. If closing one score point costs cc per farm, rough budget to lift everyone to zz is
Budget≈n×c×LPM1(z),\text{Budget} \approx n \times c \times \text{LPM}_1(z),
where nn is number of farms. (Refine for diminishing returns if needed.)
Program design & incentives. LPM₁ supports pay-for-improvement schemes (pay per point gained) rather than only “all-or-nothing at zz”. That avoids bunching exactly at the threshold and rewards progress for those far below.
Goal-setting & monitoring. Set targets like “reduce LPM₁ by 30% in 12 months.” If LPM₀ falls but LPM₁ barely moves, the far-behind group isn’t benefiting—time to adjust the intervention mix.
Equity checks. Break LPM₁ out by gender, farm size, or region to see who carries the largest average shortfall and tailor support accordingly. (If you also track LPM₂, you’ll see severity/inequality among the laggards.)
Quick rule of thumb:
small LPM₁ → go wide and cheap;
big LPM₁ → go deep with intensive packages, or reconsider the threshold/timeline.
If you share your threshold, LPM₀/LPM₁ by region, and an estimated “cost per point,” I can sketch a targeted budget and rollout plan.
LPM2 (Order 2): This measures a "shortfall variance" or the expected squared loss below the threshold z. This helps to see/capture most severe cases, outliers. Example, LPM₂ targets households throwing away dozens of kilos, so waste‐reduction programs focus on those outliers.
same as below, but exponenta should be 2, not 1
photo_2025-08-08_00-44-00.jpg
. Larger losses receive higher weights in this calculation. When the threshold z is set to the expected value of the random variable ($E(x)$), LPM2 is equivalent to the semi-variance
.
◦ Formula: $\int_{-\infty}^{z} (z - x)^2 f(x)dx$
.
◦ Note: For symmetric distributions, twice the semivariance equals the variance ($2SV_x = \sigma_x^2$), meaning semivariance offers no additional value. However, in the presence of negative skewness, twice the semivariance is greater than the variance ($2SV_x > \sigma_x^2$)
.

in-lecture example - Week 3. RM_02a-Risk measures_final

trial exam Q5

Q5: Risk quantification (7 Points)
The following table gives you a selection of financial indicators of a farm in €. The farmer wants to achieve a farm income in 2020 of minimum € 39,000. From the historical data, what are the Lower Partial Moments of his income of order 0 and of order 1? Shortly explain what the two indicators express.
Year | Farm Net Income 2019 - 58112 2018 - 41926 2017 - 31965 2016 - 37371 2015 - 59096 2014 - 59899 2013 - 43423 2012 - 51706 2011 - 40275 2010 - 32421 2009 - 50296 2008 - 42018 2007 - 38474 2006 - 40000
Given:
Data: Financial indicators of a farm in euro from 2006 till 2019, specifically farm’s net income for that years.
Condition: The farmer wants to achieve a farm income in 2020 of minimum € 39,000.
What needs to be achieved here:
From the historical data (derive) what are the Lower Partial Moments of his income of order 0 and of order 1?
Shortly explain what the two indicators express. If the farmer wants to achieve a farm income in 2020 of minimum € 39,000.
Visualize task with scheme, picture, short mathematical writing or table:
Formulas to use:
LPM_0 = n/N , it’s always between 0 and 1
photo_2025-08-08_00-44-00.jpg
1/n or actually 1/N here is the p(xi)
and why we divde on LPM_0 is because we want to find weighted aka conditional LPM_1 - the average magnitude of the loss below the threshold z, aka mean loss, or average shortfall for the years where the income fell below the target
actually when we have equal probabilities we can easily divide on n - number of cases below the threshold, no LPM0 specifically, cause N all numbers of cases cancel out each other
for this case for example:
LPM_1 (average loss for cases below the threshold) = LPM1/LPM0=∑ (of all xi<z) p(xi)(z−xi​)/∑(of all xi<z) p(xi) or n/N = (1/14*(z-x1)+ 1/14(z-x2) + 1/14(z-x3) + 1/14(z-x4))/(1/14+1/14+1/14+1/14)= =(1/14((z-x1)+(z-x2)+(z-x3)+(z-x4)))/(4/14) = (((z-x1)+(z-x2)+(z-x3)+(z-x4))/14)*14/4=((z-x1)+(z-x2)+(z-x3)+(z-x4))/4
where:
z is the target income (€39,000)
xi​ is the income in a given year, where i = 1, e.g. x1 net income for 2006 year, x2 net income for 2007 year etc.
n is the number of years with income below the target income
N (note: in LPM1 formula n is actually N) is the total number of years of historical data (2006-2019), which is 14
Calculation Steps
Step 1: Identify Relevant Data
First, we need to find all the years where the farm's net income (xi​) was below the target income (z=€39,000)
The years with income below €39,000 are:
2007: €38,474
2010: €32,421
2016: €37,371
2017: €31,965
From this, we can determine:
n (the number of years with income below the target) = 4.
N (the total number of years) = 14 (from 2006 to 2019).
Step 2: Calculate LPM0​
The formula for LPM0​ is the number of years (n) with income below the threshold, divided by the total number of years (N).
LPM0​=n/N​=4/14​≈0.286
This means there's a28.6% probability of the farm's income falling below the €39,000 target.
Step 3: Calculate LPM1​
The formula for LPM1​ requires summing the shortfalls for each year where the income was below the target.
The shortfall is calculated as the target income minus the actual income (z−xi​).
The summation of shortfalls is:
∑(z−xi​)=(39,000−38,474)+(39,000−32,421)+(39,000−37,371)+(39,000−31,965)= 526 + 6,579 + 1,629 + 7,035 = 15,769 euro.
Now, we plug this value into the LPM1​ formula. Note that the formula provided in the image contains a term n*LPM0, n is N actually, number of all years in historical data available
LPM1​=1*∑(z−xi​)​/N*LPM_0=15,769/4​=3,942.25
This means the mean loss, or average shortfall, is €3,942.25 for the years where the income fell below the target
Final Results
LPM of order 0 (LPM0​): 0.286, or 28.6%. This represents the probability of the farm's income being less than €39,000.
LPM of order 1 (LPM1​): €3,942.25. This represents the expected magnitude of the loss, conditional on a loss occurring.

practical 2, A1

A1: Risk measures
You are given two portfolios. They are characterized with the probabilities that potential returns are achieved as follows:
Portfolio | Return
-15%
-10%
-5%
0
5%
10%
15%
20%
25%
30%
35%
Probabilities for Portfolio 1
5
8
12
16
18
16
12
8
5
0
0
Probabilities for Portfolio 2
0
0
25
35
10
7
9
5
3
3
3
There are no rows in this table
This reads as follows: with Portfolio 1 (P1), a return of -15% is achieved with a 5% probability. d) Calculate and compare the lower partial moments of orders 0 and 1 for both portfolios. The loss threshold z is here defined at a return level of 0.
Given:
Data: two portfolios. They are characterized with the probabilities that potential returns are achieved as follows:
Portfolio probabilities | Return
-15%
-10%
-5%
0
5%
10%
15%
20%
25%
30%
35%

Probabilities for Portfolio 1
5%
8%
12%
16%
18%
16%
12%
8%
5%
0
0

Expected Return P1
-0.0075
-0.008
-0.006
0
0.009
0.016
0.018
0.016
0.0125
0
0
0.05=5%
Probabilities for Portfolio 2
0
0
25%
35%
10%
7%
9%
5%
3%
3%
3%

Expected Return P2
0
0
-0.0125
0
0.005
0.007
0.0135
0.01
0.0075
0.009
0.0105
0.05=5%
There are no rows in this table
This reads as follows: with Portfolio 1 (P1), a return of -15% is achieved with a 5% probability.
Condition: The loss threshold z is here defined at a return level of 0.
What needs to be answered here:
d) Calculate and compare the lower partial moments of orders 0 and 1 for both portfolios. The loss threshold z is here defined at a return level of 0.
Visualize task with scheme, picture, short mathematical writing or table:

Formulas to use:
2016_Other questions before the exam.pdf 2025-08-17 22-06-49.png
from file Other qs before exam 2016
LPM_0 is ∑p(xi) where xi is all cases where xi is below z, it’s always between 0 and 1 or 0 to 100%
Version 1.
photo_2025-08-08_00-44-00.jpg
and multiply to p(xi) (specific probability of the potential return, i.e. 5 precent probabiliy for potential return of 15%
where:
z is the target threshold (0 return)
xi​ is the specific potential return, where i = 1, e.g. x1 return of 15% (0.15), x2 return of 10%(0.1) etc.
n in formula, actually means big N, which is the total number of observations (or in this case, the sum of probabilities, which is 100) and if we look at 1/N is for the cases when we have equal probabilities of the chances for cases, and here we are given specific probability for each potential return, therefore we need to multiply kind of for p(xi) probability of specific return for portfolio (like 5% for return 15%)
Version 2. or these formulas below
Google Gemini 2025-08-17 15-23-51.png
Google Gemini 2025-08-17 15-23-19.png
where p(xi) - probability of specific return for portfolio

Solution
d) 1. Lower Partial Moment of Order 0 (LPM0​)
The formula for LPM0​ is the sum of probabilities of all returns below the threshold z, divided on 100%. This represents the probability of a loss.
LPM0​(P1​)=(5%+8%+12%)/100%=0.25
LPM0​(P2​)=25%/100%=0.25
Both portfolios have the same probability of experiencing a loss.
d) 2. Lower Partial Moment of Order 1 (LPM1​)
Version 1. The formula for LPM1​ used in the solution is a weighted average of the magnitude of losses, where the weights are the probabilities of those losses. Where n is the number of observations (or in this case, the sum of probabilities, which is 100), and xi​ are the potential returns.
photo_2025-08-08_00-44-00.jpg
For Portfolio P1:
The returns below the threshold of 0 are -15%, -10%, and -5%, with probabilities of 5%, 8%, and 12%, respectively we can represent probabilities as 1/100% * specific p(xi) probability
LPM1​(P1​)=(5*(0−(−0.15))+8⋅(0−(−0.1))+12⋅(0−(−0.05)))​/(100⋅0.25)=
=(5⋅0.15+8⋅0.1+12⋅0.05)/25=(0.75+0.8+0.6​)/25=2.15​/25=0.086
For Portfolio P2:
The only return below the threshold of 0 is -5%, with a probability of 25%
LPM1​(P2​)=(25⋅(0−(−0.05)))/(100⋅0.25)=(25⋅0.05)/25​=0.05
Version 2.
We can specifically use p(xi) but not in precentage but with decimal points like 0.05
Google Gemini 2025-08-17 15-23-51.png
For Portfolio P1:
LPM1​(P1​)=(0.05*(0−(−0.15))+0.08⋅(0−(−0.1))+0.12⋅(0−(−0.05))/0.25=
=(0.0075+0.008+0.006)/0.25=0.0215​/0.25=0.086
For Portfolio P2:
LPM1​(P2​)=(0.25⋅(0−(−0.05)))/0.25=(0.25⋅0.05)/0.25​=0.05
Conclusion: The LPM1​ for P1 is 0.086, and for P2 is 0.05. This indicates that P1 has a higher expected magnitude of loss compared to P2, even though both have the same probability of loss.

practical 2, A2

A2: Lower partial moments
From the FADN database, you are given the farm net income (€) of two German dairy farms between 2005 and 2016: one farm is located in Schleswig-Holstein (Farm 1), the other one in Bavaria (Farm 2).
Farms | Net income by Year
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
Schleswig-Holstein (1)
48,886€
46,722€
48,886€
56,748€
83,524€
38,448€
52,085€
74,833€
57,402€
52,473€
82,429€
30,671€
Bavaria (2)
27,322€
31,453€
44,281€
23,639€
23,098€
34,882€
35,532€
34,189€
42,039€
40,712€
33,598€
40,454€
There are no rows in this table
Calculate and compare the lower partial moments of orders 0 and 1 for both dairy farms. The threshold z is here set at an income level of 40,000 €.
Given:
Data: From the FADN database, you are given the farm net income (€) of two German dairy farms between 2005 and 2016: one farm is located in Schleswig-Holstein (Farm 1), the other one in Bavaria (Farm 2).
Farms | Net income by Year
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
Schleswig-Holstein (1)
48,886€
46,722€
48,886€
56,748€
83,524€
38,448€
52,085€
74,833€
57,402€
52,473€
82,429€
30,671€
Bavaria (2)
27,322€
31,453€
44,281€
23,639€
23,098€
34,882€
35,532€
34,189€
42,039€
40,712€
33,598€
40,454€
There are no rows in this table
Condition: The threshold z is here set at an income level of 40,000 €.
What needs to be answered here:
Calculate and compare the lower partial moments of orders 0 and 1 for both dairy farms.
Visualize task with scheme, picture, short mathematical writing or table:

Formulas to use:
LPM_0 =n/N , it’s always between 0 and 1
photo_2025-08-08_00-44-00.jpg
1/n or actually 1/N here is the p(xi)
and why we divde on LPM_0 is because we want to find weighted aka conditional LPM_1 - the average magnitude of the loss below the threshold z, aka mean loss, or average shortfall for the years where the income fell below the target
actually when we have equal probabilities we can easily divide on n - number of cases below the threshold, no LPM0 specifically, cause N all numbers of cases cancel out each other
for this case for example:
LPM_1 (farm 1) (average loss for cases below the threshold on farm 1) = LPM1/LPM0=∑ (of all xi<z) p(xi)(z−xi​)/∑(of all xi<z) p(xi) or n/N = (1/12*(z-x1)+ 1/12(z-x2))/(1/12+1/12)= =(1/12((z-x1)+(z-x2)))/(2/12) = (((z-x1)+(z-x2))/12)*12/2=((z-x1)+(z-x2))/
where:
z is the target income (€40,000)
xi​ is the income in a given year, where i = 1, e.g. x1 net income for 2005 year, x2 net income for 2006 year etc.
n is the number of years with income below the target income of 40,000 euro
N (in LPM1 formula n is actually N) is the total number of years of historical data (2005-2016), which is 12 in this task
Solution
Step 1: Identify Relevant Data
First, we need to find all the years where the farm's net income (xi​) was below the target income (z=€40,000)
For farm in Schleswig-Holstein (1) the years with income below €40,000 are:
2010: 38,448€
2016: 30,671€
For farm in Bavaria (2) the years with income below €40,000 are:
2005: 27,322€
2006: 31,453€
2008: 23,639€
2009: 23,098€
2010: 34,882€
2011: 35,532€
2012: 34,189€
2015: 33,598€
From this, we can determine for Schleswig-Holstein (1):
n (the number of years with income below the target) = 2.
N (the total number of years) = 12 (from 2005 to 2016)
From this, we can determine for Bavaria (2):
n (the number of years with income below the target) = 8.
N (the total number of years) = 12 (from 2005 to 2016)
Step 2: Calculate LPM0​
The formula for LPM0​ is the number of years (n) with income below the threshold, divided by the total number of years (N).
LPM0(Farm 1)​=n/N​=2/12​=0.16666666666
This means there's a 16.7% probability of the farm's 1 income falling below the €40,000 target
LPM0(Farm 2)​=n/N​=8/12​=0.66666666666
This means there's a 66.7% probability of the farm's 2 income falling below the €40,000 target
Step 3: Calculate LPM1​
The formula for LPM1​ requires summing the shortfalls for each year where the income was below the target.
The shortfall is calculated as the target income minus the actual income (z−xi​).
The summation of shortfalls for farm 1 is:
∑(z−xi​)=(40000−38,448)+(40,000−30,671)= 1552 + 9329 = 10881 euro.
Now, we plug this value into the LPM1​ formula. Note that the formula provided in the image contains a term n*LPM0, n is N actually there, number of all years in historical data available
LPM1 (Farm 1)​=1*∑(z−xi​)​/N*LPM_0=10881/(12*0.16666666666)=10881/2=5440.5
This means the mean loss, or average shortfall, is €5,440.5 for the years where the income fell below the target
The summation of shortfalls for farm 2 is:
∑(z−xi​)=(40000−27,322)+(40,000−31,453)+(40,000−23,639)+(40,000−23,098) + (40,000-34,882) + (40,000-35,532) + (40,000-34,189) + (40,000-33,598)= 12678 + 8547 + 16361 + 16902 + 5118 + 4468 + 5811 + 6402 = 76287 euro.
Now, we plug this value into the LPM1​ formula. Note that the formula provided in the image contains a term n*LPM0, n is N actually, number of all years in historical data available
LPM1​=1*∑(z−xi​)​/N*LPM_0=76287/(12*0.66666666666)=76287/8=9535.875
This means the mean loss, or average shortfall, is €9535.875 for the years where the income fell below the targe


Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.