Creating a Normal Probability Curve
이전 댓글 표시
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
Torsten
2016년 8월 11일
Why do you think it should not exceed 1 ?
Best wishes
Torsten.
Georgios Vamvakopoulos
2016년 8월 11일
Torsten
2016년 8월 11일
You mean
normcdf(x,mu,sigma)
?
Best wishes
Torsten.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Triangular Distribution에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!