Quarterback Social Media Activity vs. Performance
Introduction
Many professional athletes use Twitter to promote their personal brand, support stances on social issues, or generally to express themselves on a global, immediate scale. It is sometimes forgotten that elite sports players are multidimensional people like everyone else; their social media accounts provide fans with insights into the opinions and personal lives of their favorite players.
The rise of athletes’ social media usage brings about a key question: how strong is the potential link between social media activity and sports performance?
Previous analyses have considered the effects of social media use the night before a game. In a University of Chicago study, researchers measured the Twitter time usage of 112 National Basketball Association (NBA) players, and found a significant negative correlation between on-court performance and Twitter screen time. Some journalists even consider social media an addiction for athletes which can hinder their excellence during gametime. NBA superstar LeBron James is famous for his anti-social media stance during crunch time; James does not touch his phone during the entirety of the playoffs to avoid distractions, a mode he calls “Zero Dark Thirty-23.”
To gain a unique analytical perspective on the idea of a relationship between performance and social media activity, our group web scraped, wrangled, and analyzed both the on-field performance and Twitter activity of 22 National Football League (NFL) quarterbacks. Our goal was to determine whether 2020 NFL starting quarterbacks displayed a correlation between multiple game statistics (ESPN-standard fantasy points, quarterback rating, total yards, and total touchdowns) and twitter post volumes (during the week leading up to a game) for the first seven games of the 2020 NFL season.
Data
Players
We selected quaterbacks using the following criteria and ended up with a final sample size of 20.
- Started in at least 7 games (22 QBs)
- Has a public twitter account (21 QBs)
- Tweeted at least once since 9/1/20 (20 QBs)
Tweets
Starting on September 1, 2020, NFL player tweets were web scraped and sorted by week. For example, Pittsburg Steelers starting quarterback Ben Roethlisberger had a Week 2 tweet count (tweetcount) of 25 because he tweeted or retweeted posts 25 times between September 14 (his last game) and September 20 (his Week 2 game).
Performance Statistics
Quarterbacks’ on-field performance was wrangled through ProFootballReference.com game logs and measured weekly by the following categories:
- Total Touchdowns (total_tds): Sum of Passing and Rushing Touchdowns
- Total Yards (total_yards): Sum of Passing and Rushing Yards
- Quarterback Rating: (Rate): A measure of game situation-standardized quarterback performance based on values including passing yards, passing touchdowns, and turnovers.
- Fantasy Points (fpts): ESPN standard league fantasy points
\[ Fantasy{\:}Points = (4\times Passing{\;}Touchdowns){\;} + (6\times Rushing{\;}Touchdowns){\;} \\ + (.04\times Pasing{\;}Yards){\;} + (.1\times Rushing{\;}Yards){\;} \\- (2\times Fumbles){\;} - (2\times Interceptions){\;} \]
Sample Quarterback Wrangling
The 20 quarterbacks’ data consisted of both tweet counts and the four performance statistics. Ben Roethlisberger’s dataframe provides an example of the key measures we tracked.
Twitter Usage Distribution
While the 20 qualifying quarterbacks tweeted on average about 7 times per week, the median weekly tweet count was about 2 per week, with an IQR of 8 tweets. The tweet count distribution was skewed by outlier Ben Roethlisberger, who tweeted 31 tweets per week on average. Only Roethlisberger, Patrick Mahomes, Philip Rivers, Teddy Bridgewater and Russell Wilson tweeted more than 10 times per week.
Tweet Content
NFL quarterbacks are often leaders on and off the field; consequently, their tweets can cover a wide range of topics and emotions.
Sentiment Analysis
To give insight into the content of NFL QB tweets, we measured the proportion of positive and negative words using our collected tweets and the index of the NRC Lexicon. The plot below displays those ratios for each selected quarterback. Players in the bottom left corner use the lowest level of emotion (positive or negative), while quarterbacks in the top right corner of the scatterplot use the most emotion in their tweets.
Daniel Jones had the highest positive word ratio in his tweets, while Falcons QB Matt Ryan displayed the highest negative ratio. Jones, Ryan, and Gardner Minshew seemed to tweet out the most emotional messages; Derek Carr, Carson Wentz, and Ryan Tannehill used less-charged language in their writing.
Word Usage
We also measured the frequency of unigrams in NFL QB tweets. To display the most common words, we designed a word cloud, as shown below, which is based on every tweet for all studied QBs from Weeks 1-7.
Unsuprisingly, the word cloud incorporated football-related words like “game,” “week,” and “football.” In addition, due to the high amount of tweets sent by Ben Roethlisberger, the cloud included his team name, his name, his Twitter handle, and his team’s city.
Performance Measures Summary
Average fantasy points, total yards, total touchdowns, and quarterback rating were all fairly normally distributed. Quarterbacks averaged 19.22 fantasy points, with a standard deviation of 4.99 points. An average outing for a quarterback consisted of 286.52 (standard deviation: 40.08) total yards with 2.18 (standard deviation: 0.73) touchdowns and a 99.32 (standard deviation: 14.09) QBR.
Average Weekly Quarterback Total Distributions
Results
Overall Trends
To gain an overview of the link between Twitter usage and on-field performance, we graphically analyzed the relationships between the log of a player’s tweets that week and their corresponding playing statistic using all weeks from all eligible players. All four performance measurements displayed positive but weak relationships with the log of tweet counts, as shown in the correlation matrix below created using chart. Correlation function of the PerformanceAnalytics package. The asterisks above the correlation coefficients correspond to p-values following the significance levels below.
- 0.0001: ***
- 0.01: **
- 0.05: *
Correlation Matrix
library(PerformanceAnalytics)
chart.Correlation(cordata, histogram=TRUE, pch=19)
Fantasy Points vs. Log of Tweet Count
Registering a correlation coefficient of 0.19, fantasy points and log(tweetcount) displayed a moderate, positive relationship. As displayed by the upward sloping trend line, the plot suggests some association between fantasy points and the log of pre-game week tweet counts.
Total Yards vs. Log of Tweet Count
The relationship between total yards and log(tweetcount) is minimal, with a barely upward sloping trendline and a correlation coefficient of 0.06. This data points at a very weak link between total yards and the log of tweet counts.
Total Touchdowns vs. Log of Tweet Count
Supported by a correlation coefficient of 0.19, total touchdowns displayed a small, positive relationship with tweet count. As visibible in the chart below, there were slightly more high touchdown performances for quarterbacks who tweeted above the median amount of two tweets.
Quarterback Rating vs. Log of Tweet Count
The strongest overall trend between a performance measure and social media activity was that of quarterback rating and tweet counts. With a correlation coefficient of 0.24 and a moderately upward trendline, the data displays a weak to medium, positive relationship between quarterback rating and tweet count.
Individual Correlation Comparison
To see which quarterbacks displayed the highest magnitudes of association between their performance and their social media usage, we compared their personal correlation coefficients relating their on-field statistics and tweet counts. We used fantasy points to investigate these values, as fantasy points are understandable for non-sports fans but still encapsulate overall performance.
According to the below chart of individual correlation coefficients, about 75 percent of our sample of 17 quarterbacks (3 were omitted due to lack of sample size for a correlation coefficient) falls in the small to medium positive relationship category between fantasy points and tweet counts. Ryan Tannehill had the highest correlation coefficient at 0.91, suggesting that 82 percent of the differences in his fantasy points can be associated with differences in his pre-game week tweet volumes.
Individual Linear Regression Model Comparison
We used simple linear regression to measure both the strength and validitiy of the fantasy point and tweet count relationship. Coefficients represent the number of additional fantasy points associated with one tweet during the week prior to a game. We used fantasy points to investigate these models, as shown in this Russell Wilson example regression model.
ryan_tannehill_model <- lm(fpts ~ tweetcount, data=ryan_tannehill_data)
summary(ryan_tannehill_model)
##
## Call:
## lm(formula = fpts ~ tweetcount, data = ryan_tannehill_data)
##
## Residuals:
## 1 2 3 4
## -4.78 1.68 -1.68 4.78
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -3.280 8.011 -0.409 0.7219
## tweetcount 7.900 2.533 3.118 0.0893 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 5.067 on 2 degrees of freedom
## Multiple R-squared: 0.8294, Adjusted R-squared: 0.7441
## F-statistic: 9.725 on 1 and 2 DF, p-value: 0.08928
Only two models were significant at a significance level of 0.10 (Patrick Mahomes and Ryan Tannehill), with the average p value being 0.58. The average coefficient was 1.01 with a standard deviation of 2.00; because zero is within one standard deviation of the mean coefficient value, is it difficult to point to any major associations between fantasy points and tweet counts for these individual quarterback models.
Case Study Prediction: Patrick Mahomes
To truly test our models, legimitate testing and training would be completed; however, for a sample of that testing process, we used our most statistically significant linear regression model (Patrick Mahomes) and predicted his Week 8 fantasy point totals.
This model predicted Patrick Mahomes to score 24.45 points during Week 8, which makes sense, as his tweet count of 18 was just below his mean of 18.50, and 24.45 points falls just shy of his average fantasy score of 25.11.
Patrick Mahomes ended up scoring 36.64 points during Week 8, giving a high level of error at 49 percent. While this result is not enticing, it displays both the limitations of our small sample size and the multitude of variables affecting NFL performance data (Mahomes played the New York Jets during Week 8, who have given up the 3rd most fantasy points to quarterbacks of all defenses this year).
\[ \hat{fpts} = \beta_1\times(tweetcount) + \beta_0 \] \[ Patrick\;Mahomes\;Predicted\;Week\;8\;Fantasy\;Points = 1.02\times(18) + 6.09 = 24.45 \] \[ Percent\;Error = \frac{36.64 - 24.45}{24.45} = 49.85\%\]
Conclusion
Our main goal was to evaluate the link between player social media usage and performance through the Twitter and on-field statistics of 20 NFL quarterbacks through 2020 weeks 1-7. We conclude that Twitter usage has a positive, weak relationship with on-field performance.
Findings
We found that there was a weak, positive, and linear relationship between the log of number of tweets in a week and fantasy points. In addition, the log of number of tweets also showed a similar relationship with total touchdowns, total yards, and quarterback rating. Simple linear regression models for the four categories confirmed these findings, with all but total yards being statistically significant at a level of 0.05.
Overall Linear Regression Model Summaries
Performance Measure | Coefficient | R Squared | P Value |
---|---|---|---|
Fantasy Points | 1.3163410 | 0.0364781 | 0.0456407 |
Total Yards | 3.8106580 | 0.0036649 | 0.5298339 |
Total Touchdowns | 0.2053853 | 0.0362328 | 0.0463881 |
Quarterback Rating | 5.0316663 | 0.0572180 | 0.0118436 |
In conclusion, social media presence on twitter has a weak, positive relationship with quarterback performance on the field. While some quarterbacks displayed strong relationships, the minimal sample sizes and lack of predictive power at the overall scale suggest that we cannot conclude that differences in on-field performance measures are associated with changes in Twitter post counts.
There are many different factors that could give insight into a player’s performance other than twitter activity, such as location of the game, strength of opponent, their recent performances, and their injury report. While the predictor variable of the number of tweets does not help powerfully to predict quarterback performance alone, it could potentially contribute to a multiple linear regression model that includes other predictor variables, like the ones described above.
Limitations
Due to the small sample size of quarterbacks and weeks chosen for the model, our results are not generalizable to all quarterbacks in the NFL. The Patrick Mahomes and Ryan Tannehill linear regression models between the log of tweet count and fantasy points were significant at the 0.05 significance level. Individual linear regression models like these had at most 7 data points to fit a line of best fit. More data is needed to produce more accurate results, and we cannot confidently say that the results of these tests are accurate.
Another limitation was that the sentiment analysis included tweets and retweets by each player. It is possible that a player could have retweeted tweets with a higher percentage of positive words than tweets that they wrote. This could skew the results by that player (or players) having a higher positive word ratio than expected.
The word cloud that was created is limited by the scale of quarterback-specific tweet counts. For example, Ben Roesthlisberger had the most tweets by a quarterback and we see that some of the most commonly tweeted words relate to him and his team. We expect that if all the quarterbacks had similar tweet counts, then the weight of these words related to specific quarterbacks would decrease.
There are a multitude of ways that this project could be expanded to make its results more generalizable. First, we could gather data from Instagram, Facebook, and TikTok in addition to Twitter to get a truer picture of a player’s social media activity. In addition, we could analyze total social media output from a player’s entire career, dramatically boosting our sample size.
Second, we could adjust for the strength of the opponent for every game. While many of our data points are skewed by this lurking variable (for example, our model predicted Patrick Mahomes to play poorly after his lack of Tweets, but he excelled, facing a low-ranked New York Jets defense). This standardization would help capture the true impact of social media on athletic performance.
Third, we could measure not just the number of posts, but the time spent on social media to see if that is a more significant predictor of on-field performance.
Works Cited
Exsci (January 9, 2019) In Sports Performance Training. Late Night Social Media Use May Decrease Athletic Performance. Retrieved from https://exsci.cuchicago.edu/study-shows-late-night-social-media-use-may-decrease-athletic-performance/
Tom Haberstroh (October 1, 2018). Is Social Media Addiction in the NBA out of control? Retrieved from https://bleacherreport.com/articles/2798257
Kyle Newport (April 14, 2018). Lebron James Commences ‘Zero Dark 30-23 Mode’ With Martin Luther King Jnr Quote. Retrieved from https://bleacherreport.com/articles/2770595-lebron-james-commences-zero-dark-30-23-mode-with-martin-luther-king-jr-quote
Sharon Katz and Brian Burke (September 8, 2016). How Is Total QBR Calculated ? We Explain Our QuarterBack Rating. Retrieved from https://www.espn.com/blog/statsinfo/post/_/id/123701/how-is-total-qbr-calculated-we-explain-our-quarterback-rating
Nick Friedell (June 19, 2005). Rules - Standard Scoring System. Retrieved from https://www.espn.com/fantasy/football/ffl/story?page=fflrulesstandardscoring
Baptiste Auguie [aut, cre], Anton Antonov [ctb] (September 9, 2009). gridExtra: Miscellaneous Functions For Grid Graphics. Retrieved from https://cran.r-project.org/web/packages/gridExtra/index.html
Author: Plotly Technologies Inc. Title: Collaborative data science Publisher: Plotly Technologies Inc. Place of publication: Montréal, QC Date of publication: 2015 URL: https://plotly.com/python/
Yihui Xie [aut, cre], Joe Cheng [aut], Xianying Tan [aut], JJ Allaire [ctb], Maximilian Girlich [ctb], Greg Freedman Ellis [ctb], Johannes Rauh [ctb], jQuery contributors [ctb, cph] (jQuery in htmlwidgets/lib), SpryMedia Limited [ctb, cph] (DataTables in htmlwidgets/lib), Brian Reavis [ctb, cph] (selectize.js in htmlwidgets/lib), Leon Gersen [ctb, cph] (noUiSlider in htmlwidgets/lib), Bartek Szopka [ctb, cph] (jquery.highlight.js in htmlwidgets/lib), RStudio, PBC [cph] (October 13, 2020). Retrieved from https://cran.r-project.org/web/packages/DT/index.html
All of STAT 231 material from Amherst College