Confidence Interval
Show older comments
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
Accepted Answer
More Answers (2)
Alex
on 28 Oct 2011
0 votes
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)
Jorge
on 31 Oct 2011
0 votes
Categories
Find more on Uniform Distribution (Continuous) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!