This project analyzes Rafael Nadal’s serve performance across his entire career. The goal is to understand whether serve statistics (1st serve %, 2nd serve %, double faults %, etc.) influence: - Match outcome (win or loss) - Differences between wins and losses - Differences between surfaces (Clay, Hard, Grass) The project includes: - Data cleaning - Outlier detection (boxplots + Z‑scores) - Feature creation - Visual analysis - Correlation study - Conclusions about Nadal’s serve performance The dataset contains Nadal’s match‑by‑match performance, including: - Date - Tournament - Surface - Result - serve statistics - rank ... and more Step 1 - I asked a question I wanted to focus on, which is about: The main question- How do Nadal’s first serve percentage statistics affect his chances of winning a match The target variable- "Result", which indicates whether Nadal won or lost the match Step 2- Data Cleaning I removed irrelevant columns Converted serve statistics to numeric Created a new Win column: 1 → match won ("Nadal d.") 0 → match lost I replaced the missing values with the median. To find the outliers, I chose the Z-score method, which identifies extremely unusual values. I chose to remain the outlier because it's very common in sports to have outlier and very rare performances. ![Screenshot 2025-11-17 at 21.22.28](https://cdn-uploads.huggingface.co/production/uploads/69022bd16eadade47dbabbea/EPfCZqn7E7KsUiwqZRCzn.png) Step 3 - Distribution Analysis (Histograms) To understand Nadal’s serve performance, I plotted the distribution of three key serve statistics: - 1st Serve Points Won (%) - 2nd Serve Points Won (%) - Double Fault Percentage (DF%) Nadal’s 1st serve % is usually between 65% and 80%, with a strong concentration around the 70% mark. The 2nd serve % is slightly lower but shows a similar bell-shaped distribution. Double faults % is strongly skewed toward zero, meaning Nadal rarely makes many double faults. Serve Performance vs Match Outcome (Win vs Loss) Step 4- I compared Nadal’s serve statistics between the matches he won (1) and the matches he lost (0). (with the same variables than step 3) 1st Serve % is clearly higher in matches he wins Median ≈ 75% when he wins Median ≈ 65% when he loses (This suggests that Nadal’s first-serve effectiveness is strongly linked to winning). 2nd Serve % also increases when he wins, but the difference is smaller It helps, but has a weaker effect compared to the first serve. Double Fault % is almost the same whether he wins or loses Nadal makes very few double faults overall (Double faults do not significantly affect his match outcome). ![Screenshot 2025-11-17 at 21.24.25](https://cdn-uploads.huggingface.co/production/uploads/69022bd16eadade47dbabbea/IoNQKjO5YWlcwOdizxGP7.png) step 5- surfaces I asked the question if the playing surface influences Nadal’s serve performance? I compared Nadal’s serve statistics across the three main surfaces he regularly plays on: Hard, Clay. I removed the Carpet surface because the sample size was extremely small (only a few matches). The result was very similar and showed no meaningful differences. Based on these results, the playing surface does NOT significantly influence Nadal’s serve performance. ![Screenshot 2025-11-17 at 21.24.48](https://cdn-uploads.huggingface.co/production/uploads/69022bd16eadade47dbabbea/E6ptXt44dm0zj6ad4kacO.png) Step 6- Correlation To explore how Nadal’s serve statistics relate to match outcomes, I computed a correlation matrix using the variables: I interpret the plot with a heatmap. - Win (1 = win, 0 = loss) - 1st% (percentage of points won on first serve) - 2nd% (percen ![Screenshot 2025-11-17 at 21.25.06](https://cdn-uploads.huggingface.co/production/uploads/69022bd16eadade47dbabbea/tJQyflXWqauh6CsKxnXC8.png) tage of points won on second serve) Conclusion of the numbers: - Higher 1st Serve % → Higher probability of winning. - Higher 2nd Serve % also helps, but less strongly. Conclusion of the question performance to win his match; the numbers prove it. I saw that the surface doesn't have an impact on the performance of the serves When a player is on his first serve, he is under less stress because if he misses it, he has a second serve, so he can manage more power than a second serve. https://cdn-uploads.huggingface.co/production/uploads/69022bd16eadade47dbabbea/hHHtBt4-VhVK8Nsnw2l6E.mp4