Odds ratio

Odds ratios compare the probability of something happening with the probability of it not happening. This is sometimes easier to reason about than probabilities, particularly when you want to make decisions about choices. For example, if a customer has a 20% chance of churning, it may be more intuitive to say "the chance of them not churning is four times higher than the chance of them churning".

mdl_churn_vs_relationship, explanatory_data, and prediction_data are available from the previous exercise.

This exercise is part of the course

Introduction to Regression with statsmodels in Python

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Update prediction data with odds_ratio
prediction_data["odds_ratio"] = ____

# Print the head
print(____)