2021-09-06

Overall aim

  • In Activity 1, we saw how raw scores can be standardized so that they can be combined or compared.

  • In Activity 2, we will use R to implement standardization, combination, and comparison to examine the performance of the athletes in the 2016 women's Olympic heptathlon.

Normalizing heptathlon scores

Our textbook proposes that the performances of athletes in multi-event disciplines (like the heptathlon) can be compared on the basis of \(z\)-scores. We'll do that today.

  • Note that the actual hepathlon is not scored this way! The current system was developed by Karl Ulbrich in 1952 and modified in 1984. It was designed to account for the difficulty of improving further on performance that was already very good. But the system has some problems, as we'll see through comparison.

The direction of good performance

One important issue for any heptathlon scoring system is that…

  • higher numbers indicate better performance for the high jump, shot put, long jump, and javelin throw.

  • lower numbers indicate better performance in the 100 m hurdles, 200 m and 800 m runs.

Modifying the normalized score

To make the scores comparable, we'll slightly modify the \(z\)-scores for some events so that high scores always indicate good performance. Let's call these modified scores '\(zhg\)-scores'. That label means \(z\)-scores, high = good.

\[ \text{$zhg$}_{\text{event}} = \begin{cases} -z_\text{event} & \text{if event is 100 m hurdles, 200 m run or 800 m run,}\\ z_\text{event} & \text{otherwise.} \end{cases} \]

Activity 2A: Append \(zhg\)-scores to the data frame

Append \(zhg\)-scores (\(z\)-scores, high = good) to the data frame

  • Import hept.csv as a data frame hept into R.
  • For all seven heptathlon events, append one column to hept that contains the \(zhg\)-score. Name the columns zhg_hurdles, zhg_hj, etc. Hint: Use the scale() command to save yourself some typing!
  • The sum of all seven \(zhg\)-scores is a measure of the athletes' overall performance, \[ \text{$zhg$}_\text{total} = \sum_\text{event}\text{$zhg$}_\text{event}. \] Append the total \(zhg\)-scores as a column hept$zhg_total.

Solution

hept <- read.csv("hept.csv")

# We could do:
# hept$zhg_hurdles <- (hept$hurdles - mean(hept$hurdle)) / sd(hept$hurdles)
# But it's a lot of typing. A shorter alternative is scale(). See Practice
# RAT.
hept$zhg_hurdles <- -scale(hept$hurdles)
hept$zhg_hj      <-  scale(hept$hj)
hept$zhg_sp      <-  scale(hept$sp)
hept$zhg_run200  <- -scale(hept$run200)
hept$zhg_lj      <-  scale(hept$lj)
hept$zhg_jt      <-  scale(hept$jt)
hept$zhg_run800  <- -scale(hept$run800)
hept$zhg_total <- hept$zhg_hurdles + hept$zhg_hj + hept$zhg_sp + hept$zhg_run200 + 
  hept$zhg_lj + hept$zhg_jt + hept$zhg_run800

Activity 2B: Compare \(zhg\)-score and official scoring system

Compare the \(zhg\)-score with the official scoring system

To compare the official points (pts_hurdles, pts_hj, …) with the \(zhg\)-scores, make scatter plots (e.g., pts_hurdles vs. zhg_hurdles).

Do so for at least two individual events. Here are some suggested assignments:

  • Team 1: 800 m run and high jump
  • Team 2: shot put and 200 m run
  • Team 3: long jump and javelin throw

Then try the same for the totals (e.g., 'pts_total' vs. 'zhg_total').

When you're finished, your instructor will show you how to add a line of best fit to the plots.

Solution 1 / 4

As an example for the scores in an individual event, here is the scatter plot for the 100 m hurdles.

plot(pts_hurdles ~ zhg_hurdles,
     data = hept,
     main = "Hurdles",
     xlab = "zhg-score",
     ylab = "Official score")

# Let's add the line of best fit to the plot. We haven't seen lm() and
# abline() yet. Don't worry too much about these functions right now. We'll
# revisit them in later lessons.
fit <- lm(pts_hurdles ~ zhg_hurdles, data = hept)
abline(fit)

Solution 2 / 4

There is an almost perfect linear relation between \(zhg\)-scores and official scores. The same is true for all other individual events.

Solution 3 / 4

When plotting the total scores, it's sensible to remove missing \(zhg\)-scores caused by two athletes who did not finish the 800 m run.

plot(pts_total ~ zhg_total,
     data = hept,
     main = "Total",
     xlab = "zhg-score",
     ylab = "Official score",
     ylim = range(pts_total[!is.na(run800)]))

# Line of best fit.
fit <- lm(pts_total ~ zhg_total, data = hept)
abline(fit)

Solution 4 / 4

Compared to individual events, there is more scatter around the line of best fit when we compare the total scores according to the \(zhg\)-score approach as opposed to the official scoring system.

Who is the winner?

Furthermore, the differences between the scoring systems produce different heptathlon winners!

  • Gold medallist (official): Thiam

  • Gold medallist (\(zhg\)-scores): Ennis-Hill

Let's try to understand why.

Activity 2C: Association between official point differences and standard deviations

What differs between the scoring systems?

The main distinction between the \(zhg\)-score and the official score for an individual event is that…

  • the \(zhg\)-score must have standard deviation 1 in each event,
  • the official score's standard deviation can be different for different events.

Activity 2C: Standard deviations in official scores

  1. Find the standard deviations of the official scores for each event.
  2. Make a scatter plot with…

    • the standard deviation of each event's official score on the \(x\)-axis,
    • the differences between Thiam's and Ennis-Hill's official scores on the \(y\)-axis.
  3. Add the line of best fit to the scatter plot.

Solution 1 / 4

# We can either go through the standard deviations one discipline at a time,
# for example ...
sd(hept$pts_hurdles)
## [1] 53.53547
# ... or we can combine all values in a vector.
all_sd <- c(sd(hept$pts_hurdles), sd(hept$pts_hj), sd(hept$pts_sp),
            sd(hept$pts_run200), sd(hept$pts_lj), sd(hept$pts_jt),
            sd(hept$pts_run800, na.rm = TRUE))
all_sd
## [1]  53.53547 100.93057  67.15094  60.94627  76.73958 110.67726  94.10278

Solution 2 / 4

To calculate the differences between Thiam's and Ennis-Hill's official scores, you could…

#Find each score using View() and then use R like a calculator. 
View()
pts_dif <- c(1041-1149, 1211-1093, ...) #Add more values...

#Find each score by using logical vectors
pts_dif <- c(hept$pts_hurdles[hept$athlete == 'Nafissatou Thiam'] - 
               hept$pts_hurdles[hept$athlete == 'Jessica Ennis-Hill'], ...) #Add more...
#Or by using vector indices 
pts_dif <- c(hept$pts_hurdles[1] - hept$pts_hurdles[2], ...) #Add more...
# Better still (and beyond what you need to know!): Use matrix notation for 
#Thiam (row 1), Ennis-Hill (row 2), and their scores in columns 6, 8, 10, ...
pts_dif <- hept[1, seq(6, 18, 2)] - hept[2, seq(6, 18, 2)] #This works as written
pts_dif <- as.numeric(pts_dif) #Makes our plotting life easier in the next step

Solution 3 / 4

Here's the code for a basic plot.

plot(pts_dif ~ all_sd,
     main = "Difference between Thiam's and Ennis-Hill's official scores",
     xlab = "Standard deviation",
     ylab = "Difference")
fit <- lm(pts_dif ~ all_sd)  
abline(fit)

Solution 4 / 4

A more informative plot for discussion

Here's the same plot with colours and labels.

What is useful to observe?

The positive slope of the line in the scatter plot reveals that the standard deviations in official scores tend to be

  • low in Ennis-Hill's best disciplines (e.g. 100 m hurdles, 200 m run),
  • high in Thiam's best disciplines (e.g. high jump, javelin).

Discussion: Why didn't Ennis-Hill win gold although she had the better \(zhg\)-score?

Discussion: Why didn't Ennis-Hill win gold although she had the better \(zhg\)-score?

According to the total \(zhg\)-score, the silver medalist Jessica Ennis-Hill actually performed better than the gold medalist Nafissatou Thiam by a noticeable margin.

Discuss in your team why the official scores gave an advantage to Thiam.

Solution 1 / 3

Let us consider two hypothetical athletes \(A_1\) and \(A_2\).

  • \(A_1\) is one standard deviation \(s_\text{hj}\) better in official points than the mean in high jump.
    But she's only average in 100 m hurdles.
  • \(A_2\) is one standard deviation \(s_\text{hurdles}\) better in official points than the mean in 100 m hurdles.
    But she's only average in high jump.
  • Suppose \(s_\text{hj} > s_\text{hurdles}\) (as in the 2016 Olympics).

Solution 2 / 3

The sum of the \(zhg\)-scores equals 1 for both athletes. So there is no difference between their total \(zhg\)-score.

But, in the official score, \(A_1\) is better than \(A_2\) by \(s_\text{hj} - s_\text{hurdles} > 0\) points.

We can generalize this result:

If two athletes have an identical total \(zhg\)-score, the athlete with stronger performances in the high-standard-deviation events receives a higher total official score.

Solution 3 / 3

In Activity 2C, we noticed that

  • Ennis-Hill tended to perform better in disciplines with low standard deviations (e.g. 100 m hurdles, 200 m run),
  • Thiam's showpiece disciplines (high jump, javelin) had high standard deviations.

So, Ennis-Hill was at a disadvantage in the official scoring system. Although she has a higher \(zhg\)-score, her best performances were in events that didn't give her many official points.

An update

Who was the winner of the women's heptathlon at the 2020 Olympics?

Source: Wikipedia