GQ / lab logES / EN
← Back to the log

2026

Statistical inference with chi-square, ANOVA and mutual information

Hypothesis tests applied to telecom customer churn and to the relationship between continuous and categorical variables, checking assumptions before each test.

Statistical inference with chi-square, ANOVA and mutual information

Problem

Determine which variables are truly related to an outcome instead of assuming it.

Data

Telco Customer Churn (7,043 customers, categorical features and `churn`), a color-preference survey with three alternative outcomes, and a course-provided `anova_05.csv` (5,000 rows, 4 continuous variables and an A/B/C category). The files are not included.

Method

Chi-square tests of independence at α = 0.05; mutual information; ANOVA only where normality (Shapiro-Wilk) and equal variances (Levene) hold.

Result

Having dependents (χ² = 189.1) and a partner (χ² = 158.7) are associated with churn, while gender is not (p = 0.49). ANOVA was applied only to the one variable that met its assumptions.

Stack

  • Python
  • SciPy
  • pandas
  • scikit-learn
  • Seaborn

Context

Course: Data Mining · 2026

View the code on GitHub ↗