Perform linear regression on a single variable