Confused about Weighted Least Squares

Click For Summary
SUMMARY

The discussion centers on the application of Weighted Least Squares (WLS) in linear modeling, specifically the equation Y = Xβ + ε. Participants clarify that the weight matrix W should be a diagonal matrix representing the inverse of the variances of measurements Y, assuming uncorrelated errors. It is established that using an identity matrix for W implies equal measurement variances, which simplifies the model but may not accurately reflect real-world measurement errors. The goal remains to minimize the weighted sum of squared residuals, regardless of the specific values assigned to the weights.

PREREQUISITES
  • Understanding of linear regression models, specifically the equation Y = Xβ + ε.
  • Familiarity with the concept of variance and its application in statistical modeling.
  • Knowledge of matrix operations, particularly diagonal matrices and their implications in WLS.
  • Basic grasp of residual analysis and the significance of minimizing squared residuals.
NEXT STEPS
  • Research the implementation of Weighted Least Squares in Python using the statsmodels library.
  • Explore the differences between Ordinary Least Squares (OLS) and Weighted Least Squares (WLS) in practical applications.
  • Learn about the implications of measurement error on statistical modeling and how to quantify it.
  • Investigate case studies where WLS is preferred over OLS for real-world data analysis.
USEFUL FOR

Statisticians, data analysts, and researchers involved in linear modeling and regression analysis, particularly those interested in addressing measurement errors and optimizing model accuracy.

tom8
Messages
19
Reaction score
0
I am trying to use Weighted Least Squares with a linear model: Y = Xβ + ε, where Y are some observed measurements and β is a vector of estimates. For example, in this case β has two terms: intercept and slope.

The weighted least squares solution, as shown here, involves a weight matrix, W, defined as a diagonal matrix whose elements are inverse of the variance of the measurements Y (here we assume the measurements are uncorrelated so the matrix is diagonal). But this mean that, if I just keep W as an identity matrix, then I am assuming a measurement with errors / variances equal to 1 unit. So if my measurements are in meters, then I am assuming 1 m of variance. So it is unclear to me how this matrix W is used to represent measurement error in real life.
 
Physics news on Phys.org
tom8,
The variances would be in squared units. But in any case the goal is to minimize the (weighted) sum of the squared residuals. If you use equal weighting (so that W is the identity matrix), then you minimize the sum of the squared residuals. It doesn't matter so much what the units/scaling used for the weights are; the important thing is that the weights have the correct relative values (all equal weights in this case). Then, the same set of inputs will produce the same residual.
To give a very simple example, suppose you have a set of measurements of some value ##x## that come out to be ##(1.0, 1.1, 0.9) ~\mathrm{m}##. Then your least squares estimate for the true value of ##x## should minimize:
##w_1(x-1.0)^2 + w_2(x-1.1)^2 + w_3(x-0.9)^2##.
Assuming that all three measurements are equally good (they are all unbiased and have the same variance) so that you choose equal weighting, it shouldn't change the answer whether ##w_1 = w_2 = w_3 = 1~\mathrm{m}^2## or ##w_1 = w_2 = w_3 = ~10 \mathrm{m}^2##.
 
  • Like
Likes   Reactions: BWV
Curious what actual problem would make weighted least squares necessary be OLS
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 23 ·
Replies
23
Views
4K
Replies
24
Views
3K
  • · Replies 5 ·
Replies
5
Views
9K
  • · Replies 18 ·
Replies
18
Views
3K