Least squares Definition and 168 Threads

  1. S

    C/C++ Least Squares source code in C++?

    Does anyone know where to find source code for a simple and fast least squares solver written purely in C++?
  2. C

    Nonlinear least squares problem

    Dear all, Apologies if this is in the wrong forum. I have a bit Nonlinear least squares fit problem. I have a pair of parametric equations (see attached, fairly nasty :frown: ). in it, a b c x0 y0 z0 are all constant, and they are the values I want to determine from a nonlinear least...
  3. L

    Why Do We Square Errors in Least Squares Regression?

    You must have used it couple of times while solving an engineering problem. For example in line fitting, why do we have to square? Can't we just pass the line thru the max number of points. Can someone explain. Thanks in advance.
  4. D

    Curve fitting and least squares method.

    Homework Statement I have an equation as a function of time. (eq1) C(t) = Css + a(e^.5t) + b(e^.9t) t>0 Where, Css is a constant. then I have 6 data points of time and C (Concentration of a liquid) 1. I have to find an equation to find the maximum time and contains a, b and Css...
  5. X

    Can linear least squares be used for inverse function approximation?

    Hi, Forgive me if the subject of this post is not accurate, I'm not quite sure what the correct terminology would be for what I'm trying to figure out. Currently I am using linear least squares via SVD to find the coefficients of a ten term polynomial, say f. This model allows me to...
  6. M

    Which Averages Determine the Linear Least Squares Fit in Physics Experiments?

    I am currently working on a lab report for my physics class. During the lab, we used air tracks, gliders, and a photogate to measure the value of 'g'. Basically, we would raise one end of the air track to a certain height and let the glider slide down the frictionless track and the timer would...
  7. G

    Normal assumption with least squares regression

    My google search just turns up results telling me that one of the assumptions I have to make is that each Y is normal. My question is why do I have to assume its normal. Why does it follow that it has to be normal as opposed to some other distribution? Hope that makes sense. Edit: I thought...
  8. K

    Why Use the Least Squares Method for Finding Slope?

    Homework Statement why did you use the least squares method for finding m, rather than the standard slope formula? Homework Equations The Attempt at a Solution I am totally confused about why you have to use the least squares method
  9. D

    Method of Least Squares Linear Fitting

    Homework Statement An experiment was conducted on a liquid at varying temperatures and the volume obtained at the differing temperatures are as follows: V/cm3 θ/oC 1.032 10 1.063 20 1.094 29.5 1.125 39.5 1.156 50 1.186 60.5 1.215 69.5 1.244 79.5 1.273 90 1.3 99 Assume that V...
  10. H

    Constrained Cubic Polynomial Fitting: A Bezier Approach?

    Anybody know the math/theory behind linear least squares where the curve is forced to go through the first and last data points?I'm specifically dealing with cubic polynomials. In standard linear least squares formulation (i.e. ATAc = ATy) the curve doesn't, in general, go through any of...
  11. M

    Least Squares Solution - Or is there?

    I have a problem that says to find the least squares solution to \newcommand{\colv}[2] {\left(\begin{array}{c} #1 \\ #2 \end{array}\right)} K x = \colv{2}{2} for K = \left( \begin{array}{cc} 1 & 2\\ 2 & 4 \end{array} \right). Then express the solution in the form x = w + z, where w is in the...
  12. B

    Minimizing Distance Between Two Lines

    Can someone help with the folowing? Suppose L1 is the line through the origin in the direction of a1 and L2 is the line through b in the direction of a2. I am supposed to find the closest points x1a1 and b+x2a2 on the two lines. So I am trying to find the equations that would minize...
  13. C

    The least squares approximation - best fit lines revisited

    We all know the least squares method to find the best fit line for a collection of random data. But I wonder if it is the best method. Suppose we have two random variables y and x that appear to have a linear relation of the type y = ax+b. What we want is, given the next type x signal to...
  14. K

    Linear Algebra: Least Squares and vectors

    Hi, I was working on a problem and I can't figure out what I'm supposed to do. It reads, find the vector in subspace S that is closest to v; write v as the sum of a vector in S and a vector in S^a; and find the distance from v to S. S spanned by {(1,3,4)} v = (2,-5,1) Ok, what I did was...
  15. G

    Least squares and integration problem

    Question states Consider the vector space C[-1,1] with an inner product defined by <f,g> = the integral from 1 to -1 of f(x)g(x) dx a) Show that u1(x)= 1/(2^.5) u2(x)= ((6^.5)/2)x form an orthonormal set of vectors b) Use the result from a) to find the best least squates...
  16. H

    Linear Regression, Linear Least Squares, Least Squares, Non-linear Least Squares

    It seems to me that Linear Regression and Linear Least Squares are often used interchangeably, but I believe there to be subtle differences between the two. From what I can tell (for simplicity let's assume the uncertainity is in y only), Linear Regression refers to the general case of fitting...
  17. A

    Least squares regression problem

    Hi, I am having some difficulty with this problem: what would be Y^h^a^t if s_y_/_x = 439, n = 24 and 95% confidence interval estimate for the average Y given a particular value of X is 1125 and 1695. ----------------- I know Y^h^a^t = b_o + b_1x but I am not sure how I can use the...
  18. P

    Linear polynomial least squares

    Construct the normal equations for the linear polynomial least squares to fit the data x = [1 0 -1], y=[3;2;-1]. (a) Find the parameters of the linear regression u1, u2 using QR decomposition, and plot the data and the fit curve in a graph (paper and pencil). (b) Calculate the eigenvalues of the...
Back
Top