0
$\begingroup$

I have a data-set with range of 0 to 1. I'm fitting a distribution to it in MATLAB using fitdist(Data_set, 'exponential'). I want find third quartile with log(4)/λ . When I calculate this, the result is 4.28738As i mentioned my data set range is between 0 and 1. why this value is bigger than maximum of my data range? How can i solve this problem? I think this is from tail o exponential distribution.

$\endgroup$
5
$\begingroup$

I have a data-set with range of 0 to 1.

The exponential distribution seems not to be the right model since this distribution has support on the positive real line. This is, you are fitting a model that assigns positive probability to sets of values that are unreasonable in your context.

The most popular distributions with support on $(0,1)$ are the Beta distribution and the Kumaraswamy distribution. If you fit one of these, then you will get a quartile in the right range.

http://en.wikipedia.org/wiki/Beta_distribution

http://en.wikipedia.org/wiki/Kumaraswamy_distribution

fitdist(Data_set, 'Beta')
betainv(P,A,B)
$\endgroup$
5
  • $\begingroup$ Thank you for answer. I searched for quartiles of beta distribution but i didn't find something like exponential distribution. How can I calculate quartiles using a and b parameters of beta distribution? $\endgroup$ – user2991243 Aug 28 '14 at 21:54
  • $\begingroup$ @user2991243 For the beta distribution the quantile function is, unfortunately, not available in closed-form. However, you can approximate it numerically using MATLAB. $\endgroup$ – Troilo Aug 28 '14 at 21:57
  • $\begingroup$ How can I run this code? I think this isn't for MATLAB ! thanks. $\endgroup$ – user2991243 Aug 28 '14 at 21:59
  • $\begingroup$ @user2991243 I think I just found it: it is betainv. $\endgroup$ – Troilo Aug 28 '14 at 22:06
  • $\begingroup$ Can you prepare some sample code for using it in your main answer? thanks. $\endgroup$ – user2991243 Aug 28 '14 at 22:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.