Skip to main content
Statistics LibreTexts

16.8: Choosing the Correct Test- Chi-Square Edition

  • Page ID
    17434
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)

    We've discussed which test to choose previously (after learning about t-tests, and again after learning about ANOVAs), and we will again soon!  This section is just to help decide which Chi-Square analysis to use when you only have qualitative variables.  

    Which Chi-Square?

    You have seen the \(\chi^{2}\) test statistic used in two different circumstances. The bulleted list is a summary that will help you decide which \(\chi^{2}\) test is the appropriate one to use.

    • Goodness-of-Fit: Use the goodness-of-fit test to decide whether a population with an unknown distribution "fits" a known distribution. In this case there will be a single qualitative survey question or a single outcome of an experiment from a single population. Goodness-of-Fit is typically used to see if the population is uniform (all outcomes occur with equal frequency), the population is normal, or the population is the same as another population with a known distribution. In short:
      • Use the \(\chi^2\) Goodness of Fit when you only have one qualitative variable, and when
      • You are testing if the pattern of frequencies is about equal in all of the categories.
    • Independence: Use the test for independence to decide whether two qualitative variables (factors) are independent or dependent. In this case there will be two qualitative survey questions or experiments and a contingency table will be constructed. The goal is to see if the two variables are unrelated (independent) or related (dependent). In short:
      • Use the \(\chi^2\) Test of Independence when you only have two or more qualitative variables, and when
      • You are testing if the pattern of frequencies is about equal in all of the combined categories.

    In sum, the Goodness of Fit test is typically used to determine if data fits a particular distribution while the Test of Independence makes use of a contingency table to determine the independence of two factors. 

    Practice

    Exercise \(\PageIndex{1}\)

    Which test do you use to decide whether an observed distribution of frequencies of a qualitative variable is the same as an expected distribution?

    Answer

    Goodness of Fit test

     

    Exercise \(\PageIndex{2}\)

    Which test would you use to decide whether two qualitative factors factors have a pattern of relationship?

    Answer

    Test of Independence

     

    On to some practice problems, then a wrap-up of everything that you've learned!  You should be so impressed with yourself.  I know that I am!

    Contributors and Attributions


    16.8: Choosing the Correct Test- Chi-Square Edition is shared under a CC BY license and was authored, remixed, and/or curated by Michelle Oja.