Generating a distribution around a parameter using monte carlo simulation.
显示 更早的评论
Hello, I wish for someone to help me explain (with a code example) how i can generate a distribution around a value (say 0.007695) using Monte Carlo simulation. I understand that I might first need to generate set of random variables using 0.007695 as control.
I will be grateful to get a response. Am just a basic user of matlab
采纳的回答
更多回答(1 个)
possibility
2018-10-26
Generally, the way it works is you already possess the data samples (say millions of them) and find the histogram of the data (frequency of the values that appears in the data). After that, you pick the optimum distribution model (Gaussian, Laplacian, chi-square, etc.) that fits best to your samples.
But, if you're trying to ask "how to generate samples from a distribution with a given statistical parameter (for ex: mean)", that would have meaningful answers.
One example,
randn
command generates samples from a gaussian distribution. Or
rand
generates samples from a uniform distribution. Just type
help rand
for details.
Hope that helps.
类别
在 帮助中心 和 File Exchange 中查找有关 Uniform Distribution (Continuous) 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!