You are on page 1of 30

ZunZun.

com

Physicist Peter's Custom Equation

Equation Family: Miscellaneous


y = A + B*(X-C) + 0.5*G*(X-C)**2

Wed Feb 5 17:00:58 2014 local server time

http://zunzun.com

Page 1 of 30

Mark 6:53-56

And when they had passed over, they came into the land of Gennesaret, and drew to the shore. And
when they were come out of the ship, straightway they knew him, And ran through that whole region
round about, and began to carry about in beds those that were sick, where they heard he was. And
whithersoever he entered, into villages, or cities, or country, they laid the sick in the streets, and
besought him that they might touch if it were but the border of his garment: and as many as touched
him were made whole.

Read or search the King James Bible online at


http://quod.lib.umich.edu/k/kjv/

http://zunzun.com

Page 2 of 30

Coefficients

y = A + B*(X-C) + 0.5*G*(X-C)**2
Fitting target of lowest sum of squared absolute error = 3.5375377442728176E-06
A
B
C
G

http://zunzun.com

=
=
=
=

4.4802945381686374E-02
9.1759653506420780E-01
0.0000000000000000E+00
9.6094939267681241E+00

Page 3 of 30

Coefficient and Fit Statistics

Most statstics from scipy.odr.odrpack and http://www.scipy.org/Cookbook/OLS


LL, AIC and BIC from http://stackoverflow.com/questions/7458391/python-multiple-linear-regression-us
ing-ols-code-with-specific-data
Degrees of freedom (error): 10
Degrees of freedom (regression): 3
Chi-squared: 3.53753774427e-06
R-squared: 0.99995721381
R-squared adjusted: 0.999944377953
Model F-statistic: 77903.4248532
Model F-statistic p-value: 1.11022302463e-16
Model log-likelihood: 86.4728192195
AIC: -11.7818313171
BIC: -11.5992435086
Root Mean Squared Error (RMSE): 0.000502674116549
A = 4.4802945381686374E-02
std err squared: 1.97121E-07
t-stat: 1.00911E+02
p-stat: 2.22045E-16
95% confidence intervals: [4.38137E-02,
B = 9.1759653506420780E-01
std err squared: 1.60251E-04
t-stat: 7.24855E+01
p-stat: 6.21725E-15
95% confidence intervals: [8.89390E-01,
C = 0.0000000000000000E+00
std err squared: 0.00000E+00
t-stat: NAN
p-stat: NAN
95% confidence intervals: [0.00000E+00,
G = 9.6094939267681241E+00
std err squared: 2.46098E-02
t-stat: 6.12557E+01
p-stat: 3.26406E-14
95% confidence intervals: [9.25995E+00,
Coefficient Covariance Matrix
[
0.61294855 -14.57252165
0.
[ -14.57252165
498.30241139
0.
[ 0. 0. 0. 0.]
[
149.73683951 -5960.28894189
0.

http://zunzun.com

4.57922E-02]

9.45803E-01]

0.00000E+00]

9.95903E+00]

149.73683951]
-5960.28894189]
76524.43521256]

Page 4 of 30

Error Listing

Independent Data
Dependent Data
Predicted
0.000E+00
4.450E-02
4.4802945382E-02
1.790E-02
6.300E-02
6.2767412334E-02
3.480E-02
8.300E-02
8.2554045564E-02
4.890E-02
1.010E-01
1.0116257493E-01
6.270E-02
1.210E-01
1.2122510182E-01
7.410E-02
1.395E-01
1.3917880130E-01
8.630E-02
1.590E-01
1.5977579227E-01
9.600E-02
1.778E-01
1.7717276076E-01
1.067E-01
1.970E-01
1.9741201133E-01
1.156E-01
2.155E-01
2.1508466822E-01
1.256E-01
2.358E-01
2.3584968324E-01
1.339E-01
2.540E-01
2.5381443873E-01
1.429E-01
2.730E-01
2.7404239318E-01
1.503E-01
2.920E-01
2.9125737093E-01

http://zunzun.com

Abs Error
Rel Error
3.029454E-04
6.807761E-03
-2.325877E-04
-3.691868E-03
-4.459544E-04
-5.372945E-03
1.625749E-04
1.609653E-03
2.251018E-04
1.860346E-03
-3.211987E-04
-2.302500E-03
7.757923E-04
4.879197E-03
-6.272392E-04
-3.527780E-03
4.120113E-04
2.091428E-03
-4.153318E-04
-1.927294E-03
4.968324E-05
2.107008E-04
-1.855613E-04
-7.305562E-04
1.042393E-03
3.818290E-03
-7.426291E-04
-2.543250E-03

Page 5 of 30

Error Statistics

Absolute Error
Minimum:
Maximum:
Mean:
Std. Error of Mean:
Median:
Variance:
Standard Deviation:
Skew:
Kurtosis:

http://zunzun.com

-7.426291E-04
1.042393E-03
-1.349853E-13
1.394167E-04
-6.793901E-05
2.526813E-07
5.026741E-04
4.748285E-01
-6.211260E-01

Relative Error
-5.372945E-03
6.807761E-03
8.437023E-05
9.552160E-04
-2.599277E-04
1.186169E-05
3.444080E-03
3.138847E-01
-8.904169E-01

Page 6 of 30

Data Statistics

X
Minimum:
Maximum:
Mean:
Std. Error of Mean:
Median:
Variance:
Standard Deviation:
Skew:
Kurtosis:

http://zunzun.com

0.000000E+00
1.503000E-01
8.540714E-02
1.269906E-02
9.115000E-02
2.096461E-03
4.578712E-02
-3.284659E-01
-1.042620E+00

Y
4.450000E-02
2.920000E-01
1.682929E-01
2.131391E-02
1.684000E-01
5.905674E-03
7.684838E-02
-1.894040E-03
-1.214823E+00

Page 7 of 30

Source Code in C++

// To the best of my knowledge this code is correct.


// If you find any errors or problems please contact
// me directly using zunzun@zunzun.com.
//
//
James

#include <math.h>
// Fitting target: lowest sum of squared absolute error
// Fitting target value = 3.53753774427e-06
double Miscellaneous_PhysicistPeterCustomEquation_model(double x_in)
{
double temp;
temp = 0.0;
// coefficients
double A = 4.4802945381686374E-02;
double B = 9.1759653506420780E-01;
double C = 0.0000000000000000E+00;
double G = 9.6094939267681241E+00;
temp = A + B*(x_in-C) + 0.5*G*pow(x_in-C, 2.0);
return temp;
}

http://zunzun.com

Page 8 of 30

Source Code in Java

// To the best of my knowledge this code is correct.


// If you find any errors or problems please contact
// me directly using zunzun@zunzun.com.
//
//
James

import java.lang.Math;
// Fitting target: lowest sum of squared absolute error
// Fitting target value = 3.53753774427e-06
class Miscellaneous_PhysicistPeterCustomEquation
{
double Miscellaneous_PhysicistPeterCustomEquation_model(double x_in)
{
double temp;
temp = 0.0;
// coefficients
double A = 4.4802945381686374E-02;
double B = 9.1759653506420780E-01;
double C = 0.0000000000000000E+00;
double G = 9.6094939267681241E+00;
temp = A + B*(x_in-C) + 0.5*G*Math.pow(x_in-C, 2.0);
return temp;
}
}

http://zunzun.com

Page 9 of 30

Source Code in JavaScript

// To the best of my knowledge this code is correct.


// If you find any errors or problems please contact
// me directly using zunzun@zunzun.com.
//
//
James

// Fitting target: lowest sum of squared absolute error


// Fitting target value = 3.53753774427e-06
function Miscellaneous_PhysicistPeterCustomEquation_model(x_in)
{
var temp;
temp = 0.0;
// coefficients
var A = 4.4802945381686374E-02;
var B = 9.1759653506420780E-01;
var C = 0.0000000000000000E+00;
var G = 9.6094939267681241E+00;
temp = A + B*(x_in-C) + 0.5*G*Math.pow(x_in-C, 2.0);
return temp;
}

http://zunzun.com

Page 10 of 30

Source Code in Python

# To the best of my knowledge this code is correct.


# If you find any errors or problems please contact
# me directly using zunzun@zunzun.com.
#
#
James

import math
# Fitting target: lowest sum of squared absolute error
# Fitting target value = 3.53753774427e-06
def Miscellaneous_PhysicistPeterCustomEquation_model(x_in):
temp = 0.0
#
A
B
C
G

coefficients
= 4.4802945381686374E-02
= 9.1759653506420780E-01
= 0.0000000000000000E+00
= 9.6094939267681241E+00

temp = A + B*(x_in-C) + 0.5*G*math.pow(x_in-C, 2.0)


return temp

http://zunzun.com

Page 11 of 30

Source Code in C#

// To the best of my knowledge this code is correct.


// If you find any errors or problems please contact
// me directly using zunzun@zunzun.com.
//
//
James

using System;
// Fitting target: lowest sum of squared absolute error
// Fitting target value = 3.53753774427e-06
class Miscellaneous_PhysicistPeterCustomEquation
{
double Miscellaneous_PhysicistPeterCustomEquation_model(double x_in)
{
double temp;
temp = 0.0;
// coefficients
double A = 4.4802945381686374E-02;
double B = 9.1759653506420780E-01;
double C = 0.0000000000000000E+00;
double G = 9.6094939267681241E+00;
temp = A + B*(x_in-C) + 0.5*G*Math.Pow(x_in-C, 2.0);
return temp;
}
}

http://zunzun.com

Page 12 of 30

Source Code in SCILAB

// To the best of my knowledge this code is correct.


// If you find any errors or problems please contact
// me directly using zunzun@zunzun.com.
//
//
James

// Fitting target: lowest sum of squared absolute error


// Fitting target value = 3.53753774427e-06
function y = Miscellaneous_PhysicistPeterCustomEquation_model(x_in)
temp = 0.0;
// coefficients
A = 4.4802945381686374E-02;
B = 9.1759653506420780E-01;
C = 0.0000000000000000E+00;
G = 9.6094939267681241E+00;
temp = A + B*(x_in-C) + 0.5*G*power(x_in-C, 2.0);
y = temp;
endfunction

http://zunzun.com

Page 13 of 30

Source Code in MATLAB

% To the best of my knowledge this code is correct.


% If you find any errors or problems please contact
% me directly using zunzun@zunzun.com.
%
%
James

% Fitting target: lowest sum of squared absolute error


% Fitting target value = 3.53753774427e-06
function y = Miscellaneous_PhysicistPeterCustomEquation_model(x_in)
temp = 0.0;
%
A
B
C
G

coefficients
= 4.4802945381686374E-02;
= 9.1759653506420780E-01;
= 0.0000000000000000E+00;
= 9.6094939267681241E+00;

temp = A + B.*(x_in-C) + 0.5.*G.*power(x_in-C, 2.0);


y = temp;

http://zunzun.com

Page 14 of 30

Source Code in VBA

' To the best of my knowledge this code is correct.


' If you find any errors or problems please contact
' me directly using zunzun@zunzun.com.
'
'
James
' Fitting target: lowest sum of squared absolute error
' Fitting target value = 3.53753774427e-06
Public Function Miscellaneous_PhysicistPeterCustomEquation_model(x_in)
temp = 0.0
' coefficients
Const A = 4.4802945381686374E-02
Const B = 9.1759653506420780E-01
Const C = 0.0000000000000000E+00
Const G = 9.6094939267681241E+00
temp = A + B*(x_in-C) + 0.5*G*Application.WorksheetFunction.power(x_in-C, 2.0)
Miscellaneous_PhysicistPeterCustomEquation_model = temp
End Function

http://zunzun.com

Page 15 of 30

Histogram of shifted time T (seconds)

http://zunzun.com

Page 16 of 30

Histogram of coordinate Y (meters)

http://zunzun.com

Page 17 of 30

Histogram of Absolute Error

http://zunzun.com

Page 18 of 30

Histogram of Relative Error

http://zunzun.com

Page 19 of 30

Histogram of Percent Error

http://zunzun.com

Page 20 of 30

Absolute Error vs. shifted time T (seconds)

http://zunzun.com

Page 21 of 30

Absolute Error vs. coordinate Y (meters)

http://zunzun.com

Page 22 of 30

Relative Error vs. shifted time T (seconds)

http://zunzun.com

Page 23 of 30

Relative Error vs. coordinate Y (meters)

http://zunzun.com

Page 24 of 30

Percent Error vs. shifted time T (seconds)

http://zunzun.com

Page 25 of 30

Percent Error vs. coordinate Y (meters)

http://zunzun.com

Page 26 of 30

coordinate Y (meters) vs. shifted time T (seconds)

http://zunzun.com

Page 27 of 30

shifted time T (seconds) vs. coordinate Y (meters)

http://zunzun.com

Page 28 of 30

coordinate Y (meters) vs. shifted time T (seconds) with model

http://zunzun.com

Page 29 of 30

coordinate Y (meters) vs. shifted time T (seconds) with 95% confidence intervals

http://zunzun.com

Page 30 of 30

You might also like