Dataset Viewer
Auto-converted to Parquet Duplicate
Search is not available for this dataset
video
video

πŸ… Sports Betting Profiling – Exploratory Data Analysis (EDA)

This project analyzes a large-scale sports betting dataset using Exploratory Data Analysis (EDA).
The goal is to understand user betting behavior, identify patterns, detect anomalies, and prepare the data for a classification model predicting whether a bet will win (is_win = True/False).


πŸ“˜ Dataset Overview

  • Rows: 100,000
  • Columns: bet_id, user_id, bet_type, sport, odds, is_win, stake, gain, GGR
  • Each row represents one bet placed by a user.

Main Variables:

  • stake: How much money the user bet
  • odds: Decimal odds of the event
  • is_win: Whether the bet won
  • gain: The payout received
  • GGR: Gross Gaming Revenue (platform profit/loss)

🧹 Data Cleaning

The following steps were performed:

βœ” Missing Values

  • No missing values found (df.isnull().sum()).

βœ” Duplicate Rows

  • No duplicate rows were detected.

βœ” Data Types

  • Converted numerical columns (odds, stake, gain, GGR) to float.
  • Converted is_win to boolean.
  • Standardized category formatting (e.g. trimming spaces, title-casing sports).

βœ” Normalization (for modeling)

  • Standard scaling applied to stake, gain, and odds for improved numerical stability.

πŸ“Š Outlier Detection & Handling

Outliers were detected using:

  • Box plots
  • IQR Rule (Q1–1.5Β·IQR, Q3+1.5Β·IQR)

Findings:

  • stake, gain, and especially GGR contained extreme values.
  • Example: GGR ranged from -20,595 to +999.95.
  • A small number of extremely large negative gains were removed to prevent distortion.

Decision:
➑ Realistic high-stake bets were kept.
➑ Only statistically extreme outliers were removed.


πŸ“ˆ Descriptive Statistics

Key Numeric Columns (df.describe())

Metric Stake Gain Odds GGR
Mean 132.63 119.29 4.70 13.34
Median 83.00 0.00 3.05 20.30
Std 260.93 294.38 4.36 399.96
Min 0.00 0.00 1.01 -20,595.23
Max 10,000.00 9,995.00 51.00 999.95

Interpretation:

  • Stake is extremely right-skewed β†’ most bets are small, but a few go up to 10,000.
  • Gain has median = 0 β†’ meaning most bets are losing bets.
  • Odds vary widely, but most are mid–low.
  • GGR strongly negative for winning bets, as expected.

πŸ”₯ Correlation Analysis

Here is the actual correlation matrix:

Variable is_win stake gain odds GGR
is_win 1.00 0.00 0.37 -0.38 -0.39
stake 0.00 1.00 0.33 0.00 0.03
gain 0.37 0.33 1.00 0.03 -0.93
GGR -0.39 0.03 -0.93 -0.03 1.00

Insights:

  • Winners (is_win=True) produce large gains β†’ positive correlation (0.37)
  • Odds are NEGATIVELY correlated with winning (-0.38)
  • Huge negative correlation between Gain and GGR (-0.93)
    • When users win big β†’ platform loses big.

πŸ“ˆ Visualizations

1️⃣ Stake Distribution

(stake_hist.png)
Shows a right-skewed curve: many small bets, few very large bets.

2️⃣ Stake vs Gain (colored by win)

(stake_vs_gain_scatter.png)
Winning bets produce sharply higher gains; losing bets cluster at zero.

3️⃣ Gain Boxplot

(gain_boxplot.png)
Reveals many high-gain outliers and non-normal distribution.

4️⃣ Correlation Heatmap

(correlation_heatmap.png)
Highlights relationships described above.


❓ Key Questions & Answers

1. Which sports are the most popular?

Football is the most bet-on sport, followed by Tennis and Basketball.

2. Do higher stakes lead to higher gains?

Yes β€” but only for winning bets.
Losing bets result in zero gain regardless of stake size.

3. Are multiple bets riskier?

Yes β€” they win less often but can pay more when successful.

4. How does user winning affect platform revenue (GGR)?

Strong negative correlation (–0.39):

When users win, GGR decreases sharply.

5. What features seem useful for classification?

  • odds
  • stake
  • sport
  • bet_type
  • gain (for historical training only)

🎯 Classification Goal

Using the insights above, the target ML problem is:

Predict whether a bet will win (is_win) using features like odds, stake, bet_type, and sport.

This is a binary classification problem.


πŸ“‚ Files Included

File Description
bets.csv Raw dataset
sports_betting_EDA.ipynb Full EDA notebook
stake_hist.png Histogram of stake distribution
stake_vs_gain_scatter.png Scatter plot of stake vs gain
gain_boxplot.png Boxplot for gain
correlation_heatmap.png Heatmap of correlations
README.md This report

πŸš€ How to Reproduce

  1. Download this dataset from HuggingFace
  2. Open the notebook in Google Colab
  3. Run all cells
  4. Visualizations and insights will be generated automatically

βœ” Final Notes

This dataset provides strong signals that can be used to build a predictive model for bet outcomes.
Insights from the EDA reveal behavioral patterns, risk profiles, and important relationships in sports betting.

Downloads last month
100