Trying to solve for parameters in a logistic function

30 Views Asked by At

I am modeling a certain trend with a logistic function:

$$\begin{align} y = \frac{1} {1 + e^{-k(x-X)}} \end{align}$$

I have the value of $y$ at some point $x_1$:

$$\begin{align} y_1 = \frac{ 1} {1 + e^{-k(x_1-X)}} \end{align}$$

and I know that at $x = x_2$, $y = 2y_1$:

$$\begin{align} 2y_1 = \frac{1} {1 + e^{-k(x_2-X)}} \end{align}$$

So I have 2 equations in 2 unknowns, but I can't figure out how to solve for $k$ and $X$ in closed form.

Is there a closed form solution?

1

There are 1 best solutions below

1
On BEST ANSWER

You can do $$y_1 = \frac{ 1} {1 + e^{-k(x_1-X)}} \\ \frac 1{y_1}-1=e^{-k(x_1-X)} \\ \log\left(\frac 1{y_1}-1\right)=-k(x_1-X)$$ and similarly $$\log\left(\frac 1{2y_1}-1\right)=-k(x_2-X)$$ Dividing them gets rid of $k$ and leaves you with an equation in $X$ or define $kX=z$ and solve two linear equations for $k,z$