CS2 Statistics Correlation Analysis
Project Motivation
In the Counter-Strike 2 community, there's an ongoing debate about whether individual statistics truly correlate with winning matches. Many players argue that stats don't matter and that metrics like aim rating, kill/death ratio, and utility usage have little to no impact on actual match outcomes.
This project was born from a desire to answer this question with data: Do CS2 statistics actually correlate with higher win rates?
Specifically, I wanted to investigate claims that aim rating and other individual performance metrics are meaningless when it comes to winning matches. The goal was to provide empirical evidence to either support or refute these commonly held beliefs in the CS2 community.
Methodology
Data Collection
Our analysis is based on real match data collected from the CS2 community, including:
- Player Statistics: Individual performance metrics from actual matches
- Match Outcomes: Win/loss results for team-based gameplay
- Rating Systems: Data from established rating platforms like Leetify and HLTV
Statistical Approach
We employ Pearson correlation analysis to measure the linear relationship between individual performance metrics and match win rates. This statistical method helps us understand:
- Strength of relationship: How closely related are stats to winning?
- Direction of relationship: Do higher stats lead to more wins?
- Statistical significance: Are the relationships meaningful or just random?
Statistical Calculations
Pearson Correlation Coefficient
The Pearson correlation coefficient (r) measures linear correlation between two variables, ranging from -1 to +1:
- r = +1: Perfect positive correlation
- r = 0: No linear correlation
- r = -1: Perfect negative correlation
Formula
r = Σ[(xi - x̄)(yi - ȳ)] / √[Σ(xi - x̄)² × Σ(yi - ȳ)²]
Where:
xi= individual stat valuex̄= mean of stat valuesyi= win outcome (1 for win, 0 for loss)ȳ= mean win rate
Implementation Details
Our calculation process involves several steps:
1. Data Aggregation
// Calculate means for each metric const means = { leetifyRating: Σ(ratings) / count, hltvRating: Σ(ratings) / count, kdRatio: Σ(kd) / count, aimRating: Σ(aim) / count, utilityRating: Σ(utility) / count, winRate: Σ(wins) / totalMatches };
2. Correlation Computation
For each metric, we calculate:
// Numerator: covariance numerator = Σ[(statValue - statMean) × (winOutcome - winMean)] // Denominators: standard deviations denomX = Σ[(statValue - statMean)²] denomY = Σ[(winOutcome - winMean)²] // Final correlation correlation = numerator / √(denomX × denomY)
3. Null Value Handling
We carefully handle missing data points:
- Only include matches with valid stat values
- Maintain separate counts for each metric
- Avoid bias from incomplete data
Metrics Analyzed
Our analysis covers five key performance indicators:
- Leetify Rating (LR): Comprehensive performance metric from Leetify
- HLTV Rating (HR): Industry-standard rating system
- Kill/Death Ratio (KD): Basic fragging effectiveness
- Aim Rating: Mechanical skill measurement
- Utility Rating: Teamplay and utility usage effectiveness
Data Visualization
Correlation Chart
A bar chart displaying the correlation coefficient for each metric, making it easy to compare which stats have the strongest relationship with winning.
Scatter Plots
Individual scatter plots for each metric showing:
- Raw data points (player averages vs. win rates)
- Trend lines indicating correlation direction
- Visual representation of data distribution
Interpreting Results
Correlation Strength Guidelines
- 0.7 to 1.0: Strong positive correlation
- 0.3 to 0.7: Moderate positive correlation
- 0.0 to 0.3: Weak positive correlation
- -0.3 to 0.0: Weak negative correlation
- -0.7 to -0.3: Moderate negative correlation
- -1.0 to -0.7: Strong negative correlation
Statistical Significance
While correlation shows relationship strength, consider:
- Sample size: Larger datasets provide more reliable results
- Causation vs. correlation: High correlation doesn't prove causation
- Confounding variables: Other factors may influence both stats and wins
Key Findings
The analysis reveals whether commonly dismissed statistics actually do correlate with match success, providing data-driven insights into:
- Which individual metrics matter most for team success
- How strong the relationship is between personal performance and winning
- Whether the community's skepticism about stats is justified
Technical Implementation
This project uses:
- TypeScript/React: Frontend implementation
- SQLite: Data storage and queries
- Recharts: Data visualization
- Statistical calculations: Custom Pearson correlation implementation
The complete source code demonstrates how to:
- Aggregate player statistics across matches
- Handle missing data appropriately
- Calculate correlation coefficients
- Visualize statistical relationships
Conclusion
By applying rigorous statistical analysis to real CS2 match data, this project provides evidence-based answers to the age-old question: "Do stats actually matter in Counter-Strike?"
The results speak for themselves, offering insights that can inform player development, team strategy, and community understanding of what truly contributes to winning matches in competitive CS2.