In statistics, the bias (or bias function) of an estimator is the difference between this estimator's expected value and the true value of the parameter being estimated. An estimator or decision rule with zero bias is called unbiased. Otherwise the estimator is said to be biased.
bias(observados, estimados)
vector of values observed.
vector of values estimated.
bias = (sum(estimados-observados))/length(observados)
see https://en.wikipedia.org/wiki/Bias_of_an_estimator for more details.