R language assignment
A study of the Decathlon dataset
A Student
20 February 2021
Abstract
We demonstrate how various descriptive and inferenrial statistical methods can be applied to the Decathlon dataset, and how their results might be interpreted and presented. We study the evolution of athlete performance as function of time, and in show that while the best performances appear to increase with time, the mean and median performances appear to decrease over the same period. We illustrate the non-homogeneity of the current decathlon scoring scheme, and give some insight into the profile of the best-performing decathletes. We also perform a correlation analysis to explore relationships between the different events of the decathlon, and finally present the results of a logistic-regresion analysis and demonstrate that to a certain extent it is possible to distinguish between French and German decathletes by the scores the achieve on a subset of the decathlon events.
Contents
1 Introduction 2
2 Performance across years 2
2.1 Evolution of performances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 Comparison of mean season performances . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.3 Comparison between 1988 and 1996 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3 Differences between events 6
3.1 Difference between the median number of points scored during each event . . . . . . . . . . 6
3.2 Profile of the season best performers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.3 Partial correlation between events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4 Differences between French and German decathletes 10
5 Conclusion 11
6 Appendix 12
1
1 Introduction
The Decathlon data set records the performances of elite decathletes in international competitions over the period from 1985 to 2006. The decathlon is a combined event in athletics consisting of ten track-and- field events; the current decathlon world-record holder is the French decathlete Kevin Mayer, who achieved a score of 9,126 points in 2018. One may refer to the following Wikipedia page for more information of the decathlon: https://en.wikipedia.org/wiki/Decathlon.
The data set consists of 7,968 observations of 24 variables. These names of the variables are listed hereafter:
## [1] Variables names:
## [1] "Totalpoints" "DecathleteName" "Nationality" "m100" ## [5] "Longjump" "Shotput" "Highjump" "m400" ## [9] "m110hurdles" "Discus" "Polevault" "Javelin" ## [13] "m1500" "yearEvent" "P100m" "Plj" ## [17] "Psp" "Phj" "P400m" "P110h" ## [21] "Ppv" "Pdt" "Pjt" "P1500"
An entry of the data set consists of the total number of points scored by a decathlete, the name and nationality of the decathlete, and the year the performance was achieved. The raw performances for each of the 10 events are reported (with time in seconds and distance or height in meters), together with the number of points scored for these events. There are 2,709 different decathletes of 107 different nationalities in the data set.
Remark. For 435 entries of the data set, we observed a difference of 1 between the variable Totalpoints, corresponding to the total number of points scored by a decathlete for that performance, and the sum of the points scored during the 10 events. We decided to apply a correction to the corresponding entries of the variable Totalpoints, so that they are all equal to the sum of the points scored during the 10 events.
# Correction of `Totalpoints` Decathlon$Totalpoints <- rowSums(Decathlon[,15:24])
In our study we pay a particular attention to the total number of points, the points scored during each event, the nationality of the decathletes, and the year the performances were achieved. The Pearson correlations between the total number of points and the points scored during the various events is illustrated by the correlogram shown in Figure 1, while scatter plots and histograms showing the points scored during the three throw events (shot-put, discus and javelin throw) are presented in Figure 8 (see appendix).
2 Performance across years
In this section, we investigate the evolution of the overall performance (variable Totalpoints) as func- tion of the year these performances were achieved (variable yearEvent). The number of obsevations for each year (or season) varies between 321 and 399. A graphical representation of the evolution of the best, mean and median preformace as a function of the year is shown in Figure 2.
2
−1
−0.8
−0.6
−0.4
−0.2
0
0.2
0.4
0.6
0.8
1
To ta
lp o
in ts
P 1
0 0
m P
lj P
sp P
h j
P 4
0 0
m P
1 1
0 h
P p
v P
d t
P jt
P 1
5 0
0
Totalpoints P100m
Plj Psp Phj
P400m P110h
Ppv Pdt Pjt
P1500
Figure 1: Graphical representation of the Pearson correlations between the total number of points and the points scored during each event.
1985 1990 1995 2000 2005
8 5
0 0
8 6
0 0
8 7
0 0
8 8
0 0
8 9
0 0
9 0
0 0
Year
To ta
l p o
in ts
Best
1985 1990 1995 2000 2005
7 2
0 0
7 2
5 0
7 3
0 0
7 3
5 0
7 4
0 0
Year
To ta
l p o
in ts
Mean Median
Figure 2: Evolution of the best, mean and median performance as a function of the year. In each case, the regression line (dashed black line) is shown togeter with the corresponding 95% confidence intervals (purple dashed curves; prediction without noise term).
3
2.1 Evolution of performances
Figure 2 suggests that the best season performance increases with time, while the mean and median season performances appear to decrease with time. This observation is confirmed by tests of Spearman’s rank correlation between the time variables and the best, mean and median season performances. The results are shown in Table 1, where we observe
• for the best season performance a positive Spearman correlation of 0.398, statistically significant at the significance level α = 0.05;
• for the mean season performance a negative Spearman correlation of −0.551, statistically significant at the significance level α = 0.01;
• for the median season performance a negative Spearman correlation of -0.581, statistically significant at the significance level α = 0.01.
Table 1: Result of the Spearman’s rank correlation tests between the year and the season’s best, mean and median performances.
performance alternative p.value estimate
Best greater 0.0337857 0.3980802 Mean less 0.0044491 -0.5505364
Median less 0.0022965 -0.5807911
2.2 Comparison of mean season performances
Figure 3 gives an overview of the sample mean and sample variance of the performances achieved each year as represented by the Totalpoints variable; the corresponding confidence intervals (at the confidence level 70%) are also presented. We observe that 1988 has the largest sample mean and the second-largest sample variance among all years, while 1996 has the second-largest sample mean and the largest sample variance. Interestingly, 1988 and 1996 were both Olympic years, with the 1988 Games now infamous for many proven doping cases. We also observe a relatively strong overlap between the confidence intervals corresponding to these two years. The number of observations for each year are relatively large (at least 321 observations), so by the central limit theorem the normal approximations used to compute these intervals are likely to be reasonably good.
Three different tests for homogeneity of variances return p-values between 0.052 and 0.102, as shown in Table 2. These results indicate that there is no strong statistical evidence to suggest that the variance of athlete performances differs across years: for each of the three tests we do not reject the null hypothesis of homoscedasticity at significance level α = 0.05.
Table 2: Tests for homogeneity of variance for the performances (i.e. scores achieved by the decathletes) achieved each year.
Test p.value
Bartlett 0.0521832 Fligner-Killeen 0.0575033
Levene 0.1015971
4
7300 7350 7400 7450
1 4
0 0
0 0
1 8
0 0
0 0
Mean
V a
ri a
n ce
85
86
87
88
89
90
91
92
93
94 95
96
97 98
99
00
01
02
03
04
05
06
Figure 3: Sample mean and sample variance for the performances achieved each season, and correponding confidence intervals at the confidence level 70%. The horizontal intervals corresponds to the means (in orange), and the vertical ones to the variances (in green).
Next we apply a one-way ANOVA to see whether there is a significant difference between the mean perfor- mance achieved each year, and find that it returns a p-value smaller than 0.0002 (see below), which suggests that there is a statistically significant difference between the mean performance for at least two years. Notice that the number of observations for each year is roughly the same, so the data are approximately balanced. Tests indicate that the data are not normally distributed, however the number of observations in each year group is relatively large (at least than 321), so by the central limit theorem the conclusion of this ANOVA is likely to be valid. We can also report that ANOVA performed with the oneway.test function (which does not assume assuming equality of variance) returns a p-value of similar magnitude.
AOV1 <- aov(Totalpoints ~ yearEvent_AsFactor, data=Decathlon) print(summary(AOV1))
## Df Sum Sq Mean Sq F value Pr(>F) ## yearEvent_AsFactor 21 8.894e+06 423547 2.487 0.000184 *** ## Residuals 7946 1.353e+09 170302 ## --- ## Signif. codes: 0 ’***’ 0.001 ’**’ 0.01 ’*’ 0.05 ’.’ 0.1 ’ ’ 1
2.3 Comparison between 1988 and 1996
In Figure 2 we observe that the sample mean of the overall performances for 1988 is the largest among all years. (A similar observation holds for the sample median, while 1988 interestingly also has the the lowest
5
season’s best performance.) We now test to see whether there is a statistically significant difference between the mean performances for 1988 and 1996, the year having the second-largest sample mean of the overall performance.
## [1] F-test (compararison of variances); p-value=0.7034
## [1] t-test (compararison of means); p-value=0.4546
The F -test for equality of variances indicates that there is no statistical evidences to suggest a difference between the variance of the two samples. The two-sample t-test then indicates that there is no statistical evi- dence to suggest a difference between the mean of the two samples. Note that that although the two samples might not be normally distributed, the relatively large sample sizes ensure that normal approximation will work well here.
3 Differences between events
Figure 4 illustrates the sample mean, sample median and sample variance of the number of points scored in each of the 10 decathlon events, where we observe that the scheme for awarding points does not appear to be homogeneous. For example, decathletes on average seem to score more points for the 110m hurdles than for the javelin event, and the variance of the points scored for the pole vault appears to be significantly larger that the variance of the points scored for the 100m.
6 5
0 7
0 0
7 5
0 8
0 0
P100m Plj Psp Phj P400m P110h Ppv Pdt Pjt P1500
Mean
Median
Variance
4 0
0 0
6 0
0 0
8 0
0 0
1 0
0 0
0
Figure 4: Sample mean, median and variance od the number of points scored during each event. Values for the mean and the median read on the left-hand-side axis, and on the right-hand-side axis for the variance.
3.1 Difference between the median number of points scored during each event
To test the statistical significance of the apparent non-homogeneity of the decathlon scoring scheme sug- gested by Figure 4, we perform a Kruskal-Wallis rank sum test to see whether there is a significant difference between the median number of points scored during each event (see below). The obtained p-value is ex- tremely small, so there is strong statistical evidence to indicate that the median number of points differ for at least two events.
6
## ## Kruskal-Wallis rank sum test ## ## data: Pts_Event by Event ## Kruskal-Wallis chi-squared = 34243, df = 9, p-value < 2.2e-16
Next we perform a Wilcoxon rank-sum test (with continuity correction) to test whether the number of points scored for the pole-vault event is larger that for the javelin-throw event. We perform the test for paired observations, because the same decathlete achieved both scores. The result of the test are summarized below.
## [1] Difference between the medians of Ppv and Pjt:
## [1] wilcox.test p-value=0.0000
The obtained p-value is extremely small so there is strong statistical evidence to suggest that the median number of points scored during the pole-vault event is larger that for the javelin-throw event. To a lesser extent, we also observe a statistically significant difference between the median number of points scored for 100m and long-jump events, even though these two look relatively close in Figure 4):
## [1] Difference between the medians of P100m and Plj:
## [1] wilcox.test p-value=0.0226
3.2 Profile of the season best performers
To identify which events appears to be the more decisive in determining the overall winner, for each year we compute the in-season ranking for each event of the decathlete with the best overall performance, illustrated in Figure 5.
Although only a descriptive analysis, the rank-based analysis associated with Figure 5 seems to highlight some interesting features
• The event appearing as the less decisive is the 1550m (in view of Figure 5). This can in our opinion be at least partially explained by the following reasons. The 1500m is the last event of the 10, occurring at the end of the second day, so that only the decathletes in close fight for the victory or to beat their personal record have an interest to try to perform well during this event (and they are certainly all tired by the two days of competition). The 1500m is also the only pure-resistance event (the other event including a resistance component is the 400m), so that there is no real interest for a decathlete to specialise in this event. This observation is in total agreement with the fact that the 1500m appears to be the event which is the less correlated with the others and with the total score achieved by a decathlete; see Figure 1.
• The event appearing as the most decisive is the the 110m hurdles; in the data, the best season performer acheived the best or second-best season performance at the 110m hurdles in 50% of the cases. This might be explained by the fact that the 110m-hurdles requires very good explosivity and speed ability, combined with a strong technique and an excellent coordination; the risk of falling during the race is also very high in comparison to the other track events.
7
P100m Plj Psp Phj P400m P110h Ppv Pdt Pjt P1500
0 5
0 1
0 0
1 5
0 2
0 0
2 5
0 3
0 0
In −
se a
so n
r a
n ki
n g
Figure 5: Boxplot of the of in-season rank achieved by the season best-performers for each event of the Decathlon.
• The second, third and fourth most decisive events appear to be the 100m, the long jump and the 400m, respectively. Although being a jump event, the qualities to perform well at the long jump are very similar to the qualities required to be a good sprinter (the correlation between the score achieved during the long jump and the 100m is actually relative strong, at 0.49).
These observation suggest that top-performing decathletes excel in the “speed-related” events, and perform relatively well in the other events except for the 1500m.
3.3 Partial correlation between events
To further investigate the relationships between the different events of the decathlon, we perform a partial correlation analysis by computing the partial correlations between the points scored for every pair of events while controlling for all the other event. The computed partial correlations are illustrated in Figure 6.
Interestingly, and in comparison to the correlations shown in Figure 1, if we control for all the other events, we observe only a few relatively strong partial correlations between pairs of events (all of which are signifi- cant at α = 0.01). In particular we observe that:
• P100m and P1500 are negatively correlated, • P400m and P1500 are positively correlated, • P400m and P100m are positively correlated, • Psp and Pdt are positively correlated.
The positive partial correlations for the pairs P400m-P100m and P400m-P1500, and the negative partial correlation for the pair P1500-P100m, might be consequence of the fact that decathletes performing well
8
−1
−0.8
−0.6
−0.4
−0.2
0
0.2
0.4
0.6
0.8
1
P 1
0 0
m
P lj
P sp
P h
j
P 4
0 0
m
P 1
1 0
h
P p
v
P d
t
P jt
P 1
5 0
0
P100m
Plj
Psp
Phj
P400m
P110h
Ppv
Pdt
Pjt
P1500
Figure 6: Graphical representation of the partial correlations between the points scored during every pairs of events while controlling for all the other event.
9
at the 400m may either be very fast or have good resistance. The relatively strong partial correlation between Psp and Pdt is also not surprising, because the shot put and discuss throw require very similar physical abilities and technical skills.
4 Differences between French and German decathletes
In this section, we explore the possibility of differentiating between French and German decathletes by using a logistic regression model based on the points scored during a selection of events. To this extent, we extract the entries of the data set corresponding to the points scored during the 10 events by the French and German decathletes, and gather these entries in a data set named data_FRAxGER; a categorical variable IsFrench is added to this data set, taking the value 1 when the entry corresponds to a French decathlete, and 0 for a German decathlete. The resulting data set has 1,297 entries, with 40.17% corresponding to French decathletes. Notice that no decathletes appear more than 12 times in the extracted data set.
## [1] Number of French entries: 521
## [1] Number of German entries: 776
## [1] Number of different French decathletes: 151
## [1] Number of different German decathletes: 247
To select a set of relevant events, we use the stepAIC function of the MASS package. The stepwise pro- cedure is initialsed from the logistic model based on the points scored during the 10 events. The resulting model, named step.model, depends on 7 events, as described below (where the coefficients of the result- ing model are given).
## [1] Coefficients of step.model:
## (Intercept) Pdt P400m Ppv Phj ## 2.425113260 0.005761762 -0.005195875 0.004739631 0.001693611
## P110h Psp P100m ## -0.001676468 -0.015800780 0.005794585
The ROC curve corresponding to the model step.model is given in Figure 7. Although not especially impressive, the model appears to be able to identify some statistically significant differences between the French and German decathletes. Based on the coefficients of step.model, French decathletes appear, to a certain extent, to be better their German counterparts in discuss throw, pole vault, high jump and 100m (positive coefficients), while German decathletes on average seem to perform better in the 400m, 110m- hurdles and shot-put event (negative coefficients).
With a decision threshold set at 40%, the binary classifier based on the logistic model setp.model cor- rectly classifies 69.29% of the French decathletes, and 67.27% of the German decathletes, as reported below (see also Figure 7). Note that the threshold was set at 40% to obtain balanced percentage of classification errors.
10
Specificity
S e
n si
tiv ity
1.0 0.6 0.2 0
.0 0
.4 0
.8
Figure 7: ROC curve for the logistic regression model step.model; the orange dashed lines correspond to the sensiblility and specificity of the resulting binary classifier for a decision treshold at 40%.
## [1] Confusion matrix for step.model with 40% decision treshold:
## FALSE TRUE class.error ## FALSE 522 160 0.3273196 ## TRUE 254 361 0.3071017
Note also that in view of their Z-values, the long jump and the 110m hurdles events appear less influent than the other variables. Thus we removed these two predictors from the model, however the conclusions drawn from an analysis of the reduced model are similar to the conclusions based on step.model.
## [1] p-values for the Z-values of step.model:
## (Intercept) Pdt P400m Ppv Phj ## 3.483006e-02 4.743905e-07 3.990390e-05 1.665840e-11 7.215314e-02
## P110h Psp P100m ## 1.481284e-01 2.258318e-29 3.469760e-05
5 Conclusion
In this report, we have used various statistical tools to explore the Decathlon data set. We performed some correlation analyses, both parametric and non-parametric, and some tests on means and variances using the t-test, F -test and ANOVA, together with various tests for checking conditions. We also performed some non-paremetric tests for the median of certain quantities, including the Wilcoxon and Kruskal-Wallis rank- sum tests, and computed confidence intervals for certain means and variances. In addition, we computed and
11
discussed some linear regression and logistic regression models, and used various graphical representation tools to illustrate the data and our findings. For the parametric tests, sample sizes were generally large enough to ensure the validity of the normal approximation framework.
Our main observations can be summarised as follows:
1. the best season performances appear to increase with the years, while the mean and median perfor- mances appear to decrease over the same period (Section 2);
2. the year 1988 is relatively “special”, but not in statistically significant way (Section 2); 3. the current scoring scheme of the decathlon is not homogeneous (Section 3); 4. the best decathletes seem, in general, to be those who outperform the others in “pure-speed” events,
including the long-jump (Section 3); 5. there exist relatively strong partial correlations between groups of events (Section 3); 6. certain countries seem, to a certain extent, to yield decathletles with specific profiles (Section 4).
These observations are in our opinion interesting and appear to be statistically significant. Our conclusions should nevertheless be checked and refined by further analyses, potentially using other sources of data.
6 Appendix
12
Psp
4 0
0 6
0 0
8 0
0
400 600 800
400 600 800
0.72
Pdt
4 0
0 6
0 0
8 0
0
0.44
0.42
400 600 800 1000
4 0
0 6
0 0
8 0
0 1
0 0
0
Pjt
Throw events
Figure 8: Scatter plots, histograms and correlations for the three throw events.
13
- Introduction
- Performance across years
- Evolution of performances
- Comparison of mean season performances
- Comparison between 1988 and 1996
- Differences between events
- Difference between the median number of points scored during each event
- Profile of the season best performers
- Partial correlation between events
- Differences between French and German decathletes
- Conclusion
- Appendix