EngWiPy
- 1,361
- 61
Yes, that seems right. Notice how it does not go out to infinity and how it is not strictly monotonically decreasing. The variations are small, but they will make a difference in achieving a given level of numerical precision.S_David said:It's histogram(x). When I used with the data I have, I got the attached figure. Does that make sense?
Dale said:Yes, that seems right. Notice how it does not go out to infinity and how it is not strictly monotonically decreasing. The variations are small, but they will make a difference in achieving a given level of numerical precision.
No. It still shows the same key features, but it is smaller and harder to see. The range is not infinite and the curve is not smooth. This is to be expected in any random number generator, but it is a source of numerical error.S_David said:In the first figure, I didn't generate ##10^6## samples. In the attached figure I did. Does this change anything before going to implement your suggestion?
Dale said:So it looks like the RNG is not too bad but the sampling distribution does show a bit heavier tails than normal and a bit of right skew.
Q1: Can you do a qq plot of the ySim against the exponential distribution instead of the normal distribution?
Q2: Also, what is the mean and standard deviation of the sampling distribution of the mean?
OK, that is essentially unbiased.S_David said:OK, for Q2: the mean and the standard deviation of the mean are 1.0001 and 0.0309, respectively.
So the qq plots you have posted so far plot against the normal distribution. The ySim values are not normally distributed so the qq plot should be done against the exponential distribution.S_David said:I didn't understand your questions. For Q1: What do you mean by qq plotting ySim against the exponential distribution? and how? I qq plot ySim alone and got the attached figure
S_David said:Is it acceptable to say on a scientific article that the small discrepancy in results is due to some inaccuracy in the simulations?
mfig said:What is the small discrepancy? 1 part in 1 million? 1 part in 1 billion? Is there some reason you are using an exponential distribution and not a uniform distribution for your sampling? If you post just the MC integration code, we might be able to see a problem with it.
S_David said:Mathematica code can be found on post #35.
S_David said:Monte-Carlo is not for the integration by the way.
I wouldn't even report the Monte Carlo results. I don't trust them. There are too many unknowns and uncontrolled errors.S_David said:Any comment on this? Is it acceptable to say on a scientific article that the small discrepancy in results is due to some inaccuracy in the simulations?
Dale said:I wouldn't even report the Monte Carlo results. I don't trust them. There are too many unknowns and uncontrolled errors.
Dale said:Isn't your whole concern that the Monte Carlo simulation does not verify your result?
In any case, the Monte Carlo is also a numerical result, so how can you use one numerical result to verify another. Since the two methods disagree then there are two possibilities, either you made a mistake in the code or numerical errors are causing the disagreement. If the disagreement is due to numerical errors then the problem is in the Monte Carlo since it does not control numerical errors.