Inspired by this post Is Monte Carlo uncertainty estimation equivalent to analytical error propagation?, I try to check it myself using a simple function f=A/B, where A is 10 with uncertainty 1 and B is 5 with uncertainty 2. The error of f from error propagation is 0.6, however, the error of f from Monte Carlo simulation is 221.5. I'm very confused why this happens. I attached my code below:
> runs = 100000
> A=10
> sigmaA=1
> B=5
> sigmaB=2
> simA <- rnorm(runs,mean=meanA,sd=sigmaA)
> simB <- rnorm(runs,mean=meanB,sd=sigmaB)
> f=A/B
> f
[1] 2
> sigmaf=sqrt(f^2*((sigmaA/A)^2+(sigmaB/B)^2-2*sigmaA*sigmaB/A/B))
> sigmaf
[1] 0.6
> simf=simA/simB
> sd(simf)
[1] 221.5475
Thank you for your help!