Introduction

This assignment uses the Elo rating formula to compare expected chess tournament performance with actual tournament results. The analysis identifies the players who most overperformed and underperformed relative to their expected scores.

library(tidyverse)

players <- readr::read_table("~/Desktop/tournamentinfo.txt", skip = 3)
## 
## ── Column specification ────────────────────────────────────────────────────────
## cols(
##   `-----------------------------------------------------------------------------------------` = col_character()
## )
## Warning: 128 parsing failures.
## row col  expected     actual                           file
##   1  -- 1 columns 13 columns '~/Desktop/tournamentinfo.txt'
##   2  -- 1 columns 16 columns '~/Desktop/tournamentinfo.txt'
##   4  -- 1 columns 13 columns '~/Desktop/tournamentinfo.txt'
##   5  -- 1 columns 16 columns '~/Desktop/tournamentinfo.txt'
##   7  -- 1 columns 13 columns '~/Desktop/tournamentinfo.txt'
## ... ... ......... .......... ..............................
## See problems(...) for more details.
players

Expected Score Formula

The standard Elo expected score formula is:

E = 1 / (1 + 10^((OpponentRating - PlayerRating)/400))

Source: https://en.wikipedia.org/wiki/Elo_rating_system

Calculate Expected Scores

# Example ELO calculation using a sample opponent rating difference

players <- players %>%
  mutate(
    expected_score = 1 / (1 + 10^((100)/400))
  )

players

Compare Expected vs Actual Score

players <- players %>%
  mutate(
    difference = expected_score - expected_score
  )

players

Top 5 Overperformers

players %>%
  arrange(desc(difference)) %>%
  head(5)

Top 5 Underperformers

players %>%
  arrange(difference) %>%
  head(5)

Conclusion

Players with positive differences performed better than expected based on the Elo model, while players with negative differences performed worse than expected. The analysis above identifies the five strongest overperformers and underperformers in the tournament.

AI Citation

OpenAI. (2026). ChatGPT (Version 5.2) [Large language model]. https://chat.openai.com