Weighted Least Squares Solution

In summary, the conversation discusses using a weighting factor to solve a system of equations represented by a matrix. The measurements in equations 1 and 3 are given twice the weight compared to equations 2 and 4. The attempt at solving the system using a diagonal matrix with all elements as 2 or 1 did not work. However, the conversation ends with the individual stating that they have now solved the problem.
  • #1
samgrace
27
0

Homework Statement


\begin{bmatrix}
3x_{1}& 7x_{2}& 4x_{3} \\
3x_{1}& 4x_{2}& 5x_{3} \\
x_{1}& 10x_{2}& 8x_{3} \\
8x_{1}& 8x_{2}& 6x_{3} \\
\end{bmatrix}
=
\begin{bmatrix}
26 \\
16 \\
33 \\
46 \\
\end{bmatrix}
the measurements represented by equations 1 and 3 above can be trusted more than those represented by equations 2 and 4 and are given twice the weight.

Write down an explicit matrix form for the system of equations.

Solve it using Matlab.

However all I really need is to find the weighting factor, I can do the rest from there, struggling to see how I can weight the first and third rows by a factor of two, whilst simultaneously leaving the first and fourth alone.

Homework Equations



I am going to use

Ax = b
e = W(Ax-b)
so

e^{T}e = (Ax-b)^T*W^T*W*(Ax-b)

so A^T*W^T*W*A*x = A^T*W^T*W*b

basically multiply that out and solve via guassian elimination for x

The Attempt at a Solution



e = W(Ax-b)

\begin{bmatrix}
e \\
e \\
e \\
e \\
\end{bmatrix}

=
\begin{bmatrix}
?& ?& ?& ?& \\
?& ?& ?& ?& \\
?& ?& ?& ?& \\
?& ?& ?& ?& \\
\end{bmatrix}

*

\begin{bmatrix}
3x_{1}& 7x_{2}& 4x_{3}& -26& \\
3x_{1}& 4x_{2}& 5x_{3}& -16& \\
x_{1}& 10x_{2}& 8x_{3}& -33& \\
8x_{1}& 8x_{2}& 6x_{3}& -46& \\
\end{bmatrix}

I have tried various combinations of 4x4 matrices for the ? matrix (weighting matrix) that will result in the weighting factor needed, e.g a diagonal 4x4 matrix of 2's, works however the other rows get multiplied by this as well. Please inform me of how to find this.
 
Physics news on Phys.org
  • #2
samgrace said:
e.g a diagonal 4x4 matrix of 2's, works however the other rows get multiplied by this as well.
Then you should use "1" instead of "2" at some places.
 
  • #3
Need all of the elements in rows 1 and 3 to be multiplied by two and this cannot be acheived if some are ones. Also need all the elements in rows 2 and 4 to remain the same and this cannot be acheied if some are twos. Tried an algebraic finding of the weighing coefficients but to no avail.
 
  • #4
No need for an answer I have now solved it
 
  • #5
samgrace said:
No need for an answer I have now solved it
You can help others with the same question in the future if you post the solution here.
 
  • #6
samgrace said:
No need for an answer I have now solved it

Did you use 2 or √2 in your matrix W? Do you see why this is not a silly question?
 

FAQ: Weighted Least Squares Solution

What is the Weighted Least Squares Solution method?

The Weighted Least Squares Solution is a mathematical method used to estimate the parameters of a linear regression model. It takes into account the variability of the data points and assigns weights to each data point based on its relative importance in the overall dataset.

When is the Weighted Least Squares Solution method used?

The Weighted Least Squares Solution method is typically used when the data points have varying levels of uncertainty or when the data is heteroscedastic (i.e. the variance of the data points is not constant).

How does the Weighted Least Squares Solution differ from Ordinary Least Squares?

The main difference between the Weighted Least Squares Solution and Ordinary Least Squares is that the former assigns different weights to each data point, while the latter gives equal weight to all data points. This means that the Weighted Least Squares Solution takes into account the variability of the data, while Ordinary Least Squares treats all data points as equally reliable.

What are the advantages of using the Weighted Least Squares Solution?

The Weighted Least Squares Solution has several advantages, including:

  • It can account for heteroscedasticity in the data
  • It can give more accurate parameter estimates when the data points have varying levels of uncertainty
  • It can reduce the effect of outliers in the data

Are there any limitations to using the Weighted Least Squares Solution?

One limitation of the Weighted Least Squares Solution is that it requires prior knowledge or assumptions about the weights assigned to each data point. If these weights are not accurate, it can lead to biased parameter estimates. Additionally, the Weighted Least Squares Solution is more computationally intensive compared to Ordinary Least Squares, which can be a disadvantage for large datasets.

Similar threads

Replies
9
Views
1K
Replies
3
Views
1K
Replies
3
Views
1K
Replies
10
Views
1K
Replies
1
Views
704
Replies
5
Views
2K
Back
Top