 Site Statistics  |   Contact  |   About Us       Wednesday, April 01, 2020

 "Curve Fitting Solutions" Straight Line Fit Method
 f(x) = (1.72857142857143, 0.928571428571429, 0.190862703084106)
 (constant)  (x)   (standard deviation)

 x-array = { , , , , , } y-array = { , , , , , } [ Initial x-array: { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0 } ] [ Initial y-array: { 1.9, 2.7, 3.3, 4.4, 5.5, 6.5 } ]

IMPLEMENTATION
Curve Fitting Linear Fit

The most popular curve fitting technique is the least squares method. The simplest linear regression is the straight line fit, which attempts to fit a straight line using the least squares technique.

Algorithm Creation

The model function has the following simple form:

 f(x;α) = a + bx

where the sum of the linear regression becomes,

 S(a,b) = ∑ni=0[yi - f(xi;α]2 = ∑ni=0(yi - a - bxi)2

The standard deviation α can be expressed by,

 α = √ S / n - m Testing the Straight Line Fit Method

In order to test theStraight Line Fit Method as defined above, a new TestStraightLineFit() static method has been added and executed. Supporting code and methods are not shown.

static void TestStraightLineFit();
{
ListBox1.Items.Clear();
double[] xarray = new double[] { t1, t2, t3, t4, t5, t6 };
double[] yarray = new double[] { t7, t8, t9, t10, t11, t12 };
double[] x = new double[] { t11, t12, t13, t14 };
double[] results = CurveFitting.StraightLineFit(xarray, yarray);
VectorR v = new VectorR(results);
}

As a sample we provide the input data points using two double arrays x-array and y-array. Running this example generates results (1.729, 0.929, 0.191). Therefore, the regression line is given by:

 f(x) = 1.729 + 0.929x

and the standard deviation is,

 0.191

The user can manipulate all values and try variations on the arrays themselves by specifying new estimate values.

 Other Implementations...

 Object-Oriented Implementation Graphics and Animation Sample Applications Ore Extraction Optimization Vectors and Matrices Complex Numbers and Functions Ordinary Differential Equations - Euler Method Ordinary Differential Equations 2nd-Order Runge-Kutta Ordinary Differential Equations 4th-Order Runge-Kutta Higher Order Differential Equations Nonlinear Systems Numerical Integration Numerical Differentiation Function Evaluation

 You are viewing this tab ↓   Math, Analysis,
expertise..."

EIGENVALUE SOLUTIONS...
Eigen Inverse Iteration
Rayleigh-Quotient Method
Cubic Spline Method

 Applied Mathematical Algorithms A complex number z = x + iy, where... Complex Functions Non-linear system methods... Non Linear Systems Construction of differentiation... Differentiation Consider the function where... Integration
 About Us KMP Engineering is an independent multidisciplinary engineering consulting company specializing in mathematical algorithms. KMP Website > Site Statistics > Contact Us KMP ENGINEERING 2461 E Orangethorpe Ave Fullerton, CA 92631 USA info@keystoneminingpost.com Site Map > Home > Areas of Expertise > Reference Items > Managed Services > Login Mining & Software Engineering 