Secure the data points from the regression-analysis predicted results. If we assume that you ran a regression analysis against a simple function y = f(x) where for every x, you will have a different value of y, you will have a set of x, y points. As an example, let's assume the data points are: {(2, 3) (3, 4) (5, 7) (6, 8)}.
Measure or secure the actual results of the event you attempted to predict with the regression analysis. This will be the measured results where for every value of x, you measured or collected the actual value of y. As an example, let's assume your actual data points are: {(2, 4) (3, 6) (5, 5) (6, 7)}. Note that the x value is the same for both the predicted and the actual results.
Calculate the y residual value for each x-value using the formula: Y-Residual = Ymeasured- Ypredicted. Continuing with our example:
For x = 2, residual = 4-3 = 1
For x = 2, residual = 6-4 = 2
For x = 3, residual = 5-7 = -1
For x = 4, residual = 7-8 = -1
A positive residual simply says that the measured value was more than the predicted and a negative residual means that the measured value was less than the predicted.