Publications by arthur charpentier

Comparing quantiles for two samples

08.03.2013

Recently, for a research paper, I some samples, and I wanted to compare them. Not to compare they means (by construction, all of them were centered) but there dispersion. And not they variance, but more their quantiles. Consider the following boxplot type function, where everything here is quantile related (which is not the case for standard boxp...

7286 sym R (4094 sym/17 pcs) 110 img 1 tbl

Happy St Patrick’s Day

17.03.2013

I love Saint Patrick’s Day for, at least, two reasons. The first one is that, on March 17th, you can play out loud The Pogues, the second one is that it’s the only day in the year when I really enjoy getting a Guiness in a pub. And Guiness is important in statistical science (I did mention a couple of hours ago – on this blog –  that bee...

5941 sym R (152 sym/1 pcs) 14 img

Rationality, and MS Excel (and other calculators)

27.03.2013

This morning, Mathieu had a nice experience in his course on computational method in actuarial science. But let us start with some mathematical formal definitions. First, recall that is – somehow – a standard expression. No one should be surprised to see such an expression. Generally (as explained in http://en.wikipedia.org/… ), this funct...

4407 sym R (119 sym/2 pcs) 132 img

Benford law and lognormal distributions

28.03.2013

Benford’s law is nowadays extremely popular (see e.g. http://en.wikipedia.org/…). It is usually claimed that, for a given set data set, changing units does not affect the distribution of the first digit. Thus, it should be related to scale invariant distributions. Heuristically, scale (or unit) invariance means that the density of the measure...

3616 sym R (1053 sym/7 pcs) 86 img

Easter

31.03.2013

This morning, there was an interesting post entitled “why does Easter move around so much?” online on http://economist.com/blogs/economist-explains/… In my time series classes, I keep saying that sometimes, series can exhibit seasonlity, but the seasonal effect can be quite irregular. It is the cas for river levels, where snowmelt can hav...

2888 sym R (1183 sym/6 pcs) 16 img

Reserving with negative increments in triangles

11.04.2013

A few months ago, I did published a post on negative values in triangles, and how to deal with them, when using a Poisson regression (the post was published in French). The idea was to use a translation technique: Fit a model not on ‘s but on , for some , Use that model to make predictions, and then translate those predictions, This is what ...

4788 sym R (2519 sym/16 pcs) 66 img

In three months, I’ll be in Vegas (trying to win against the house)

20.04.2013

In fact, I’m going there with my family and some friends, including two probabilists (I mean professionals, I am merely an amateur), with this incredible challenge: will I be able to convince  probabilists to go to play at the Casino? Actually, I also want to study them carefully, to understand how we should play optimally. For example, I hope...

6035 sym R (481 sym/3 pcs) 122 img

Animation, from R to LaTeX

03.05.2013

Just a short post, to share some codes used to generate animated graphs, with R. Assume that we would like to illustrate the law of large number, and the convergence of the average value from binomial sample. We can generate samples  using > n=200 > k=1000 > set.seed(1) > X=matrix(sample(0:1,size=n*k,replace=TRUE),n,k) Each row  will be a traje...

2073 sym R (1691 sym/7 pcs) 20 img

LaTeX in R graphs

03.05.2013

A nice post was recently published on the rsnippets blog, about the tikzDevice R package. This package is – indeed – awesome. Even if it has been removed from the CRAN website. Of course, it can be download from the archive folder, on http://cran.r-project.org/…, but also (for a more recent version)  on http://download.r-forge.r-project.o...

2028 sym R (934 sym/7 pcs) 12 img

Poisson regression on non-integers

07.05.2013

In the course on claims reserving techniques, I did mention the use of Poisson regression, even if incremental payments were not integers. For instance, we did consider incremental triangles > source("http://perso.univ-rennes1.fr/arthur.charpentier/bases.R") > INC=PAID > INC[,2:6]=PAID[,2:6]-PAID[,1:5] > INC [,1] [,2] [,3] [,4] [,5] [,6]...

2929 sym R (4956 sym/11 pcs) 8 img