added biased, unbiased, total error, and plot function