I have been struggling with an issue relating to the summation of multiple Risks' triangular distributions using Monte Carlo. I can get the correct shape of generation but the percentage probability is far off. This is what I am generating for 2 risks with values for probability, best case, most likely and worst case (75%, 100-200-300)(80%, 510-1000-1125):
And this is the tool I am basing my accuracy on:
This is a recurring issue and I can't seem to find a solution. When I calculate a single risk using the same formula, the result is 99% accurate to the comparison tool. This is my distribution addition formula:
public static List<Double> combineLists(Double weight, List<Double> newDataList, List<Double> cumulativeDataList){
//loops through the size of the new data list to added
for(Integer i = 0; i < newDataList.size(); i++){
//sets the output as the sum of both
cumulativeDataList.set(i, cumulativeDataList.get(i) + (newDataList.get(i)*weight));
}
return cumulativeDataList;
Further to this, I cannot find the way of how they generate their max/worst values, I am simply summing the worst from all risks(1425) but they have a value of 1388, any suggestions on this would also be appreciated.
I have been stuck on this for weeks so any help would be very appreciated! Thanks :)
I was able to find the answer, it was that the probability needed to be integrated within the random number generator! This removed the need for half of the steps as the data was already normally distributed.