estebanz01 / ruby-statistics

Ruby gem for some statistical operations without any statistical language dependency
MIT License
109 stars 16 forks source link

Added functions to the chi_square test library to #130

Open oliver-czulo opened 7 months ago

oliver-czulo commented 7 months ago

test contingency tables for independence of observations

estebanz01 commented 7 months ago

thank you! 🙏 I promise I'll review this week. Lots of stuff going on at the same time.

oliver-czulo commented 7 months ago

thank you! 🙏 I promise I'll review this week. Lots of stuff going on at the same time.

No worries, took me long enough how to do a rebase properly 🙈 I grew up with SVN, and GIT concepts can be quite different... Looking forward to your feedback, any time 😃

estebanz01 commented 6 months ago

Hi! Sorry for the looooong review. I was reading lots of theory around it to make sure we have a robust scenario.

Can you add the following information as a test case? After that, we just need to merge it!

Relationship between Region and Product

source: https://gplresearch.com/prueba-chi-cuadrado/

Region Product
ABC
N271241
S536529
E273253
W121815

Independence between nutrition and IQ

source: https://www.estadistica.net/Algoritmos2/web-contingencia.pdf (Contraste de Independencia Example, page 27).

Nutrition IQ
< 8080 - 9090 - 99>= 100
Good245228177219
Bad31271310

Political Affiliation and Opinion

source: https://online.stat.psu.edu/stat500/lesson/8/8.1

Party Opinion
favorindifferentopposed
Democrat1388364
Bad646784

Gender and Condiment

source: https://online.stat.psu.edu/stat500/lesson/8/8.1

Gender Condiment
KetchupMustardRelish
Male152310
Female25198