Академический Документы
Профессиональный Документы
Культура Документы
Ramkumar R
February 7, 2013
Ramkumar R Curve tting
Ramkumar R Curve tting
Random variables
Probability functions
Discrete PMF
CDF
F
X
(x) = Prob{X x} (1)
PDF
f
X
(x) = F
(x) (2)
Ramkumar R Curve tting
Moments
Central moment (x )
m
= (x x)
m
Second Variance
2
= (x x)
2
= x
2
x
2
Non-central moment X
m
2
exp
_
(x )
2
2
2
_
(3)
Ramkumar R Curve tting
Chi-square PDF
Q =
k
i =1
X
2
i
(4)
f
Q
(x; k) =
_
1
2
k/2
(k/2)
x
k/2 1
e
x/2
; x 0
0 ; x < 0
(5)
where X
i
s are normallly distributed random variables with 0 mean
and variance 1.
Ramkumar R Curve tting
Chi-square CDF
After integration, we get the Chi-square CDF in terms of an lower
incomplete function dened as
(s, x) =
_
x
0
t
s1
e
t
dt (6)
Then the Chi-square CDF equals
(
k
2
,
2
2
)
(
k
2
)
(7)
Ramkumar R Curve tting
What does curve tting mean?
i =1
exp
_
1
2
_
y
i
y
i (t)
_
2
_
y (8)
ie. Minimizing its negative logarithm
_
N
i =1
[y
i
y
i (t)
]
2
2
2
_
N log y (9)
Minimizing this sum over a
1
, a
2
, ..a
M
, we get the nal form:
N
i =1
[y
i
y
i (t)
]
2
(10)
Ramkumar R Curve tting
Chi-square tting
Modifying equation ?? to replace the by
i
and going through
the same process, we get
2
=
N
i =1
_
y
i
y
i (t)
i
_
2
(11)
where
y
i (t)
= f (a
1
, a
2
, ..a
M
) (12)
For models that are linear in the as, however, it turns out that the
probability distribution for dierent values of chi-square at its
minimum can nevertheless be derived analytically, and is the
chi-sqaure distribution for N-M degrees of freedom.
Ramkumar R Curve tting
gnuplot
gnuplot> fit f(x) foo.data u 1:2:3:4 via a, b
Numerical Receipies in C