Set fixed endpoint of a sigmoid curve while changing starting position

functions

I have an equation where I would like to change the starting point.

Changing the starting point should change the steepness of the line.

This is my current equation:

$$
y = \frac{1}{1+e^{-k(x-m)}}
$$

Where $k$ is the slope and $m$ is the midpoint.

Is their any way to change this so that the endpoint is fixed, not the midpoint? Also, can the slope be related to the start point so that it smooths out the slope from the start to the finish? (Sorry if some of this does not make sense).

Best Answer

There's a good way to do this. First, let's use this formula:

$$y = \frac{1}{1+be^{-kx}}$$

Using this, when $x=0$, $y=\frac{1}{1+b}$. So plug in the value you want at $x=0$ and solve for $b$ (should be simple). Next, let's say your endpoint is when $y \geq 0.95$. Let's plug this into the formula and solve:

$$0.95 = \frac{1}{1+be^{-kx}}$$

$$be^{-kx} = \frac{1}{0.95} - 1$$

$$e^{-kx} = \frac{\frac{1}{0.95} - 1}{b}$$

$$-kx = \ln\biggl( \frac{\frac{1}{0.95} - 1}{b} \biggr)$$ $$k = \frac{-\ln\biggl( \frac{\frac{1}{0.95} - 1}{b} \biggr)}{x}$$

So here, plug in $b$ which you first calculated, then plug in $x$, which is the value you want the endpoint. For example, if I wanted the start value to be $0.25$, $b = 3$. Then if I want the endpoint at $x=5$, I plug it all in and get $k=0.80861$. Put all these values into the first formula, and bingo bango, there's your graph.