I am confused about the how to report uncertainty in Monte Carlo simulations. Take this simplified example:
Say I want to model a system with the following system equations:
X = A*B
Y = C*D
Z = X+Y
If all the inputs (a,b,c,d) have uncertainty around them as represented by probability density functions (e.g. triangular PDFs), I have been trying to use Monte Carlo analysis to propagate this uncertainty by randomly sampling from each pdf and multiplying them together as in the equations above. I then calculate the means, medians and 5th, 95th percentile. For example, in R:
library(triangle)
## Number of iterations
n <- 10000
## randomly sample inputs using triangular distribution
A <- rtriangle(n,1,40,10)
B <- rtriangle(n,5,10,8)
X <- A*B
C <- rtriangle(n,0,5,3)
D <- rtriangle(n,5,20,10)
Y <- C*D
Z <- X+Y
## histograms show outputs are not normally distributed
hist(X)
hist(Y)
hist(Z)
outputs <- data.frame(cbind(X,Y,Z))
## Calculate the mean, median and quantiles for X,Y,Z
means <- apply(outputs,2,mean)
median <- apply(outputs,2,median)
lower_quant <- apply(outputs,2,quantile,0.05)
upper_quant <- apply(outputs,2,quantile,0.95)
Am I correct in thinking that the percentiles I have calculated for each output (x,y,z) should be termed prediction intervals (i.e. 90% of all values fall in this range)?
How about the confidence intervals? From what I understand the confidence interval represents the uncertainty around the mean values. Therefore, does this mean in order to get confidence intervals I would have to repeat the above sampling process n times, and then calculate the confidence intervals based on the different means calculated (similar to what I think this post is suggesting I think)?
Is this necessary or even correct procedure, particularly when the distributions of the outputs are not normally distributed?
Many thanks in advance for your help.