Epl_Stats_EDA / README.md
Orib24's picture
Update README.md
e9d0d45 verified
---
language:
- en
tags:
- sports
- pl
size_categories:
- 10K<n<100K
---
# 🏟️ EPL Match Statistics (2000–2024) – Exploratory Data Analysis
### Author: Ori Berger
### Dataset: [Premier League Match Data (Hugging Face)](https://huggingface.co/datasets/Orib24/Epl_Stats_EDA/blob/main/epl_final.csv)
---
## 📊 Overview
This project performs an **Exploratory Data Analysis (EDA)** on **9,380 English Premier League matches** from the 2000/01 to 2024/25 seasons.
The dataset includes match-level statistics such as goals, shots, corners, fouls, and cards for both home and away teams.
---
## 🎯 Objective
To analyze which in-game statistics most strongly influence **match outcomes** (`FullTimeResult` = H/D/A)
and to identify performance patterns that explain **winning behavior** in football.
---
## 🧹 Data Cleaning
- Verified that no duplicate matches exist.
- Checked for missing values (minimal and left unchanged).
- Parsed match dates and standardized team names (e.g., “Man Utd” → “Manchester United”).
- Converted result columns (`FullTimeResult`, `HalfTimeResult`) to categorical data types.
---
## 🚨 Outlier Handling
- Outliers found in **shots**, **corners**, and **fouls** were analyzed using z-scores (|z| ≥ 3).
- These values were **kept** since they represent authentic extreme matches (e.g., red cards or large wins).
---
## 📈 Descriptive Statistics
- **Average goals per match:** 2.72
- **Average home goals:** 1.57 | **Average away goals:** 1.15
- **Home advantage:** 46% wins, 25% draws, 29% losses.
- **Strong correlation:** goals ↔ shots on target (`r ≈ 0.78`).
---
## 🔍 Research Questions & Key Insights
1️⃣ **Does playing at home significantly affect match outcomes?**
→ Yes — home teams win nearly half their games, confirming a clear home advantage.
2️⃣ **How are shots and shots on target related to goals?**
→ Strong positive correlation — more shots on target strongly increase goal likelihood.
3️⃣ **Do corners reflect attacking dominance?**
→ Winning teams average ~2.5 more corners than losing teams.
4️⃣ **Do yellow cards or fouls influence match results?**
→ Losing teams receive slightly more yellow cards on average, but correlation is weak.
5️⃣ **How do goal trends evolve over time?**
→ Average goals per match remain steady (~2.7) across the last two decades.
---
## 📊 Visualizations
- **Histogram:** Distribution of total goals per match.
- **Scatter plot:** Shots on target vs goals scored.
- **Bar charts:** Averages by match result (shots, corners, cards).
- **Line plot:** Average goals per season (2000–2024).
Each plot is clearly labeled with titles, axes, and legends.
![image](https://cdn-uploads.huggingface.co/production/uploads/6909a3eb5351e90362100740/lEgA_c5cCR57T4EnyEVuf.png)
![image](https://cdn-uploads.huggingface.co/production/uploads/6909a3eb5351e90362100740/Bifo_DBl4-019Go9e0Szh.png)
![image](https://cdn-uploads.huggingface.co/production/uploads/6909a3eb5351e90362100740/fQoiidnuEirK7VUicZSWU.png)
![image](https://cdn-uploads.huggingface.co/production/uploads/6909a3eb5351e90362100740/7j93y6y7UGNrMpZDSl8zI.png)
![image](https://cdn-uploads.huggingface.co/production/uploads/6909a3eb5351e90362100740/DmF1vvoDpgmiJWLNuXi1Q.png)
---
## 🧠 Conclusions
- **Home advantage** is a consistent and statistically significant trend.
- **Shots on target** are the strongest predictor of winning matches.
- **Corners** serve as a reliable proxy for attacking dominance.
- **Disciplinary actions (cards)** have limited predictive value.
- Overall, the EPL remains a **balanced and high-scoring league** over time.
---
## 🧩 Files Included
- [`epl_final.csv`](https://huggingface.co/datasets/Orib24/Epl_Stats_EDA/blob/main/epl_final.csv) – dataset
- `assignment_ori_berger.ipynb` – notebook with full SQL + Python analysis
- `README.md` – summary of results and insights
- 'Loom Video'- https://www.loom.com/share/0fadb98589fe473b9222205e6db8b8da
<div style="position: relative; padding-bottom: 56.25%; height: 0;"><iframe src="https://www.loom.com/embed/0fadb98589fe473b9222205e6db8b8da" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe></div>