run minimization inside linreg
add figure for question 1.a