Clear Filters
Clear Filters

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

2 views (last 30 days)
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.

Accepted Answer

Star Strider
Star Strider on 31 Oct 2015
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!

More Answers (1)

Amr Hashem
Amr Hashem on 31 Oct 2015
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!