Les Rois Maudits


author: “Alexander Levakov”

date: “March , 2015”

Life’s but a walking shadow, a poor player
That struts and frets his hour upon the stage
And then is heard no more. It is a tale
Told by an idiot, full of sound and fury,
Signifying nothing.
Macbeth - William Shakespeare

Research goal

The monarchs of France ruled from the establishment of Francia in 486 to 1870. The first race, or dynasty of kings, was the Merovingian dynasty, which ruled until 751, followed by the second race, the Carolingian dynasty, until 987 (with some interruptions).

So we want to estimate the parameters of ruling duration for both races and understand from statistical grounds are there any differences and correlations. For more information about historical dates see links below:

http://britannia.com/history/resource/france.html

http://en.wikipedia.org/wiki/History_of_France

http://en.wikipedia.org/wiki/List_of_French_monarchs

library(qcc)
## Package 'qcc', version 2.6
## Type 'citation("qcc")' for citing this R package in publications.
library(car)
library(ggplot2)

Data

Merovingian

Merovech,447-458
Childeric I,458-482
Clovis I,482-511 Childebert I,511-558 Clothaire I,558-562
Charibert,562-566
Sigebert I,562-575 Chilperic I,566-584
Clothaire II,584-628 Dagobert I,628-637
Clovis II,637-655 Clothaire III,655-668
Childeric II,668-674 Dagobert II,674-678
Theuderic III,674-691
Clovis III,691-695 Childebert II,695-711
Dagobert III,711-716 Chilperic II,716-721 Theuderic IV,721-737 Childeric III,743-751

Carolingian

Pepin I, the Elder,628-639 Pepin II,687-714 Charles Martel, the Hammer;714-741 Carloman,741-747 Pepin III, the Short,747-768 Carloman,768-771 Charlemagne (Charles the Great),771-814
Louis I, the Pious,814-840 Louis, Lothair, Charles, the Bald (joint rulers),840-843 Charles, the Bald,843-877
Louis II,877-879 Louis III,879-882
Carloman II,882-884
Charles II, the Fat,884-887
Eudes, Count of Paris,888-898
Charles III, the Simple,898-922
Robert,922-923 Rudolph, Duke of Burgundy,923-936
Louis IV,936-954 Lothair,954-986
Louis V, the Indolent,986-987

Preliminary analysis

First, we need to get ruling durations for all kings of two races: merov, carol.

merov=c(447-458, 458-482, 482-511, 511-558,558-562, 562-566, 562-575, 566-584, 584-628, 628-637, 637-655, 655-668, 668-674, 674-678, 674-691, 691-695, 695-711, 711-716, 716-721, 721-737, 743-751)
carol=c(628-639, 687-714, 714-741, 741-747, 747-751, 751-768, 768-771, 771-814, 814-840, 840-843, 843-877, 877-879, 879-882, 882-884, 884-887, 888-898, 898-922, 922-923, 923-936, 936-954, 954-986, 986-987)

merov=abs(merov)
carol=abs(carol)

merov
##  [1] 11 24 29 47  4  4 13 18 44  9 18 13  6  4 17  4 16  5  5 16  8
carol
##  [1] 11 27 27  6  4 17  3 43 26  3 34  2  3  2  3 10 24  1 13 18 32  1

Second, we examine the parameters of populations for two variables (merov, carol).

summary(merov)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##       4       5      13      15      18      47
summary(carol)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##    1.00    3.00   10.50   14.09   25.50   43.00
sd(merov)
## [1] 12.32883
sd(carol)
## [1] 12.85786

Note

It seems there is slight difference. Is it?

So we need to check both populations for normality test.

Normality test

qm<-qcc(merov,type = "xbar.one",title="Merovingian")

qcc(carol,type = "xbar.one", title="Carolingian")

## List of 11
##  $ call      : language qcc(data = carol, type = "xbar.one", title = "Carolingian")
##  $ type      : chr "xbar.one"
##  $ data.name : chr "carol"
##  $ data      : num [1:22, 1] 11 27 27 6 4 17 3 43 26 3 ...
##   ..- attr(*, "dimnames")=List of 2
##  $ statistics: Named num [1:22] 11 27 27 6 4 17 3 43 26 3 ...
##   ..- attr(*, "names")= chr [1:22] "1" "2" "3" "4" ...
##  $ sizes     : int [1:22] 1 1 1 1 1 1 1 1 1 1 ...
##  $ center    : num 14.1
##  $ std.dev   : num 13.4
##  $ nsigmas   : num 3
##  $ limits    : num [1, 1:2] -26.2 54.4
##   ..- attr(*, "dimnames")=List of 2
##  $ violations:List of 2
##  - attr(*, "class")= chr "qcc"
hist(merov,col="blue",main="Merovingian")

hist(carol,col="pink",main="Carolingian")

plot(density(merov),col="blue",main="Merovingian")
polygon(density(merov),col="blue")
grid()

plot(density(carol),col="pink",main="Carolingian")
polygon(density(carol),col="pink")
grid()

boxplot(merov,carol,notch = T,col=c("blue","pink"),outline = F,names = c("Merovingian","Carolingian"))
## Warning in bxp(structure(list(stats = structure(c(4, 5, 13, 18, 29, 1, 3,
## : some notches went outside hinges ('box'): maybe set notch=FALSE

shapiro.test(merov)
## 
##  Shapiro-Wilk normality test
## 
## data:  merov
## W = 0.8139, p-value = 0.001079
shapiro.test(carol)
## 
##  Shapiro-Wilk normality test
## 
## data:  carol
## W = 0.8732, p-value = 0.008997

Note on normality

Unfortunately both populations have not passed through normality test. Such things happen!

And what about variance test for equality?

Variance equality test

var.test(merov,carol)
## 
##  F test to compare two variances
## 
## data:  merov and carol
## F = 0.9194, num df = 20, denom df = 21, p-value = 0.8539
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
##  0.3791767 2.2510793
## sample estimates:
## ratio of variances 
##           0.919403

Note on variance equality

Well, there is equality of variances - good news, but we can’t use Student test in this case. So we will use non-parametric alternative - Wilcoxon test.

Wilcoxon test

wilcox.test(merov,carol)
## Warning in wilcox.test.default(merov, carol): cannot compute exact p-value
## with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  merov and carol
## W = 265, p-value = 0.4149
## alternative hypothesis: true location shift is not equal to 0

Note on Wilcox test

Here is our first interesting result: both races of french kings have equal medians for ruling durations!

Now we come to the second question - are there any correlations in ruling duration between two races?

But before that we need to make both populations equal in length: 21 values for both races.

Correlation

carol<-carol[1:21]
cor.test(merov,carol, use = "complete.obs")
## 
##  Pearson's product-moment correlation
## 
## data:  merov and carol
## t = 1.4847, df = 19, p-value = 0.154
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1269400  0.6619673
## sample estimates:
##       cor 
## 0.3224145
plot(merov,carol,main = "Correlations in ruling durations",xlab="Merovingian", ylab="Carolingian",pch = 20, col="blue")
grid()

Note on correlation

Here we got one more interesting result - there is correlation, although not strong but significant one according to the results of our test. As we can see these correlations lie between 10 and 20 years of ruling. Very queer!

Now we can produce linear regression model. Here we are with residuals plots!

Linear regression model

fit<-lm(merov~carol)
summary(fit)
## 
## Call:
## lm(formula = merov ~ carol)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -12.355  -7.061  -2.849   1.939  34.700 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)  
## (Intercept)  10.4413     4.0318   2.590    0.018 *
## carol         0.3098     0.2087   1.485    0.154  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 11.97 on 19 degrees of freedom
## Multiple R-squared:  0.104,  Adjusted R-squared:  0.05679 
## F-statistic: 2.204 on 1 and 19 DF,  p-value: 0.154
par(mfrow=c(2,2))
plot(fit)

par(mfrow=c(1,1))

Note on residual plots

In fact our model is not good enough for research. So we need some Box-Cox transformation!

Here we are with a new model after transformation!

LM after Box-Cox transformation

boxCox(fit)

fit.log<-lm(log(merov)~log(carol))
summary(fit.log)
## 
## Call:
## lm(formula = log(merov) ~ log(carol))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.21346 -0.60794  0.07527  0.45599  1.54507 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   1.7981     0.3513   5.118 6.11e-05 ***
## log(carol)    0.2829     0.1435   1.972   0.0633 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.7369 on 19 degrees of freedom
## Multiple R-squared:   0.17,  Adjusted R-squared:  0.1263 
## F-statistic:  3.89 on 1 and 19 DF,  p-value: 0.0633
plot(log(merov),log(carol),main = "Correlations in ruling durations",xlab="Merovingian", ylab="Carolingian",pch = 20, col="red")
grid()

abline(fit.log)

par(mfrow=c(2,2))
plot(fit.log)

Note on Box-Cox transformation

Not so bad, although Adjusted R-squared=0.1263 and p-value = 0.0633. Compare Adjusted R-squared = 0.05679 and p-value = 0.154 for the first model (before transformation).

Now we need to make our final steps for demonstrating results using two approximations: local mean and linear model.

Final LM models

roi.dat<-data.frame(merov,carol)
roi.dat
##    merov carol
## 1     11    11
## 2     24    27
## 3     29    27
## 4     47     6
## 5      4     4
## 6      4    17
## 7     13     3
## 8     18    43
## 9     44    26
## 10     9     3
## 11    18    34
## 12    13     2
## 13     6     3
## 14     4     2
## 15    17     3
## 16     4    10
## 17    16    24
## 18     5     1
## 19     5    13
## 20    16    18
## 21     8    32
ggplot(data = roi.dat,aes(log(merov),log(carol))) + geom_smooth() +geom_point()
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.

ggplot(data = roi.dat,aes(log(merov),log(carol))) + geom_smooth(method=lm) +geom_point()

Conclusions

1 Both races of french kings have equal medians for ruling duration.

2 Variations of ruling duration for both races are equal.

3 There is correlation of ruling for two races that lies between 10 and 20 years of ruling.

4 Our results do need supplemental examination due to the used populations.