Chi-square test applications
Medical hypothesis, discovery & innovation in optometry,
Vol. 6 No. 4 (2025),
30 January 2026
,
Page 150-159
https://doi.org/10.51329/mehdioptometry234
Abstract
Background: The chi-squared (X²) test is a fundamental non-parametric statistical method. It is widely employed in clinical, epidemiological, and biomedical research, including ophthalmology and optometry. It is useful for testing hypotheses regarding independence between categorical variables and for assessing the goodness-of-fit of observed categorical frequencies to a specified expected distribution. In this review, we present a thorough examination of the statistical principles and clinical relevance of the X² test, focusing on its application in vision science and related research domains.Methods: We outline the conceptual framework and methodological steps for conducting the X² test, emphasizing two common applications considered in this review: the goodness-of-fit test and the test of independence. We discuss key assumptions, such as the independence of observations, use of frequency data, and minimum expected cell counts in detail. Moreover, we explain the process of calculating degrees of freedom (df) and interpreting results based on critical values from the X² distribution. Additionally, appropriate measures of effect size, i.e., Phi for 2 × 2 tables and Cramer’s V for larger tables, for assessing association strength, are introduced. To contextualize its clinical relevance, we present four examples from ophthalmology and optometry.
Results: In the first example, the association between vision impairment (VI) category and sex was examined using a 6 × 2 contingency table. Using unrounded expected frequencies, the Pearson X² statistic was 5.31 with 5 df; however, two expected cell frequencies were < 1, indicating that an exact procedure is preferable for formal inference. Cramer’s V was 0.097, indicating a negligible association. The second example examined the association between age category and first-year persistence with antiglaucoma therapy. Here, X² = 6.18 (df = 2, P = 0.045), indicating a statistically significant association, although Cramer’s V was negligible (0.054). In the third example, a 2 × 2 table was used to examine the association between sex and the type of anti-vascular endothelial growth factor injection (aflibercept or ranibizumab). This yielded X² = 0.027 (df = 1, P = 0.870) and Phi = 0.017, indicating no statistically significant evidence of association and a negligible effect. In the goodness-of-fit example, the observed contact-lens distribution differed statistically from the pooled historical reference proportions used in the analysis (X² = 3.99, df = 1, P = 0.046).
Conclusions: The X² test is a widely used tool for analyzing categorical data, enabling clinicians and researchers to assess potential associations between variables. However, its reliability depends on its proper application, including verification of assumptions and appropriate interpretation of effect sizes, along with consideration of statistical significance. In clinical disciplines, such as ophthalmology or optometry, understanding and utilizing the X² test enhances research rigor and the validity of research findings, facilitating better-informed decisions in patient care and in program development.
- chi-square test
- categorical data
- contingency tables
- goodness-of-fit
- effect size
- ophthalmology
- optometry
References
McHugh ML. The chi-square test of independence. Biochem Med (Zagreb). 2013;23(2):143-9. doi: 10.11613/bm.2013.018. PMID: 23894860; PMCID: PMC3900058.
Schober P, Vetter TR. Chi-square Tests in Medical Research. Anesth Analg. 2019 Nov;129(5):1193. doi: 10.1213/ANE.0000000000004410. PMID: 31613806.
Bewick V, Cheek L, Ball J. Statistics review 8: Qualitative data - tests of association. Crit Care. 2004 Feb;8(1):46-53. doi: 10.1186/cc2428. Epub 2003 Dec 30. PMID: 14975045; PMCID: PMC420070.
Franke TM, Ho T, Christie CA. The chi-square test: Often used and more often misinterpreted. American journal of evaluation. 2012 Sep;33(3):448-58. doi: 10.1177/1098214011426594.
Fisher MJ, Marshall AP, Mitchell M. Testing differences in proportions. Aust Crit Care. 2011 May;24(2):133-8. doi: 10.1016/j.aucc.2011.01.005. Epub 2011 May 4. PMID: 21536451.
Xu B, Feng X, Burdine RD. Categorical data analysis in experimental biology. Dev Biol. 2010 Dec 1;348(1):3-11. doi: 10.1016/j.ydbio.2010.08.018. Epub 2010 Sep 6. PMID: 20826130; PMCID: PMC3021327.
Hazra A, Gogtay N. Biostatistics Series Module 4: Comparing Groups - Categorical Variables. Indian J Dermatol. 2016 Jul-Aug;61(4):385-92. doi: 10.4103/0019-5154.185700. PMID: 27512183; PMCID: PMC4966396.
Scott M, Flaherty D, Currall J. Statistics: dealing with categorical data. J Small Anim Pract. 2013 Jan;54(1):3-8. doi: 10.1111/j.1748-5827.2012.01298.x. Epub 2012 Nov 28. PMID: 23190085.
Lipsitz SR, Fitzmaurice GM, Sinha D, Hevelone N, Giovannucci E, Hu JC. Testing for independence in J×K contingency tables with complex sample survey data. Biometrics. 2015 Sep;71(3):832-40. doi: 10.1111/biom.12297. Epub 2015 Mar 11. PMID: 25762089; PMCID: PMC4567525.
Abdul Rahman H, Noraidi AA, Hj Khalid AN, Mohamad-Adam AZ, Zahari NH, Tuming NE. Practical guide to calculate sample size for chi-square test in biomedical research. BMC Med Res Methodol. 2025 May 26;25(1):144. doi: 10.1186/s12874-025-02584-4. PMID: 40419970; PMCID: PMC12107878.
Kim HY. Statistical notes for clinical researchers: Chi-squared test and Fisher's exact test. Restor Dent Endod. 2017 May;42(2):152-155. doi: 10.5395/rde.2017.42.2.152. Epub 2017 Mar 30. PMID: 28503482; PMCID: PMC5426219.
Nowacki A. Chi-square and Fisher's exact tests (From the "Biostatistics and Epidemiology Lecture Series, Part 1"). Cleve Clin J Med. 2017 Sep;84(9 Suppl 2):e20-e25. doi: 10.3949/ccjm.84.s2.04. PMID: 28937359.
Chang S, Li D, Qi Y. Pearson's goodness-of-fit tests for sparse distributions. J Appl Stat. 2021 Dec 30;50(5):1078-1093. doi: 10.1080/02664763.2021.2017413. PMID: 37009596; PMCID: PMC10062227.
Whitley E, Ball J. Statistics review 2: samples and populations. Crit Care. 2002 Apr;6(2):143-8. doi: 10.1186/cc1473. Epub 2002 Feb 7. Erratum in: Crit Care. 2003 Feb;7(1):8. PMID: 11983040; PMCID: PMC137296.
Egbuchulem KI. THE KARL PEARSON'S CHI-SQUARE: A MEDICAL RESEARCH LIBERO, AND A VERSATILE TEST STATISTIC: AN EDITORIAL. Ann Ib Postgrad Med. 2024 Aug 30;22(2):5-8. PMID: 40007702; PMCID: PMC11848378.
Kotronoulas G, Miguel S, Dowling M, Fernández-Ortega P, Colomer-Lahiguera S, Ba?çivan G, Pape E, Drury A, Semple C, Dieperink KB, Papadopoulou C. An Overview of the Fundamentals of Data Management, Analysis, and Interpretation in Quantitative Research. Semin Oncol Nurs. 2023 Apr;39(2):151398. doi: 10.1016/j.soncn.2023.151398. Epub 2023 Mar 2. PMID: 36868925.
Warner P. Quantifying association in ordinal data. J Fam Plann Reprod Health Care. 2010 Apr;36(2):83-5. doi: 10.1783/147118910791069187. PMID: 20406551.
Oster RA. An examination of statistical software packages for categorical data analysis using exact methods. The American Statistician. 2002 Aug 1;56(3):235-46. doi: 10.1198/00031300274.
Oster RA. An examination of statistical software packages for categorical data analysis using exact methods—Part II. The American Statistician. 2003 Aug 1;57(3):201-13. doi: 10.1198/0003130031928.
Deo V, Ranganathan P. Statistical tools and packages for data collection, management, and analysis - A brief guide for health and biomedical researchers. Perspect Clin Res. 2024 Oct-Dec;15(4):209-212. doi: 10.4103/picr.picr_160_24. Epub 2024 Oct 9. PMID: 39583916; PMCID: PMC11584161.
Shahrul AI, Syed Mohamed AMF. A Comparative Evaluation of Statistical Product and Service Solutions (SPSS) and ChatGPT-4 in Statistical Analyses. Cureus. 2024 Oct 28;16(10):e72581. doi: 10.7759/cureus.72581. PMID: 39610603; PMCID: PMC11602406.
Abbasnasab Sardareh S, Brown GT, Denny P. Comparing four contemporary statistical software tools for introductory data science and statistics in the social sciences. Teaching Statistics. 2021 Jul;43:S157-72. doi: 10.1111/test.12274.
Rana R, Singhal R. Chi-square test and its application in hypothesis testing. Journal of the practice of cardiovascular sciences. 2015 Jan 1;1(1):69-71. doi: 10.4103/2395-5414.157577.
Pulkstenis E, Robinson TJ. Goodness-of-fit tests for ordinal response regression models. Stat Med. 2004 Mar 30;23(6):999-1014. doi: 10.1002/sim.1659. PMID: 15027085.
Howell DC. Chi-square test: analysis of contingency tables. In International encyclopedia of statistical science 2011 (pp. 250-252). Springer, Berlin, Heidelberg. doi: 10.1007/978-3-642-04898-2_174.
Pandis N. The chi-square test. Am J Orthod Dentofacial Orthop. 2016 Nov;150(5):898-899. doi: 10.1016/j.ajodo.2016.08.009. PMID: 27871717.
Kang H. Sample size determination and power analysis using the G*Power software. J Educ Eval Health Prof. 2021;18:17. doi: 10.3352/jeehp.2021.18.17. Epub 2021 Jul 30. PMID: 34325496; PMCID: PMC8441096.
Sapra RL, Saluja S. Understanding statistical association and correlation. Current Medicine Research and Practice. 2021 Jan 1;11(1):31-8. doi: 10.4103/cmrp.cmrp_62_20.
Ben-Shachar MS, Patil I, Thériault R, Wiernik BM, Lüdecke D. Phi, Fei, Fo, Fum: effect sizes for categorical data that use the chi-squared statistic. Mathematics. 2023 Apr 22;11(9):1982. doi: 10.3390/math11091982.
Lee DK. Alternatives to P value: confidence interval and effect size. Korean J Anesthesiol. 2016 Dec;69(6):555-562. doi: 10.4097/kjae.2016.69.6.555. Epub 2016 Oct 25. PMID: 27924194; PMCID: PMC5133225.
Sullivan GM, Feinn R. Using Effect Size-or Why the P Value Is Not Enough. J Grad Med Educ. 2012 Sep;4(3):279-82. doi: 10.4300/JGME-D-12-00156.1. PMID: 23997866; PMCID: PMC3444174.
Serdar CC, Cihan M, Yücel D, Serdar MA. Sample size, power and effect size revisited: simplified and practical approaches in pre-clinical, clinical and laboratory studies. Biochem Med (Zagreb). 2021 Feb 15;31(1):010502. doi: 10.11613/BM.2021.010502. Epub 2020 Dec 15. PMID: 33380887; PMCID: PMC7745163.
Riazi A, Gharebaghi R and Heidary F. Seven-year experience in a low vision rehabilitation clinic at a tertiary referral center. Medical hypothesis, discovery & innovation in optometry. 2022;3(4):128–35. doi: 10.51329/mehdioptometry161.
Menino J, Camacho P, Coelho A. Persistence with medical glaucoma therapy in newly diagnosed patients. Med Hypothesis Discov Innov Ophthalmol. 2024 Aug 14;13(2):63-69. doi: 10.51329/mehdiophthal1495. PMID: 39206081; PMCID: PMC11347956.
Ali Ali MA, Hegazy HS, Abdelkhalek Elsayed MO, Tharwat E, Mansour MN, Hassanein M, Ezzeldin ER, GadElkareem AM, Abd Ellateef EM, Elsayed AA, Elabd IH, Abd Rbu MH, Amer RS, Gabbar AGAE, Mahmoud H, Abdelhameed HM, Abdelkader AME. Aflibercept or ranibizumab for diabetic macular edema. Med Hypothesis Discov Innov Ophthalmol. 2024 Jul 1;13(1):16-26. doi: 10.51329/mehdiophthal1490. PMID: 38978826; PMCID: PMC11227664.
Efron N, Morgan PB, Woods CA; International Contact Lens Prescribing Survey Consortium. International survey of rigid contact lens fitting. Optom Vis Sci. 2013 Feb;90(2):113-8. doi: 10.1097/OPX.0b013e31827cd8be. PMID: 23262991.
Ezinne NE, Ekemiri KK, Harbajan GN, Crooks AC, Douglas D, Ilechie AA, Mashige KP. Contact Lens Prescribing Patterns in a University Clinic in Trinidad and Tobago. Vision (Basel). 2022 Sep 2;6(3):55. doi: 10.3390/vision6030055. PMID: 36136748; PMCID: PMC9503470.
Medical hypothesis, discovery & innovation in optometry. Available at: https://mehdijournal.com/index.php/mehdioptometry/JournalPolicies (Accessed: December 10, 2025).
- Abstract Viewed: 0 times
- Full Text PDF Downloaded: 0 times