The Big Question

Do football teams that take more shots score more goals?

In football, teams often take many shots but still struggle to score.

We want to explore whether taking more shots is associated with scoring more goals.

Our goal is to use statistics to understand this relationship.

Our Dataset

We will use a small simulated football dataset representing 30 matches.

Each match has:

  • Shots: Total shots taken by one team
  • Goals: Total goals scored by that team

The data is simulated for learning purposes, not actual Premier League match results.

##   match shots goals
## 1     1    17     1
## 2     2     9     0
## 3     3     9     2
## 4     4    19     4
## 5     5    13     0

What Is Correlation?

Correlation measures how strongly two variables are related.

In our case:

  • X: Number of shots taken
  • Y: Number of goals scored

A positive correlation means teams taking more shots tend to score more goals.

However, correlation does not necessarily mean causation.

The Mathematics of Correlation

The Pearson correlation coefficient is:

\[ r = \frac{\sum_{i=1}^{n}(x_i-\bar{x})(y_i-\bar{y})} {\sqrt{\sum_{i=1}^{n}(x_i-\bar{x})^2 \sum_{i=1}^{n}(y_i-\bar{y})^2}} \]

Where:

  • \(x_i\) = shots in match \(i\)
  • \(y_i\) = goals in match \(i\)
  • \(\bar{x}\) and \(\bar{y}\) = sample means

The value of \(r\) ranges from -1 to +1.

Simple Linear Regression

Linear regression helps us model the relationship between shots and goals.

The regression equation is:

\[ \hat{y} = \beta_0 + \beta_1 x \]

Where:

  • \(\hat{y}\) = predicted goals
  • \(x\) = number of shots
  • \(\beta_0\) = intercept
  • \(\beta_1\) = slope

A positive slope suggests that matches with more shots tend to have more goals.

cor(football$shots, football$goals)
## [1] 0.6330299
model <- lm(goals ~ shots, data = football)

summary(model)
## 
## Call:
## lm(formula = goals ~ shots, data = football)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.50279 -0.64178 -0.05877  0.34020  2.49721 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  -0.4213     0.5492  -0.767 0.449416    
## shots         0.1480     0.0342   4.327 0.000174 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.95 on 28 degrees of freedom
## Multiple R-squared:  0.4007, Adjusted R-squared:  0.3793 
## F-statistic: 18.72 on 1 and 28 DF,  p-value: 0.0001739

Do More Shots Mean More Goals?

Let’s visualize the relationship between shots and goals.

Interpretation: This scatterplot shows how goals vary with the number of shots. We can examine whether matches with more shots generally have more goals.

Adding a Regression Line

A regression line helps us understand the overall trend.

Interpretation: The regression line summarizes the relationship between shots and goals. An upward-sloping line indicates a positive relationship.

Interactive Football Analysis

Hover over the points to explore each match’s shots and goals.

R Code Used in Our Analysis

We used R to calculate correlation and fit a simple linear regression model.

# Calculate correlation
cor(football$shots, football$goals)

# Fit linear regression
model <- lm(goals ~ shots, data = football)

# View regression results
summary(model)

The correlation coefficient measures the strength of the relationship, while regression estimates how goals change with shots.

What Did We Learn?

Our analysis explored whether taking more shots is associated with scoring more goals.

## Correlation coefficient: 0.633
## Regression slope: 0.148
  • A positive correlation would suggest that more shots are generally associated with more goals.
  • The regression slope estimates the average change in goals for each additional shot.
  • Teams can take similar numbers of shots and still score different numbers of goals.

Final takeaway: Taking more shots may improve scoring opportunities, but it does not guarantee more goals.

Note: Our results are based on simulated data, not actual Premier League matches.