# Logistic regression algorithm in Casio and Texas Instruments calculators

When using logistic regression on a Casio or Texas Instruments calculator, the output is of the form $$f(x) = \frac{c}{1+ae^{-bx}}$$ The problem I have (when teaching in a class where both types of calculators are used) is that for a given data set, the two calculators will sometimes give different answers, i.e. different values for $a$, $b$ and $c$.

I know the algorithms for polynomial and exponential regression, but am not sure about how logistic regression is actually implemented. The Wikipedia article on the logistic regression apparently describes only the situation where $c=1$, or where $c$ is given beforehand - and this is much simpler!

For an example where the calculators give different answers, take the $x$-values 10, 11, 12, 13, 14, with corresponding $y$-values 140, 153, 162, 169, 173. Here Casio gives $a=1.8432$, $b=0.0842987$, $c=407.35$, while TI gives $a=30.7$, $b = 0.465$, $c=181$. The latter answer looks a better fit to the data points, but the first is not completely nonsensical.

My two questions are:

1) Can someone describe an algorithm for determining the "best possible" values of $a$, $b$, and $c$ from a given set of data points $\{(x_i, y_i)\}_{i=1}^{n}$?

2) Does anyone know why there is a discrepancy between Casio and TI?

-
After plotting the functions and the data you gave, I'd argue against your "not completely nonsensical" description of the Casio results. It's nowhere even near the data points! – Ilmari Karonen Oct 17 '12 at 12:33
Ah, I had two of these examples in front of me when writing the question and may have chosen the "other" one. – Andreas H Oct 17 '12 at 19:33
TI calculators internally use the Levenberg-Marquardt algorithm for logistic regression. See this for instance. – J. M. Nov 8 '12 at 11:32