I'm searching an equation to calculate the parameters for a linear fit. With parameters a and b, the $\chi ^{2}$ is used:
$\chi ^{2} = \sum_{i=0}^N (y_{i}-a.x_{i}-b)^{2}$
And with errors:
$\chi ^{2} = \sum_{i=0}^N (\frac{y_{i}-a.x_{i}-b}{\sigma_{i}}) ^{2}$
But now I want to do an analysis on a plot. Every datapoint is a point of two measured data which have both their own error bars. Now I'm thinking about how I can find a $\chi ^{2}$ formula with different error bars on the $x_{i}$ and the $y_{i}$?
After a long search and asking some people about it, I've found my answer. Seemed that deming regression solves the problem!