Derive coefficient of determination