se function

Computing the squared error