Back in High School I remember the TI-84 calculator allowing the user to enter a few data points and then select from a list of options to find an equation that best fit the data points. One of these options was called Logistic and it found the variables "a","b", and "c" for the equation of the form
$$ y = \frac{1}{c+ae^{-bx}} $$
I figured that I would easily find an online calculator that would do the same thing, but after going through various google results for "logistic regression" or "logistic best fit", I found something with which I was not familiar. The online calculators for logistic regression seem to be for classifying data rather than provide a best-fit equation. Perhaps there's a way to use the calculators, but they all require a column with 0 or 1, which doesn't make sense for my data.
After further investigation, I was unable to find the source code or method by which the TI-84 was calculating the best-fit logistic equation to fit a set of data points. Also, I was unable to find any other online calculator that would give me the functionality of the TI-84 calculator.
If you're interested, the data points I have are as follows:
Hours | Remaining |
---|---|
0 | 38708 |
1 | 38466 |
3 | 37444 |
3.5 | 37126 |
4 | 36642 |
4.5 | 36001 |
5 | 35275 |
5.5 | 34460 |
6 | 33079 |
7 | 29936 |
8.5 | 19587 |
9 | 12136 |
Now, this data wouldn't fit the original form, but rather a form like $$ y = d - \frac{1}{c+ae^{f-bx}} $$
Since I couldn't find any easy way to fit the data, I decided to guess using desmos.com and 5 sliders for the a,b,c,d,and f variables. After some guessing I was able to come up with $$ y = 40500 - \frac{1}{-0.00002+0.0000794e^{2.3-0.29x}} $$ which seems to fit somewhat okay.
My background is more on the software side of things, so I'm interested in knowing how a computer program might be able to solve this type of problem or at least find a close approximation.