Creating a Normal Probability Curve
Show older comments
Hello,
I have a problem. I want to create a probability density function for a distribution. Initialy the only known values were the maximum and the minimum 95th percentile of the distribution. With maximum at 1.5 and minimum 0.66.
Using these values I calculated the mu = 1.08 and sigma = 0.24, based on 0.66 = mu - 2*sigma and 1.5 = mu +2*sigma But the problem is that whenever I insert the code in Matlab the probability density function graph is going over 1
This is my code
% Drag Coefficient
mu = 1.08;
sigma = 0.24;
x = (mu - 5 * sigma) : (sigma / 100) : (mu + 5 * sigma);
pdfNormal = normpdf(x, mu, sigma);
string = 'the maximal pdfNormal is';
string = sprintf('%s :%d', string,max(pdfNormal));
disp(string)
plot(x, pdfNormal);
Thank you in advance for your reply :)
3 Comments
Torsten
on 11 Aug 2016
Why do you think it should not exceed 1 ?
Best wishes
Torsten.
Georgios Vamvakopoulos
on 11 Aug 2016
Torsten
on 11 Aug 2016
You mean
normcdf(x,mu,sigma)
?
Best wishes
Torsten.
Accepted Answer
More Answers (0)
Categories
Find more on Triangular Distribution 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!