Adding a linear or logistic equation to a curve plot

See discussion here: Adding a trendline or line of best fit - #7 by piever