Math 2.0

Statistics Definition

Weighted least squares

Builds on Generalized least squaresOrdinary least squaresHeteroscedasticity

Definition

Let XX be a real n×pn \times p matrix with rows x1T,…,xnTx_1^T, \dots, x_n^T and rank pp, let y∈ℝny \in \R^n, and let w1,…,wn>0w_1, \dots, w_n > 0 be weights. Let WW be the diagonal matrix with diagonal entries w1,…,wnw_1, \dots, w_n. The weighted least squares estimator is the minimiser of ∑i=1nwi(yi−xiTb)2\sum_{i=1}^n w_i (y_i - x_i^T b)^2 over b∈ℝpb \in \R^p, which is β^WLS=(XTWX)−1XTWy.\hat\beta_{\mathrm{WLS}} = (X^T W X)^{-1} X^T W y.

Remarks

Example: take p=1p = 1 and XX the column of ones, so that xiTb=bx_i^T b = b. The function ∑iwi(yi−b)2\sum_i w_i (y_i - b)^2 has derivative −2∑iwi(yi−b)-2 \sum_i w_i (y_i - b), which vanishes at b=∑iwiyi/∑iwib = \sum_i w_i y_i / \sum_i w_i, the weighted mean. The formula agrees: XTWX=∑iwiX^T W X = \sum_i w_i and XTWy=∑iwiyiX^T W y = \sum_i w_i y_i.

Non-example: if some weight is negative, the objective need not be bounded below. With n=1n = 1, p=1p = 1, x1=1x_1 = 1 and w1=−1w_1 = -1, the function −(y1−b)2-(y_1 - b)^2 has no minimum.

In a model y=Xβ+εy = X\beta + \varepsilon with uncorrelated errors and Var⁡(εi)=σi2\operatorname{Var}(\varepsilon_i) = \sigma_i^2, the choice wi=1/σi2w_i = 1/\sigma_i^2 gives the generalized least squares estimator with Ω=diag⁡(σ12,…,σn2)\Omega = \operatorname{diag}(\sigma_1^2, \dots, \sigma_n^2). This is the usual remedy for known heteroscedasticity. With all weights equal it is ordinary least squares.

Reading path

To understand this page from the ground up, read these 4 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Generalized least squares concept
  2. Heteroscedasticity concept
  3. Ordinary least squares concept
  4. Weighted least squares definition

Further reading

  1. Web https://en.wikipedia.org/wiki/Weighted_least_squares
About this page
TagNA5X6JVK5J
URIm2://NA5X6JVK5J
Kinddefinition
WritingW0 stub
MSC62J05
DefinesWeighted least squares
UsesGeneralized least squares, Ordinary least squares, Heteroscedasticity

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.