Page 1 of 1

What's this distribution called?

Posted: Mon Feb 01, 2021 10:13 am
by Allo V Psycho
It's the difference between a linear function (just y = x here) and an exponential (y = 12.3. e0.021x). So it reaches 0 twice, where the exponential cuts the linear, and it's asymmetric. What's a quick way of calculating the maximum?
This is the theoretical graph. Because of noise (it's biology!) an actual data point in each set might lie below zero.
Ed: sp

Re: What's this distribution called?

Posted: Mon Feb 01, 2021 10:23 am
by shpalman
So that's y = x - 12.3*exp(0.021*x) ?

dy/dx = 1 - (12.3*0.021)*exp(0.021*x) = 1 - 0.2583*exp(0.021*x)

the maximum in y is when the derivative is zero, so

1 = 0.2583*exp(0.021*x)

exp(0.021*x) = 3.8715

0.021*x = ln(3.8715) = 1.3536

x = 1.3536/0.021 = 64.46.

Your maximum looks to be at a slightly larger x; it's important that you repeat these above calculations but at your best numerical precision. (I always tell the students to work with symbols and put the numbers in at the end).

Re: What's this distribution called?

Posted: Mon Feb 01, 2021 10:28 am
by shpalman
Ok if I write it as y = x - A.exp(r.x)

the maximum is at x = -ln(A.r) / r

Re: What's this distribution called?

Posted: Mon Feb 01, 2021 10:35 am
by jaap
shpalman wrote:
Mon Feb 01, 2021 10:28 am
Ok if I write it as y = x - A.exp(r.x)

the maximum is at x = -ln(A.r) / r
And if your straight line is y=CX+D, i.e. your actual function is
y = Cx+D - A.exp(rx),
then the maximum is at
x = ( ln(C) - ln(A*r) ) / r.

Re: What's this distribution called?

Posted: Mon Feb 01, 2021 11:56 am
by Allo V Psycho
shpalman wrote:
Mon Feb 01, 2021 10:23 am
So that's y = x - 12.3*exp(0.021*x) ?

dy/dx = 1 - (12.3*0.021)*exp(0.021*x) = 1 - 0.2583*exp(0.021*x)

the maximum in y is when the derivative is zero, so

1 = 0.2583*exp(0.021*x)

exp(0.021*x) = 3.8715

0.021*x = ln(3.8715) = 1.3536

x = 1.3536/0.021 = 64.46.

Your maximum looks to be at a slightly larger x; it's important that you repeat these above calculations but at your best numerical precision. (I always tell the students to work with symbols and put the numbers in at the end).
Perfect! Thank you, and thanks to Jaap too.