Why confidence interval distributions overlap the distribution?
2 views (last 30 days)
I've a series of data that were scaled to a percentage of maximum which I need to compute the 20th percentile of the lower confidence interval distribution at 50%. So I fitted the data with lognormal distribution, truncated it to 100% and computed the two confidence distributions. Here the result http://s23.postimg.org/sby72j67v/fitting2.jpg. I do not understand why the three distributions overlap each other. What's wrong in my code? Thanks
Here the code:
pd1 = fitdist(Neutral', 'Lognormal');
YPlot = cdf(pd1,XGrid);
pd1 = truncate(pd1,0,100);
pdCI(1) = makedist('LogNormal',pdci(1),pdci(3));
pdCI(2) = makedist('LogNormal',pdci(2),pdci(4));
pdCI(1) = truncate(pdCI(1),0,100);
pdCI(2) = truncate(pdCI(2),0,100);
YPlotUB = cdf(pdCI(2),XGrid);
YPlotLB = cdf(pdCI(1),XGrid);
legend('Fitted data','70% lower confidence bound','70% upper confidence bound','Empirical data','Location','Best')
Tom Lane on 15 Jan 2016
A couple of things. First, take out your truncate statements and run the code. You'll see that the "LB" cdf is substantially below 1 and x=100. But when you truncate it, you force it up to 1 at x=100 and it looks a lot like the "UB" cdf.
Another thing is that it looks like you're using the lower limits of both parameters together, then the upper limits of both parameters together. That wouldn't necessarily give you a set of confidence bounds on the cdf.
I haven't quite got my head around what you'd like to do or how to do it.