Monday 27 January 2014

Experiment to study 'High Impact Low Probabitlity Risks' using R

Here we would have a look at an experiment to understand how quantitative risk analysis can be used for simulation. An open source tools ‘R’ was used to perform the experiment.
This experiment deals with High impact low probability risks.

Model

This model utilizes the basic principle of risk definition which is product of likelihood of occurrence and impact. The impact parameter is binary i.e. either there is an impact or there is no impact at all. For the purpose of satisfying our basic premise of high impact and low probability we would assign high probability for no impact case and maximum impact value (10 on a scale of 1 to 10) for a case where event has occurred.
In a single experiment 100 samples would be taken from the population of 0 and 10 and the impact values would be summed up. This experiment would be replicated for 1000 times and impact vs. frequency mapping is created.
Following is the R code to depict the model


# This function simulates the single experiment of occurrence of event
high.impact = function(n=100){
  impact = 0
  p1=<probability of non occurrence>
  p2=1-p1 #probability of occurrence
  impact = sample(c(0,10), size=n, replace=TRUE, prob = c(p1,p2))
   sum(impact) # total impact in a single experiment
}
#single function call to simulate single experiment
high.impact()
#perform the experiment 10000 times
F=replicate(1000,high.impact())

#tabulate results
table(F)

#plot results
par(mfrow=c(1,1))
plot(table(F), type = "l")
Output
Since events have low probability of occurrence the probability of occurrence would be kept low, for which probability of non-occurrence would be high. For this simulation probabilities of non-occurrence were kept in range of 0.90 to 0.99.  Outputs of above simulation for different probabilities are as follows:
Probability of Non-Occurrence P1=0.90 (Use the probability p1 in R code above)

Probability of Non-Occurrence P1=0.95


Probability of Non-Occurrence P1=0.99


Observations

Based on the above data following observations were made:
  1. As the probability of occurrence increases net impact on organization increases.
  2. Even at very low probability of occurrence i.e. P2 = 0.01 or 1% the full impact of the event i.e. 10 can be seen for more approximately 50% of the time (~ 400 out of 1000)
  3. Since such events are not frequent even the tail risk needs to be seen






No comments:

Post a Comment