*
It is currently Mon Oct 20, 2025 9:45 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Calculating trend-lines, exponential, linear, etc..
PostPosted: Fri Dec 10, 2010 5:00 pm 
Offline

Joined: Tue Oct 05, 2010 10:14 pm
Posts: 167
Hi - I always had little patience for math. Can anyone who is good at math/calculus advise on calculating appropriate trend lines? Exponential decay, linear etc.

I understand the basic formula for exponential decay is y = a(1 - r)x, but what if the rate of change is not constant or in one direction - or +?

Any suggested formula for my data so far -- which goes up and down?

Pre TSM: 63
W1: 22
W2: 34
W3: 46.5
W4: 50
W5: 38.5
W6: 35.5
W7: 39
W8: 33.5
W9: 28.5
W10: 23
W11: 16.5
W12: 19
W13: 17

Thanks...I hope any discussion here will also be useful to others looking at charting trend lines.


Top
 Profile E-mail  
 
 Post subject: Re: Calculating trend-lines, exponential, linear, etc..
PostPosted: Sat Dec 11, 2010 1:20 pm 
Offline

Joined: Wed Sep 29, 2010 8:52 pm
Posts: 116
Merlot, possible fit scenarios for the exponential decay would be:

1. Single two-parameters exponent: y = A*exp(-b*x) where "exp(-b*x)" stands for the constant e to the power of "-b*x". This describes steady decay from a maximal starting point where y=A to essentially zero with a rate constant of the decay equal to b. Rate constant has a physical time meaning: the amplitude "y" drops by 2.72 times over period of 1/b. E.g., in my weekly fit, b=0.3 which means that my consumption is dropping 2.7 fold over approximately 3.3 weeks.

2. The decay straight to zero is a wrong fit for those trending to a moderation instead of abstinence. In this case the more appropriate exponential function would be three-parameters: y = A0+A*exp(-b*x).
It's the same as above except that decay stabilized on a level of A0, never reaching zero. E.g., in my weekly fit it is now 13.8 units.

3. More complex (and probably esoteric) case would be described by a double exponential decay where there are in total five parameters: y = A0+A1*exp(-b*x)+A2*exp(-c*x). This would describe what probably happened in my case: first very quick decay down to the level of A0+A2 that happens with a rate constant b followed by a slower decay to a baseline A0 with a rate constant of c.

#3 requires much more data and much more precise data to give a meaningful fit that is for sure different from #2. This is rarely the case and that is why I settled for a single exponent decaying to a non-zero baseline. Still, to give you an idea how it looks, here are the parameters for the fit to my weekly data:
A0=13.02
A1=33.24
b=2.51
A2=31.76
c=0.16
So if this trend is solid and continues, the inference is that before TSM my consumption was A0+A1+A2=78.02, it dropped down to 48.9 over period of 1/b=0.4 weeks, eventually reached a new baseline of A0+A2=44.8 and decayed from there to 13.02 per week with a rate of 2.7-fold every 1/c=6.25 weeks.

Your data don't yet show a trend to any definite function and, in particular, that 22 units dip at first week throws off the fits. Formal fit to a single exponent down to zero says that you started with A=49.6 units per week and it decays to zero 2.7-fold every 15 weeks (but this is not a good fit and the numbers need to be taken with a pound of salt). You are experiencing a steady decline and that's all that really matters!


Top
 Profile E-mail  
 
 Post subject: Re: Calculating trend-lines, exponential, linear, etc..
PostPosted: Sun Dec 12, 2010 6:08 pm 
Offline

Joined: Tue Oct 05, 2010 10:14 pm
Posts: 167
Wow, thanks for all of that Nutella. It appears it is too early for me to use an exponential formula. Once I have a whole lot more data I'll revisit those options. Perhaps a 4 or 5 week moving average trend line would work with the first data point using pre-TSM units and then adding and subtracting a week. :)


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group