Confidence Interval
4 次查看(过去 30 天)
显示 更早的评论
Good afternoon. I am working in MATLAB, developed a software that uses the generation of random numbers according to the normal distribution. I wanted to know how to calculate the confidence interval for this generation of numbers? For example, 15,000 numbers with N (0,2.5).
thank you
0 个评论
采纳的回答
Walter Roberson
2011-10-28
The confidence of what ?
Do you perhaps mean the confidence that the generated numbers really are representative of the normal distribution, then consider (for example) using http://www.mathworks.com/help/toolbox/stats/ttest.html
Keep in mind, of course, that low confidence is not disproof. With the normal distribution you could end up with 15000 copies of the number -42: such a thing is not impossible, just low probability.
更多回答(2 个)
Alex
2011-10-28
Like Walter said, you need to define what you mean by "confidence interval".
A normal distribution can be purely characterized by it's first 2 moments, which are more commonly known as the Mean and the Variance (hence N(mean, variance)).
If you want to see how close your random set of 1500 numbers are to N(0,.25) you simply need to take the mean of those number and the variance of the numbers.
If the mean of those numbers is near 0 and the variance is near .025, then you can have a high confidence that your sample space represIents a normal distribution adequately.
Going to other distributions will make this much harder, because they need more information, compared to a Normal dist., to be characterized.
Addition: if you want a way to measure how close the sample is to the distribution, I would suggest a MSE ErrorAmount = ((wanted var - sample var)^2 + (wanted mean - actual mean)^2)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!