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?
I'm not entirely sure what you have done and you want to do. But here's some remarks: