Questions about (linear or nonlinear) least-squares, an estimation method used in statistics, signal processing and elsewhere.
Questions tagged [least-squares]
1853 questions
1
vote
0 answers
How to proof $\beta_1 = \frac{(Sy) r}{Sy}$
I can proof uptill $\beta_2 = \sum_{i=0}^n \frac{(Y_i-\text{mean of} \;y)(X_i-\text{mean of} \;x)}{X_i-\text{mean of} \;x}$
1
vote
0 answers
Least Squares Approximation by a Trig Polynomial
One of my questions from my review sheet is:
Let $f(x) = |x| \text{ for } x \in [−\pi, \pi]$.
(a) Find the least squares approximation to $f(x)$ by a trigonometric polynomial of degree $n$.
(b) Let $x_j = −\pi + j(2\pi/8)$. Find the interpolating…
bananagurlz
- 33
1
vote
1 answer
What parameters can be used to tell a least squares fit is "well fit"?
A least squares fit to data gives an equation but how can I tell if the created equation fits into data "well"? I thought of using residuals between data and the equation but is there a more general approach to this problem?
I need this because I'm…
VolkanOzcan
- 187
1
vote
1 answer
Least squares where $Cx$ is always equal or greater than d
I have a $C$ (matrix $40\times 13$) and $d$ (40). When I use least squares I get $x$. But then when I do $C*x$ the result can be sometimes less than $d$. Is there a way to make sure you always get $C*x \geq d$ ?
If not, what other approach would you…
Zdenek
- 11
1
vote
0 answers
Specifying sigma in generalized least squares
I am learning linear regression techniques and understand that when the assumption of homoscedasticity of error terms (residuals) are violated we prefer generalized least squares (GLS). One of the methods of GLS requires us to first run an OLS and…
pavybez
- 103
1
vote
1 answer
Least square fit for a exponential function
I'm having trubble findint the least square fit for a set of data points ($\mathbf x$) of the form $x(t)=T_{\mathrm A}-\left(T_{\mathrm A}-T_{\mathrm S}\right)e^{\frac{-t}{\tau}}$. I want to find the best fit for $T_{\mathrm A}$, $T_{\mathrm B}$ and…
jagjordi
- 113
1
vote
2 answers
Solving a linear least squares problem with trigonometric functions
We want to calculate the amplitude $A$ and the phase angle $\phi$ of the oscillation $b(t)=A\sin(2t+\phi)$.
We have $t_k=(0,\pi/4, \pi/2, 3\pi/4)$ and $b_k=(1.6,1.1,-1.8,0.9)$
Use $\sin(A+B)=\sin(A)\cos(B)+\cos(A)\sin(B)$ and $\alpha=A\cos(\phi),…
xotix
- 887
1
vote
1 answer
Least-squares when some coefficient is $0$?
I'm trying to find least squares approximation $p(x)=c_1x+c_2x^2$ of $f(x)=xe^{x/2}$ in $[0,2]$.
Using the algorithm here, p.7.:
http://www.math.niu.edu/~dattab/MATH435.2013/APPROXIMATION.pdf
I'm able to come up with a $3 \times 3$ matrix $S$ and $3…
mavavilj
- 7,270
1
vote
2 answers
How to simplify OLS formulas?
Let $\lbrace x_i,y_i\rbrace_{i=1}^n$ be a random sample. I am trying to simplify the following expression
$$\frac{\sum_{i=1}^n x_i y_i - n \bar{X}\bar{Y}}{\sum_{i=1}^n x_i^2 -n\bar{X}^2}$$
to show it equals $$\frac{S_{xy}}{S_x^2}$$
I've been…
Stan Shunpike
- 4,921
1
vote
1 answer
The validity of Least Squares Fitting to a specific problem
I'm going to try and keep this question broad, so I apologise if it's poorly written.
I have a series of functions;
$$ \Psi_{j} = \sum_{n = 1}^{N} A_{n} \sinh{2 \pi n S_{j}} \cos{2 \pi n X_{j}} + A_{N + 1}S_{j} $$
In which $S_{j}$'s and $X_{j}$'s…
pokl90
- 27
1
vote
1 answer
Least squares and QR factorization
I have a full-column-rank matrix $A \in \mathbb{R}^{N \times n} $ ($N >> n$):
$Q^{T} A = \begin{bmatrix}
R & w \\
0 & v \\
\end{bmatrix} , Q^{T} = \begin{bmatrix}
c \\
d \\
\end{bmatrix} $,
with $R \in \mathbb{R}^{(n-1)\times(n-1)}, w \in…
Derk
- 277
1
vote
2 answers
How to find a "least squares" line with a known slope?
I have gps trackings that I know they fall into a certain pattern - a line with a known angle. How do I find the line that minimizes the distances of the points from it but is in the correct angle?
Unfortunately, I can't post an image for example.
user3316066
- 13
1
vote
1 answer
$_Linear regression for polynomial fitting
I am doing some curve fitting. The theoretical curve is hyperbolic and have the form $(x-x_0)(y-y_0)=c$. This is not linear, so the normal linear least square regression is not apply immediately.
However I noticed if I transform it to
$$xy - y_0x -…
Earth Engine
- 145
1
vote
0 answers
Least squares with errors in input, errors also a function
this is my first post here, so I hope I'll word everything correctly.
I am an amateur mathematician, who does his problems for fun.
I am tackling a system of non linear equations, with errors in the input values. I linearized the system, and…
1
vote
2 answers
Least Square fit for signal data (360 points)
I would like to analyze data to get the maximum value out of 360 points.
I used least square fitting because I get the data from signal strengths. I want to remove any outliers I get from my data which is highly possible since the signal strength…
user573014
- 111