lecture 3
lecture 3
• Random Variables
• Discrete Probability Distributions
• Continuous Probability Distributions
• Bayesian Analysis
THESE 0.10
FREQUENCIES 0.08
0.06
0.04
0.02
0.00
-300 -200 -100 0 100 200 300 400 500 600 700 800
Profit ξ
Risk management is about modifying risk so that it aligns with the decision maker’s
goals. In this case, the decision maker wants to reduce financial losses and increase
OR
profitable outcomes. So we need to be modeled (e.g profit) using statistical distributions BOTH!!!!
3
Risk Analysis
Understanding uncertainty and making informed decisions in situations where
outcomes are uncertain. To do this, we use concepts from probability and
statistics.
1- Random Variables: A random variable represents uncertain quantities in risk analysis. For
example, the number of defective products in a batch (discrete) or the time until the next
equipment failure (continuous). These variables help us model uncertain events mathematically.
2- Discrete Probability Distributions: Discrete distributions describe the probabilities of
outcomes for random variables that take on specific values (like the number of defective items, 0,
1, 2, etc.). For instance, the binomial distribution might tell us the probability of getting 2
defective items out of 10.
3- Continuous Probability Distributions: These distributions describe the probabilities of
outcomes for random variables that can take on any value within a range. For example, the time to
failure of a machine might follow an exponential distribution, or a project's cost might follow a
normal distribution.
4- Bayesian Analysis: Bayesian analysis allows us to update probabilities as new information
becomes available. In risk analysis, this helps refine predictions. For example, if initial data
suggests a 10% chance of equipment failure, Bayesian methods can adjust this probability if new
inspection data indicates more wear than expected.
Random Variables and Probability Density Functions 4
In risk management, random variables help us quantify uncertainty. A random variable is a numerical value that
represents an uncertain outcome, such as profit, loss, or other financial metrics.
A random variable is a quantity whose value is not known exactly but its probability distribution is known.
The value of the random variable will vary from trial to trial as the experiment is repeated. The variable’s
probability density function (PDF) describes how these values are distributed (i.e. it gives the probability that
the variable value falls within a particular interval).
Continuous PDFs
f(t) f(t)
All values between 0
and 1 are equally likely Smallest values
are most likely
0 1 0 t
t
Uniform distribution Exponential distribution
(e.g. soil texture) (e.g. event rainfall)
0.3
f (t)
Expected Returns
In risk analysis, this tells us the average or most likely outcome over time.
Risk analysis involves evaluating different investment or project options by looking at their
potential returns and probabilities.
If an investment has a high expected return, it may be attractive, but risk must also be
considered.
7
State Probability C T
Higher returns usually come with higher risk, we need variance and standard deviation to measure risk
8
• Standard deviation measures how far apart numbers are in a data set.
Variance, on the other hand, gives an actual value to how much the
numbers in a data set vary from the mean.
n
2 2
σ = ∑ pi ( Ri − E ( R))
i =1
9
State Probability C T
• Stock C
▪ σ2 = .3(.15-.099)2 + .5(.1-.099)2 + .2(.02-.099)2 = .002029
▪ σ = .045
• Stock T
▪ σ2 = .3(.25-.177)2 + .5(.2-.177)2 + .2(.01-.177)2 = .007441
▪ σ = .0863
Stock T has a much higher variance than Stock C
Variance and standard deviation measure financial risk by showing how much returns
deviate from the expected value.
Lower standard deviation = lower risk and more predictability.
Higher standard deviation = higher risk and greater uncertainty.
Investors use these metrics to balance risk and return before making decisions.
11
Binomial Distribution
In many Geographic studies, we often face a situation where we deal with a random
variable that only takes two values, zero-one, yes-no, presence-absence, over a given
period of time. Since there are only two possible outcomes, knowing the probability of one
knows the probability of the other.
P(1)=p
P(0)=1-p
If the random experiment is conducted n times, then the probability for the event to
happen t times follow binomial distribution:
⎛n⎞ t n −t n!
P(t ) = ⎜ ⎟ p (1 − p ) = p t (1 − p )n −t
⎝t⎠ x !(n − t )!
The Poisson distribution is a probability model used to describe the number of occurrences of a
particular event within a fixed interval of time or space. It is widely applied in risk analysis when
events happen randomly and independently.
Where the parameter λ>0 is the mean number of successes in the interval.
λ (lambda) is the expected number of occurrences (mean)
The mean and variance of the Poisson distribution are both equal
µ =λ and σ2 =λ
Poisson Probability Distribution 19
The Poisson distribution is useful in modelling risks associated with rare but independent
events. Some key applications include:
A. Risk in Cybersecurity (System Failures or Cyberattacks)
• An insurance company knows that on average, 3 car accidents occur per day in a city
(λ=3)
• Using the Poisson model, they can calculate:
◦ The probability of 0 accidents in a day.
◦ The risk of having more than 5 accidents, requiring additional claim handling
resources.
C. Reliability Engineering (Machine Failures)
Q1: What is the risk of extreme hailstorm activity three or more hailstorms
applications: 2
▪ Heights and weights of people The normal distribution is: T ~ N ( µ , σ )
▪ Test scores The visual appearance of the normal
▪ Scientific measurements distribution is a symmetric, unimodal or
▪ Amounts of rainfall bell-shaped curve as shown in the figure.
• It is widely used in statistical inference
24
Normal Probability Distribution
The normal distribution is widely used in risk management, finance, and engineering because
many real-world uncertainties follow this pattern.
A. Financial Risk and Stock Returns
• Stock prices and returns are often modeled using normal distribution.
μ) represents expected return, while the standard deviation σ) represents risk (volatility).
• If a stock has a higher standard deviation, it is more risky and volatile.
B. Quality Control in Manufacturing
We can use the following function to convert any normal random variable to a
standard normal random variable…
Any normal distribution can be converted into a standard normal distribution (Z-distribution) using the
Z-score formula:
0
X −µ
Z=
σ
X −µ
Z=
0 σ
Examples:
Φ (0.76) = 0.776373
Φ (1.3) = ?
Φ (−3) = 1 − Φ (3) = ?
Φ (3.86) = ?
Lognormal Distribution 28
, for x >0
f(t)
0 t
Lognormal Distribution 29
If T ~ LN(µ,σ),
⎛ ln t − µ ⎞
F (t ) = P(T ≤ t ) = Φ ⎜ ⎟
⎝ σ ⎠
where Φ(z) is the cumulative probability distribution function of N(0,1)
30
Lognormal Distribution
Try to remember how to reach this equations !!
➢Median of T
median = e µ
➢Standard Deviation of T
1
2
⎡ 2µ + σ 2 ⎛ σ 2 ⎞⎤
σT = ⎢e ⎜e
⎜ − 1 ⎟⎥
⎟
⎢⎣ ⎝ ⎠⎥⎦
Lognormal Distribution 31
The Exponential Distribution is widely used in risk analysis, especially for modelling waiting times
between random events (e.g. system failures, arrival times, and reliability analysis). The exponential
distribution is crucial for predicting rare but random events.
A random variable T is defined to be exponential random variable (or say T is
exponentially distributed) with positive parameter λ if its probability density
function is given by:
⎧λ e − λ t if t ≥ 0, λ > 0
f (t ) = ⎨
⎩0 if t < 0
∞ ∞
− λt − λt ∞
Note: ∫ f (t ) dt = ∫ λ e dt = − e =1
−∞ 0 0
⎧1 − e − λt if t ≥ 0
F (t ) = ⎨
⎩0 if t < 0
Exponential Distribution: Example 39
⎧1 − e − λt if t ≥ 0
F (t ) = ⎨
⎩0 if t < 0
P(10 ≤ T ≤ 15)
Example: solution 40
⎧1 − e − λt if t ≥ 0 P(10 ≤ T ≤ 15)
F (t ) = ⎨
⎩0 if t < 0 = F (15) − F (10)
= e − (0.05)(10) − e − (0.05)(15)
= e −0.5 − e −0.75
= 0.1341
P(10 ≤ T ≤ 15)
f (t ; α , β )
Gamma Distribution 45
The Gamma distribution is widely used in reliability engineering, finance, and risk
modelling.
A. Waiting Time Between Events (Reliability Analysis)
• Models the time until failure for machines, batteries, and electronic components.
• Used in predicting failure rates and maintenance schedules.
B. Insurance & Claim Risk Modelling
• Bayesian Analysis
Risk Assessment
Risk assessment is the process of identifying and analyzing potential hazards to minimize their
impact. It helps in decision-making by providing a structured approach to handle uncertainties.
This identifies hazards, assesses risks, and helps in creating control measures to minimize harm
49
Population at risk
Individual Risk
Individual risk is the risk of fatality or injury to any identifiable (named)
individual who lives within the zone impacted by a hazard, or follows a
particular pattern of life, that might subject him or her to the consequences of a
hazard.
Societal Risk
Societal risk is the risk of multiple fatalities or injuries in the society as a whole,
and where society would have to carry the burden of a hazard causing a number
of deaths, injury, financial, environmental, and other losses.
Population at risk 50
• Individual risk can be calculated as the total risk divided by the population at
risk.
• For example, if a region with a population of one million people
experiences on average 5 deaths from flooding per year, the individual risk
of being killed by a flood in that region is 5/1,000,000, usually expressed in
orders of magnitude as 5×10−6.
51
• For individual risk: A Bayesian model can predict the probability of a worker getting injured
based on past incidents.
• For societal risk: It can assess how likely a wildfire will spread to multiple communities.
Suppose:
•h = “the athlete is taking steroids”
•e = “test result is positive”
And:
•P(h) = 0.01 (one in 100 people)
•P(e|h) = 0.8 (true positive rate)
•P(e|not h) = 0.1 (false positive rate)
What is P(h|e)?
Bayes’ Theorem for Estimating Risk 56
Suppose:
•h = “the athlete is taking steroids”
•e = “test result is positive”
And:
•P(h) = 0.01 (one in 100 people)
•P(e|h) = 0.8 (true positive rate)
•P(e|not h) = 0.1 (false positive rate)
▪ The question, which we shall answer, is given that an error has been
identified by senior management as requiring special attention, what is
the probability that this originated from branch C?
This example applies Bayes’ Theorem to assess the probability that an identified error came from Branch C.
59
Probability And Risk - A Bayes Theorem Example
▪ Two branches of a retail bank, C and D, have each reported eight
transactions to risk management for review.
▪ The question, which we shall answer, is given that an error has been
identified by senior management as requiring special attention, what is
the probability that this originated from branch C?
It is known that:
Prob (error|C) = 4/8 = 0.5
Prob (error|D) = 6/8 = 0.75
Prob (C) = Prob (D) = ½ (since each branch reports the same number of
transactions)
60
Probability And Risk - A Bayes Theorem Example
P(A | B i )P(B i )
P(B i | A) =
P(A | B 1 )P(B 1 ) + P(A | B 2 )P(B 2 ) + ⋅ ⋅ ⋅ + P(A | B k )P(B k )
P rob(C )P rob(error | C )
P rob(C | error) =
P rob(C )P rob(error | C ) + P rob( D)P rob(error | D)
0.5 × 0.5
=
0.5 × 0.5 + 0.5 × 0.75
= 0.4
There is a 40% chance that it originated from Branch C. Even though both
branches reported an equal number of transactions, Branch D had more
errors, making it more likely that any randomly selected error came from
there.
M1 M2 M3
Percentage supplied 60 30 10
Probability transaction .95 .8 .65
not resulting in a loss