How Does Least Squares Determine the Mean and Variance?

  • Thread starter zollen
  • Start date
  • Tags
    Square
In summary: Also, because the projector isn't invertible, you can't use it to find the line that is closest to the given b.
  • #1
zollen
3
0
This problem projects b = (b1,b2...,bm) onto the line through a = (1, 1, 1, ...1). We solve m equations ax = b in 1 unknown (by least squares).

(a) Solve aT a ##\hat{x}## = aT b to show that ##\hat{x}## is the mean (the average) of the b’s.
(b) Find e = b - a ##\hat{x}## and the variance ||e||2 and the standard deviation ||e||
(c) The horizontal line ##\hat{x}## = 3 is closest to b = (1, 2, 6). Check that p = (3, 3 3) is perpendicular to e and find the 3 by 3 projection matrix P.

Ans(a): Because a = (1,1,1,...1), therefore aT a = 1 + 1 + 1 +...+ 1 = 1 * m = m
And aT b = b1 + b2 + ... + bm
So ##\hat{x}## = (b1 + b2 + b3 + ... + bm) / m = bavg

Ans(b): Need help..

Ans(c): Need help..
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
Ans(b):
Given ##\hat{x}## = bavg (from Ans(a))
Therefore
[tex]e = b - a \hat{x} =
\begin{bmatrix}
b_1\\
b_2\\
..\\
b_m
\end{bmatrix}
~-~
\begin{bmatrix}
1\\
1\\
..\\
1
\end{bmatrix}
~b_{avg}
=
\begin{bmatrix}
e_1\\
e_2\\
..\\
e_m
\end{bmatrix}
[/tex]

[tex]||e||^2~=~\frac{{e_1}^2 + {e_2}^2 + ... + {e_m}^2}{m}[/tex]
[tex]||e||~=~\sqrt{ \frac{{e_1}^2 + {e_2}^2 + ... + {e_m}^2}{m} }[/tex]

Ans(c): [tex]p=Pb~~and~~P= \frac{a * a^t}{a^t * a}[/tex]
[tex]a = \begin{bmatrix}
1\\
1\\
1
\end{bmatrix}[/tex]
But...
[tex]a^t * a
~=~
\begin{bmatrix}
1&1&1\\
1&1&1\\
1&1&1
\end{bmatrix}[/tex] has no inverse...

Would anyone show me how to calculate the projection matrix?
 
Last edited by a moderator:
  • #3
zollen said:
Ans(c): [tex]p=Pb~~and~~P= \frac{a * a^t}{a^t * a}[/tex]
[tex]a = \begin{bmatrix}
1\\
1\\
1
\end{bmatrix}[/tex]
But...
[tex]a^t * a
~=~
\begin{bmatrix}
1&1&1\\
1&1&1\\
1&1&1
\end{bmatrix}[/tex] has no inverse...

Would anyone show me how to calculate the projection matrix?
I'm not sure what you're trying to do here.

## \mathbf {aa}^T## is a rank one matrix with trace of 3.

## \mathbf {a}^T \mathbf a = 3## i.e. it is a scalar.

of course by cyclic property of trace and the fact that the trace of a scalar is that scalar, we have##\mathbf {a}^T \mathbf a =trace\big(\mathbf {a}^T \mathbf a\big) = trace\big(\mathbf {aa}^T\big) = 3##

Projectors (that aren't the identity) are always not invertible. Your projector is simply ##\propto \mathbf {aa}^T## i.e. you re-normalize its sole non-zero eigenvalue to be one. Then as usual, the trace operation gives you the rank of your projector.

A couple of concerns:

I'm not sure why you introduced a ##*## operation, or why you divide by "##\mathbf {a}^T \mathbf a##" in your projector formula without recognizing that it is a scalar -- in general 'dividing by a matrix' doesn't make any sense except for the very special case when it is in fact a non zero scalar that we're talking about. (Hadamard products are excluded from this writeup.)
 

Related to How Does Least Squares Determine the Mean and Variance?

1. What is the least square basic problem?

The least square basic problem is a mathematical method used to find the best fit line or curve for a given set of data. It involves minimizing the sum of squared residuals between the observed data points and the predicted values from the model.

2. How is the least square basic problem solved?

The least square basic problem is solved by finding the values of the model parameters that minimize the sum of squared residuals. This is typically done using an algorithm such as the Gauss-Newton method or the Levenberg-Marquardt algorithm.

3. What are the assumptions of the least square basic problem?

The least square basic problem assumes that the data is normally distributed and that there is no correlation between the independent variables. It also assumes that the errors in the data are independent and have equal variances.

4. What are the applications of the least square basic problem?

The least square basic problem is widely used in various fields, including statistics, engineering, economics, and physics. It is commonly used for regression analysis, time series analysis, and curve fitting to analyze and model data.

5. What are the advantages of using the least square basic problem?

The least square basic problem provides a simple and efficient way to find the best fit line or curve for a given set of data. It also provides a measure of goodness of fit, allowing for comparisons between different models. Additionally, it can handle both linear and non-linear relationships between variables.

Similar threads

  • Linear and Abstract Algebra
Replies
5
Views
2K
  • Linear and Abstract Algebra
Replies
5
Views
2K
  • Quantum Interpretations and Foundations
2
Replies
35
Views
4K
  • Linear and Abstract Algebra
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
  • Introductory Physics Homework Help
Replies
25
Views
457
  • Linear and Abstract Algebra
Replies
2
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
557
  • Linear and Abstract Algebra
Replies
2
Views
1K
  • Linear and Abstract Algebra
Replies
4
Views
1K
Back
Top