Login
📚 Python for Introductory Statistics: Lab Workbook
Chapters ▾

13.2 Test of Independence

Watch demo video

Lab 13.2.1

The contingency table below shows the prison population of Illinois in June 2021. Test the hypothesis that race (Black, White and Hispanic) and crime-class are independent at 5% level of significance.

ClassBlackHispanicWhite
117344751281
220713731938
3678103935
453492560
X564416612613
Murder40949271277

Use the chi2_test_of_indp function above.

view answer

Adapted from Python for Introductory Statistics: Student's Lab Workbook, by Simon Aman (Truman College, City Colleges of Chicago), licensed under CC BY 4.0. Changes were made: reformatted as an accessible XYZ web edition with live in-browser code cells. License: CC-BY-4.0.