How can I compute the CDF between - infinity to TH

32 ビュー (過去 30 日間)
Telema Harry
Telema Harry 2021 年 4 月 29 日
コメント済み: Paul 2021 年 5 月 1 日
Please how can I compute the CDF of the shaded portion in matlab.
TH = 5.
The two PDF was generated from the code below.
pd = makedist('Normal')
x = -20:.1:20;
%pdf_x = pdf(pd,x);
pdf_x = normpdf(x,0,5);
plot(x,pdf_x,'r','LineWidth',2)
hold on
pd2 = makedist('Normal',1,1)
y = -20:.1:20;
% pdf_y = pdf(pd2,y);
pdf_y = normpdf(y,10,5);
plot(y,pdf_y,'b','LineWidth',2)
hold on
%xlim([-15 15])
xline(0,'k--', 'LineWidth',2)
xline(10,'k--', 'LineWidth',2)
xline(5,'k', 'LineWidth',2)
set(gca,'XTick',[], 'YTick', [])
hold off

採用された回答

Paul
Paul 2021 年 4 月 29 日
編集済み: Paul 2021 年 4 月 29 日
Check out
doc normcdf
  2 件のコメント
Telema Harry
Telema Harry 2021 年 5 月 1 日
normcdf(TH, Mean,Var). Did the trick.
Paul
Paul 2021 年 5 月 1 日
Please recheck your result. The third input to normcdf() is the standard deviation, not the variance, as is also the case with normpdf().

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProbability Distributions and Hypothesis Tests についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by