Check QR computation of least squares \(\beta\)

Using real (e.g. the cars data) or simulated data, compute the least squared regression coefficents using the QR decomposition and check that you get the same thing as software such as R (e.g. the lm function) or sklearn (e.g. sklearn.linear_model.LinearRegression).

Time the QR decomposition

How long does it take to compute the QR Decompostion?

Vary the dimension of \(X\) and see how the time to compute the QR decompostion of \(X\):w depends on the dimension.