When I run this as written, I get that 'pval' is = 1.0, which is incorrect. The issue is that you are not passing the contingency table as a table (which is a list of lists) [[],[]], but as two separate values [],[]
When I add the extra brackets around the frequencies, I get the correct answer:
https://github.com/jewgeney/intro-data-capstone-musclehub/blob/163399689a37b3ba7ecfc7b955f8ea20bfe90f0d/MuscleHub%20capstone%20project/musclehub.py#L264-L265
When I run this as written, I get that 'pval' is = 1.0, which is incorrect. The issue is that you are not passing the contingency table as a table (which is a list of lists)
[[],[]]
, but as two separate values[],[]
When I add the extra brackets around the frequencies, I get the correct answer:
>>
0.0009647827600722304