What is Chi-squared: Definition and 26 Discussions

A chi-squared test, also written as χ2 test, is a statistical hypothesis test that is valid to perform when the test statistic is chi-squared distributed under the null hypothesis, specifically Pearson's chi-squared test and variants thereof. Pearson's chi-squared test is used to determine whether there is a statistically significant difference between the expected frequencies and the observed frequencies in one or more categories of a contingency table.
In the standard applications of this test, the observations are classified into mutually exclusive classes. If the null hypothesis that there are no differences between the classes in the population is true, the test statistic computed from the observations follows a χ2 frequency distribution. The purpose of the test is to evaluate how likely the observed frequencies would be assuming the null hypothesis is true.
Test statistics that follow a χ2 distribution occur when the observations are independent. There are also χ2 tests for testing the null hypothesis of independence of a pair of random variables based on observations of the pairs.
Chi-squared tests often refers to tests for which the distribution of the test statistic approaches the χ2 distribution asymptotically, meaning that the sampling distribution (if the null hypothesis is true) of the test statistic approximates a chi-squared distribution more and more closely as sample sizes increase.

View More On Wikipedia.org
  1. Leo Liu

    I Two-sample t test vs. chi-squared test for homogeneity

    The purpose of t test is to find how close the two means of the two samples given are; whereas the result of ##\chi^2## homogeneity test indicates the likeness of the two distributions of two populations (or maybe samples--I am not sure). Can anyone please tell me the differences between them...
  2. L

    MHB How can I solve P(X>28.41) using the chi-squared distribution?

    I'm not quite sure how to solve the question with two approaches. Let X be the time taken for the cars to arrive. Given that 1 car passes every 2 mins, theta = 2. We are interested in the 10th car that passes so alpha = 10. Thus I know the distribution is Gamma~(theta=2,alpha=10) I can solve...
  3. M

    I Chi-squared fit with errors on both x and y

    Hello I have some data points which have errors on both x and y coordinates. I want to fit a straight line to them but I am not sure how to take the error on x into account. Normally, when I have just the error on y, I want to minimize $$\sum\frac{(y_{pred}(x)-y_{measured}(x))^2}{\sigma_y^2}$$...
  4. J

    Chi-squared test for normality

    Homework Statement Hello, I was given 2 sets of data, showing 20 temperature values and 35 temperature values respectively. The data sets look like below: Data 1 Data 2 Temperature Temperature 30.9...
  5. Vital

    B Chi-squared test stat choosing a critical value

    Hello. I am doing problem sets on very basic stat topics. When solving problems that require the use of chi-squared table, I stumbled upon an unexpected issue. I seem to miss something important about how to correctly choose the right critical value using the chi-squared table. Below are two...
  6. K

    Understanding Chi-Squared Plots & CP Violation Ranges

    Would you please help me to understand the chi-squared plot the third plot in the bellow list. How can I relate the cp violation ranges to the 3 and 5 sigma? (http://inspirehep.net/record/1473193/plots)
  7. chastiell

    I About chi-squared and r-squared test for fitting data

    hi all, i just want you to tell me if my ideas are correct or not : As far as i can see the R^2 test is usually used in OLS (ordinary least squares) method where many conditions for data is showed (something like linearity in coefficients, expectation values for perturbations must be zero, and...
  8. mnb96

    Question on Pearson's Chi-squared test

    Hello, I was trying to interpret the formula of Pearson's Chi-squared test: \chi^2 = \sum_{i=1}^{n} \frac{(O_i - E_i)^2}{E_i} I thought that if we assume that each O_i is an observation of the random variable X_i, then the above formula essentially considers the sum-of-squares of n...
  9. J

    Difficulty with summation of non-central chi-squared random variables

    Hi, I am struggling trying to find the (equation of the) pdf of the sum of (what I believe to be) two non-central chi-squared random variables. The formula given on wikipedia (http://en.wikipedia.org/wiki/Noncentral_chi-squared_distribution) shows that the random variable associated with...
  10. D

    Pearson chi-squared test (χ2): differences?

    So, as far as I know, there are two χ2-tests: "test for fit of a distribution" & "Test of independence" How big of a mistake is it to use the one instead of the other in an exam for example (of course all exams are all different to some degree, but generally)? The only differences I can...
  11. nomadreid

    1-cdf value vs chi-squared statistic mislabeled on site?

    I am confused by the labeling of the (only) graph in http://en.wikipedia.org/wiki/Pearson%27s_chi-squared_test The values on the vertical axis appear to be the values of 1-(the chi-squared cumulative probability distribution values*) as I would expect in finding the p-values. However...
  12. nomadreid

    Chi-squared dist. converges to normal as df goes to infinity, but

    chi-squared dist. converges to normal as df goes to infinity, but... This is surely going to sound naive, but at least this will make it easy to answer. For a chi-squared distribution, if k = the degrees of freedom, then [a] k = μ = (1/2) σ2 [b] as k goes to infinity, the distribution...
  13. nomadreid

    Pearson's chi-square test versus chi-squared distribution

    I know that there are many web-sites that explain Pearson's chi-square test, but they all leave the same questions unanswered. First, to make sure I have the definitions right: 1) for a fixed population with standard deviation σ,a fixed number of degrees of freedom df=k, and a fixed sample with...
  14. N

    How to simulate Chi-squared distribution

    Is there any algorithm to simulate Chi-squared distribution? Here, the degrees of freedom is very large. It may be 10^8.
  15. U

    Chi-Squared Test on a table of Binomial Variates - Finding the expected frequencies

    Hi, Carry out a chi-squared test for the following table of frequencies of X ∼ Binomial(5,p) variates when (a) p = 0.3 x 0 1 2 3 4 5 Observed 162 346 303 149 36 4 frequency Now I know how to carry out the chi-squared test once I have...
  16. E

    Formulating null and alternative hypotheses for a chi-squared test

    I am attempting to investigate to what quantitative degree a physical theory agrees with observations of the phenomena it predicts (specifically, Fraunhofer theory). I want to use the chi-squared test to produce some confidence levels in the measurements made in different sections of the...
  17. A

    Who can perform a Chi-squared analysis on my linguistic data?

    I am doing a PhD in General Linguistics and I have a large amount of data on which I would have a Chi-squared analysis done. Unfortunately I don't know the first thing about maths. Could anyone help me or at least point me in the right direction? That would be much appreciated. Also, if you need...
  18. L

    Chi-squared and reduced Chi-squared

    In my physics honours lab to check our "goodness of fit" we have to use the Chi-squared and reduced Chi-squared equations. For the Lab we use the text Bevington Data analysis and error reduction. I'm having a problem on determining whether or not my chi-squared values are good because the...
  19. B

    Comment on the outcome of the experiment in the light of the chi-squared probability

    Homework Statement Plot the data with uncertainty bars and the best fit line on the same graph and comment on the outcome of the experiment in the light of the chi-squared probability and the graphical comparison of the best fit line and data The Attempt at a Solution my value for...
  20. B

    Calculate the chi-squared probability for the fit

    Homework Statement an experiment is performed to test whether the displacement D produced on a piezoelectric drive behaved linearly with the potential voltage V applied across it. The following data are obtained: V (volts) D (um) 0.1 50 0.2 101 0.3 151 0.4 198...
  21. O

    Chi-squared inverse function and incomplete gamma function

    is there a way to explicitly express the chi-squared inverse function? when programming it, I have had to resort to a guessing system where I find a chi value that is too low and too high, and evaluate the chi-squared CDF to reset the high and low points iteratively until it is within a...
  22. N

    Confidence Interval for Chi-Squared - read the quantile

    Homework Statement 1000 samples each of size n=121, where observations Xi ~ iid N ( m, sigma^2), for each sample we calculate Confidence Interval: I = [ 0.75 s^2, s^2 + s^2/4 ] where s^2=(1/(n-1))\Sigma(Xi-X bar)^2 how many samples include the true value of sigma^2, ie 1000 * prob...
  23. A

    Relating chi-squared and gaussian curves

    Simple question: can a chi-squared be represented as a gaussian distribution? I'm wondering if I can take some chi-squared numbers that I have and represent them as increasing/decreasing widths of FWHM of a gaussian. Can I?
  24. J

    Chi-squared analysis and budgeting weekly repair costs

    * I posted this in the Coursework section, but I wasn't sure if it would be answered there. * Here's my question: A plant supervisor is interested in budgeting weekly repair costs for a certain type of machine. Records over the past years indicate that these repair costs have an exponential...
  25. M

    Solving a Chi-Squared Test Divide by Zero Error

    What should I do when the expected value for a chi squared test is zero, so when I try to calculate the test statistic, i get a divide by zero?