How to do a chi squared test on a linear fit

Click For Summary
A chi-squared test is commonly used in physics labs to assess the goodness of fit for a linear model against observed data. To perform this test in Excel, one must define the test statistic and the hypothesis being tested, as the term "chi-squared test" alone lacks specificity. The Pearson's chi-squared statistic is often employed to evaluate the fit, assuming that residuals from the linear fit are normally distributed. Users are encouraged to consult peers for software recommendations that can automate this process, as free options may be limited. Understanding the underlying assumptions and clearly stating the goals of the analysis are crucial for effective application of the chi-squared test.
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?
 
If there are an infinite number of natural numbers, and an infinite number of fractions in between any two natural numbers, and an infinite number of fractions in between any two of those fractions, and an infinite number of fractions in between any two of those fractions, and an infinite number of fractions in between any two of those fractions, and... then that must mean that there are not only infinite infinities, but an infinite number of those infinities. and an infinite number of those...

Similar threads

  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 23 ·
Replies
23
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 5 ·
Replies
5
Views
9K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 6 ·
Replies
6
Views
1K