Cumulative distribution fitting with an equation

1 view (last 30 days)
Hello!
I am trying to fit a cumative distribution with an equation. The equation is (k1*k2)/(k2-k1)*(exp(-t*k1)-exp(-t*k2)). Could anyone please help me how to do it? Here 'Book2.xlsx' values are the t values. I want k1 and k2 as output. Thanks in advance.

Answers (1)

Raunak Gupta
Raunak Gupta on 1 May 2020
Hi,
From the question I assume you first want to fit a distribution to the data that you have attached according to parametric equation. For this you can use mle where you may define the custom cdf and pdf accordingly to get Maximum likelihood estimate of the parameters in the distribution just like in case here k1 and k2.
For using this make sure that the parameter you have defined makes a valid pdf. In the above case. I am assuming the equation you have given is the pdf of the distribution and not the cdf because it sums up to 1 for all values of t. Otherwise if it is indeed a cdf then you may need to check because it doesn’t satisfy the properties of a cdf. You also need to mention initial estimates for k1 and k2, which satisfy the condition of the pdf or cdf being positive and less than 1.
You may look this example to get started.

Community Treasure Hunt

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

Start Hunting!