Transform a fitted exponential curve in an exponetial distribution

41 Views Asked by At

I am not a mathematician, but I want to do this:

Let us suppose to have some data exponential distributed in an interval $[a,b]$, I want to find the exponential distribution of this data and the mean. I polyfitted the data with NumPy in order to get two parameters, let us call $c_0$ and $c_1$.

Now the curve that describes the data is $f_1(x) = e^{c_1}*e^{c_0x}$. The data grow increasing x, while in the exponential distribution, there is decay, so I consider $f_1(-x)$. Now I have $f_2(x) = e^{c_1}*e^{-c_0x}$.

To be a distribution, I need that the integral $\int_{a}^{b} f_2(x) \,dx=1$. So I divide the function for this integral. Now I have the $f_3= \frac{f_2}{\int_{a}^{b} f_2(x) \,dx}$. I computed the integral in Wolfram Alpha and I tried to apply a little bit of algebra to derive a form like $ f_3 = \lambda*e^{-\lambda x}$ in order to get the mean $\frac{1}{\lambda}$, but I didn't succeed. The idea is to get the mean of the data knowing that they are exponentially distributed. To do this I tried to get an exponential distribution to describe my data without success

Can someone help?

1

There are 1 best solutions below

4
On BEST ANSWER

I'm not entirely sure what you have done and you want to do. But here's some remarks:

  1. You have somehow obtained the function $f_2(x) = e^{c_1}e^{-c_0 x}$. You say you want this because it is exponential: problem is that it is not. We may want to compute $c_1$ such that the resuting function is the exponential distribution (which is for $c_1 = \log c_0$)
  2. an exponential distribution has support $[0,\infty)$ which means that if you rstrict to $[a,b]$ the resulting distribution is not exponentially distributed
  3. I don't understnd why you want so desperately to have an exponential: is it just because you know an easy way to say what its mean is? We can simpy compute the mean of you r.v. distributed according to your $f_3$ by using the definition of mean: assume $X$ has density given by $f_3$ then its mean is: $$ \mathbb{E}[X] := \int_{a}^{b} xf_3(x) dx $$