How to do a chi squared test on a linear fit

  • Context: Undergrad 
  • Thread starter Thread starter Stickybees
  • Start date Start date
  • Tags Tags
    Chi Fit Linear Test
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 4K views
Stickybees
Messages
36
Reaction score
0
I'm getting a bit confused with the stats of a chi squared test, everyone in physics labs seems to use this as a test but I don't know why it's appropriate?

My main question is how would I take a linear equation in say excel which has been fitted to a series of (x,y) data points (I do have the errors for each point but excel doesn't use this) and fit use a chi squared test on this? (excel gives me an R2 value)

I have tried to find programs to do this automatically but none seem to be free.

Thanks for any help!
 
Physics news on Phys.org
Hey Stickybees.

You need to tell us the test statistic you are using (in terms or your data) as well as the hypothesis you are testing. Without these things there is bound to be some ambiguity in what you are talking about.
 
As chiro suggests, you have to say exactly what you are trying to accomplish. The phrase "Chi square test" by itself doesn't describe a goal. If you want to do what other people are doing, ask some of them about it. Find out the name of the software they are using - the documentation of the software might be available online, even if you can't get the software.

A "Pearsons" Chi square statistic is used to quantify the probability of some observed data under the assumption that it comes from some given distribution. If you want to use that test, you must specify what the data is and what the distribution is. A common assumption in fitting a straight line to data is that the "errors" or "residuals" in the y-values of the data are distributed as independent samples from a normal distribution distribution. Is that the assumption you wish to test?