S=j=1J(f(xj)-pn(xj))2.