Functions related to simple linear regression when both variables are random