When I moved from my easygraph to jCharts, I didn't
reimplement the linear regression functionality. This was
kind of nice, because it showed the user, in general
terms, if his score was improving or decreasing, and how
quickly it was changing.
There's code (java implementation of algorithm
from "Numerical Recipes in C") in
net.sourceforge.pavlov.easygraph.DescriptiveStatistics.
Also, you can use the slope of the regression line to tell
the user some interesting stuff, like if he keeps going,
he'll be above 95% in 8 more questions, etc.