Research Solutions and Resources


What is X2 ?

RESOURCES > EIS > FITTING CIRCUITS > CHI-SQUARED

When we hear about "least squares," it is  X² that is being minimized. What is it? And how can I relate its value to a "goodness-of-fit" that I can understand?

MORE

If we are trying to fit some data, y, to a known function, f(x), we can write chi-squared as (See Numerical Recipes in C, Chapter. 15) 

Definition of chi-squared      (1)

In this equation, sigma is the standard deviation of measurement i, which may be different for each point measured. The problem with X² as written is that its value depends on the number of points used!  Simply duplicating all of your data points doubles the value of X²!  Consequently, I prefer to look at X²/(n-m), where m is the number of adjustable parameters in the fit, and (n-m) is the number of degrees of freedom. If the estimates for sigma are reasonable, then X²/(n-m) should approximate unity, regardless of the number of data points, and different data sets are easily compared.

In many electrochemical experiments, the current varies widely over the course of the experiment, and it is measured by a potentiostat that is used in the autoranged mode. This is generally true of a Tafel experiment in a corrosion application, or in an EIS measurement over several decades of frequency. Many of the instrumental sources of noise (e.g., quantization noise at the ADC, or amplifier noise in the signal chain) lead to errors which are (approximately) a fixed fraction, epsilon, of the full scale current. Because the autoranging algorithm strives to keep the measured current (yi) close to the full scale current, we may write: sigma=epsilon*y. Further, we see that with this assumption, weighting each of the points by yi allows us to recast equation (1) as 

Equation 2(2)

Minimizing E2 is the same as minimizing X2 with this weighting assumption.  However, taking the square root of E2 gives the relative error in the measured current (i.e., epsilon! ) That is a number most of us can understand! A value of E2 of 1e-4 translates to an average 1% error in the measured y values. [ sqrt( E2 ) = sqrt( 1E-4 ) = 0.01 ==> 1% ]

Home

What's New?

Electrochemistry
Resources
CONTENTS

The Bookstore
CONTENTS

Search

Contact Us!

Tell Us !
How useful was
this information?


More about EISMore About EIS
Top

 How useful was this information? Give us your FEEDBACK !

© Copyright 2001-2004 Research Solutions & Resources.
All rights reserved.

Valid HTML 4.0!
Validated by W3C