# Assessing numerical error in solving a least squares problem

I have a linear system of the type

$$Ax = b$$

I want to minimise $$|b - Ax|^2$$. I know there are different approaches to directly solve the system (Normal equation + Cholesky, QR decomposition, SVD decomposition) that have different numerical stability.

I would like to ask how it is possible to estimate the impact of the numerical error on the estimates of each parameter $$x$$.

• Can it be done solely on the base of the condition number?

• Should it be done using Monte Carlo simulation?

• How should such simulation be designed?

• Is your problem a linear system (square?), or a least squares problem $\min \|Ax-b\|$? Because the algorithms you list are the classical choices to solve LS problems, not to solve linear systems (even though some of those decompositions can do both jobs). Mar 21, 2019 at 8:05
• @FedericoPoloni You are right the question was unclear, I edited it. Mar 22, 2019 at 8:18

$$Ax - b = r\approx 0$$
The solver will usually provide you with the residual error like: $$|r|$$.