I am confused with the difference between z-test and chi square test.

In book Agresti 2007 An introduction to categorical data analysis, page 9, the author had an example of testing

Do a majority or minority of adults in US believe that a pregnant woman should be able to obtain an abortion.

The data is 400 "yes" and 493 "no" in a "yes or no" survey question. And want to test if $\pi=0.5$, where observed/empirical ratio $p=0.448$

The author uses a z-test, where


But should we use chi-square goodness of fit test where we comparing observed with theoretical distribution ($\pi=0.5$)? It seems they are the same in this case. Why?

  • 2
    $\begingroup$ By z test of proportions, we usually mean two-sample test. Your test is one sample test. Without checking it, I believe that the test value 3.1 you've got is equal to the sq. root of the chi-square statistic of one-sample chi-square test you are speaking about. A better alternative here would be binimial (exact) test. $\endgroup$ – ttnphns Feb 1 '17 at 15:54
  • 1
    $\begingroup$ Also see second answer here: stats.stackexchange.com/questions/2391/… $\endgroup$ – psarka Feb 1 '17 at 15:55
  • 1
    $\begingroup$ and here stats.stackexchange.com/q/173415/3277. But both links are about two-sample test of proportions, which doesn't concern to the current Q. $\endgroup$ – ttnphns Feb 1 '17 at 15:58
  • $\begingroup$ @ttnphns thanks i think your comments answered my question. a small question, the book says test value is $-3.1$, and if you calculate it it is $-3.1$, why you say positive? $\endgroup$ – Haitao Du Feb 1 '17 at 16:14
  • 1
    $\begingroup$ It doesn't matter. You may rearrange the numerator terms. Also, z statistic is the sq. root (which is but positive) of chi-sq statistic (which is positive) $\endgroup$ – ttnphns Feb 1 '17 at 16:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.