Can we be 99% sure that there is a difference between the health habits of the group suffering from the disease and the group not suffering from the disease? The calculation formula and data are shown in the figure below.That is to say, is there any built-in function in mathematica to automatically calculate the formula k ^ 2 in the diagram?
Clear["Global`*"]
data1 = {{"", "not good enough", "good", "total"}, {"case group", 40,
60, 100}, {"control group", 10, 90, 100}, {"total", 50, 150, 200}};
Grid[data1, Frame -> All, ItemSize -> 15]