필터 지우기
필터 지우기

how to prolong the fit distribution curve to reach x-axis ?

조회 수: 3 (최근 30일)
Amr Hashem
Amr Hashem 2015년 10월 31일
댓글: Star Strider 2015년 11월 1일
I got the best fit distribution to a failure rate (data)
Now I want to prolong the fitted distribution curve to reach x-axis (in both tails)
I use:
binWidth = 1;
binCtrs = 0:binWidth:18;
figure
hist(data,binCtrs);
counts = hist(data,binCtrs);
nu = length(data);
prob = counts / (nu * binWidth); % rescale the figure
figure
plot(binCtrs,prob,'ro');
paramEsts = gevfit(data); %estimate parameter
xgrid = linspace(0,18,100);
pdfEst = gevpdf(xgrid,paramEsts(1),paramEsts(2),paramEsts(3)); hold on;
line(xgrid,pdfEst,'color','b')
to (fit distribution &) produce this figure:
Now , I want to prolong/extend the curve to reach x-axis
I try:
xaxis=linspace(-5,22); % create Matching vector
line(xaxis,pdfEst,'color','r')
but it produced another distribution.

채택된 답변

Star Strider
Star Strider 2015년 10월 31일
According to the documentation on the Generalized Extreme Value Distribution particualrly the Examples section, it may or it may not have a zero probability at some value of x. (It will never cross zero.) It all depends on what the distribution is for your data. Extend your xgrid vector in the negative and positive directions and see what it does.
Experiment!

추가 답변 (1개)

Amr Hashem
Amr Hashem 2015년 10월 31일
I got it...
xgrid = linspace(-20,20,100);

Community Treasure Hunt

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

Start Hunting!

Translated by