From ce6a4d535f605cb5e8172c16c62c96c7eb973b93 Mon Sep 17 00:00:00 2001 From: Diego Vallarino <69391510+DiegoVallarino@users.noreply.github.com> Date: Wed, 11 May 2022 08:45:11 +0200 Subject: [PATCH] Add files via upload --- Risk-Analysis.html | 1740 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1740 insertions(+) create mode 100644 Risk-Analysis.html diff --git a/Risk-Analysis.html b/Risk-Analysis.html new file mode 100644 index 0000000..9bf4ee4 --- /dev/null +++ b/Risk-Analysis.html @@ -0,0 +1,1740 @@ + + + + + + + + + + + + + + + +Risk Analysis + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +

Let’s do an exercise with real but anonymous data. Suppose we take a +kind of risk score from different companies in the same sector. The +score goes from 1 to 100, but we cut them by deciles. That’s the first +column. Now we take the same data (company scores) in another +sector.

+
+ +
+

Then we graph how the evolution of the scores behaved for each +company in each sector over time. We see that there is a trend change in +one sector (red) than in the other sector (black).

+

+

We see that on the date there is a specific event that has impacted +one sector and another not. To continue with anonymity, we can say that +the effect can be: a) the breakdown of a relevant player in the red +sector, b) the exposure of the red sector to the war in Ukraine, c) the +bottlenecks in the processes of supply chain.

+

+

Therefore, the question would be: are the changes in a), b) +or c) causes of the reduction in the scores of the companies, and +therefore of the sector? Here the explanation. Long story, we +make it short, NO.

+
## Posterior inference {CausalImpact}
+## 
+##                          Average         Cumulative     
+## Actual                   6.7             253.0          
+## Prediction (s.d.)        6.7 (0.37)      252.9 (14.06)  
+## 95% CI                   [5.9, 7.4]      [225.1, 281.0] 
+##                                                         
+## Absolute effect (s.d.)   0.0016 (0.37)   0.0610 (14.06) 
+## 95% CI                   [-0.74, 0.73]   [-27.95, 27.90]
+##                                                         
+## Relative effect (s.d.)   0.024% (5.6%)   0.024% (5.6%)  
+## 95% CI                   [-11%, 11%]     [-11%, 11%]    
+## 
+## Posterior tail-area probability p:   0.49908
+## Posterior prob. of a causal effect:  50%
+## 
+## For more details, type: summary(impact, "report")
+
## Analysis report {CausalImpact}
+## 
+## 
+## During the post-intervention period, the response variable had an average value of approx. 6.66. In the absence of an intervention, we would have expected an average response of 6.66. The 95% interval of this counterfactual prediction is [5.92, 7.39]. Subtracting this prediction from the observed response yields an estimate of the causal effect the intervention had on the response variable. This effect is 0.0016 with a 95% interval of [-0.74, 0.73]. For a discussion of the significance of this effect, see below.
+## 
+## Summing up the individual data points during the post-intervention period (which can only sometimes be meaningfully interpreted), the response variable had an overall value of 253.00. Had the intervention not taken place, we would have expected a sum of 252.94. The 95% interval of this prediction is [225.10, 280.95].
+## 
+## The above results are given in terms of absolute numbers. In relative terms, the response variable showed an increase of +0%. The 95% interval of this percentage is [-11%, +11%].
+## 
+## This means that, although the intervention appears to have caused a positive effect, this effect is not statistically significant when considering the entire post-intervention period as a whole. Individual days or shorter stretches within the intervention period may of course still have had a significant effect, as indicated whenever the lower limit of the impact time series (lower plot) was above zero. The apparent effect could be the result of random fluctuations that are unrelated to the intervention. This is often the case when the intervention period is very long and includes much of the time when the effect has already worn off. It can also be the case when the intervention period is too short to distinguish the signal from the noise. Finally, failing to find a significant effect can happen when there are not enough control variables or when these variables do not correlate well with the response variable during the learning period.
+## 
+## The probability of obtaining this effect by chance is p = 0.499. This means the effect may be spurious and would generally not be considered statistically significant.
+ + + + +
+ + + + + + + + + + + + + + +