Point $1$: When there is $1$ car passing the road, the average speed is $50$ km/h.
Point $2$: When there are $5$ cars passing the road, the average speed is $45$ km/h.
Point $3$: When there are $12$ cars passing the road, the average speed is $38$ km/h.
A traffic engineering company decides to model the average speed (shown by $u$) as a linear function of the number of cars (shown by $n$). So we want to have
$u(n)=\alpha+\beta n$ .
- Using Point $1$ , Point $2$ and Point $3$ information: write a system of linear equations to calculate $\alpha$ and $\beta$ using all three points; i.e. we will have three equations with two unknowns.
You are given the equation, and also a few data points: for each of the three scenarios, you have the number of cars ($n$) and the observed average speed ($u(n)$).
So your three equations are \begin{align*} 50 &= \alpha + \beta\\ 45 &= \alpha + 5\beta\\ 38 &= \alpha + 12\beta \end{align*}
Can you write this in matrix form, i.e. can you write down a matrix $M$ and vector $b$ such that $$M\left[\begin{array}{c}\alpha\\\beta\end{array}\right] = b?$$
An overconstrained system of equations does not always have a solution. But you can always find an $\alpha$ and $\beta$ that minimizes the error, i.e. minimizes the square residual: $$\min_{\alpha, \beta}\quad \left\|M\left[\begin{array}{c}\alpha\\\beta\end{array}\right] - b\right\|^2.$$ Finding this minimizier is called solving the least squares problem. Do you need more help for how to solve it here?