Testing if Data is close to the Exponential Distribution
14 views (last 30 days)
Show older comments
I want to see if the data that I have has an exponential distribution. I would like an empirical way to see how far from the exponential distribution the data's true distribution is.
Here is my data
X = [1.5236, 1.0138, 1.4330, 0.1246, 0.1251, 1.4544, .3800 ,0.9418,1.3444,1.5806,0.1252, 0.1262,1.4613,0.9354,0.1244,1.2701,0.1251,0.9222,1.4693,1.5419,1.3928,0.1259,0.9297,0.1248,1.4239,0.1248,0.9662,0.9982,0.1245,0.1230]
I tried using the allfitdist() function to test what it would look like compared to all distributions but it did not work well
[D, PD] = allfitdist(X, 'PDF')
I also tried Lilliefors test
[h,p] = lillietest(X,'Distribution','exponential','MCTol',1e-4)
But I know this can only tell me if it has reason to say it is not exponentially distributed. It cannot confirm the data has exponential distribution.
How can I take this data and see if it is exponentially distributed? Also, how can I find how far the true distribution is from the exponential distribution?
0 Comments
Accepted Answer
Torsten
on 4 Nov 2022
Edited: Torsten
on 4 Nov 2022
How can I take this data and see if it is exponentially distributed?
There is no way to do so.
Also, how can I find how far the true distribution is from the exponential distribution?
With "true distribution" you mean the empirical distribution ?
The result below doesn't look very convincing, does it ?
X = [1.5236, 1.0138, 1.4330, 0.1246, 0.1251, 1.4544, .3800 ,0.9418,1.3444,1.5806,0.1252, 0.1262,1.4613,0.9354,0.1244,1.2701,0.1251,0.9222,1.4693,1.5419,1.3928,0.1259,0.9297,0.1248,1.4239,0.1248,0.9662,0.9982,0.1245,0.1230];
pd = fitdist(X.','Exponential')
plot(pd)
3 Comments
Torsten
on 4 Nov 2022
Usually the span of the 95% interval for the estimation of "mu" is taken as a measure on how good the exponential distribution approximates your data - and this span is quite large in your case.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!