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!