# Blog Archives

## Profile Likelihood

November 16, 2015
By
$F_{\boldsymbol{\theta}}$

Consider some simulated data > set.seed(1) > x=exp(rnorm(100)) Assume that those data are observed i.id. random variables with distribution, with . The natural idea is to consider the maximum likelihood estimator For instance, consider some maximum likelihood estimator, > library(MASS) > (F=fitdistr(x,"gamma")) shape rate 1.4214497 0.8619969 (0.1822570) (0.1320717) > F\$estimate+c(-1,1)*1.96*F\$sd 1.064226 1.778673 Here, we have an approximated (since the...

## Variable Importance with Correlated Features

November 6, 2015
By
$Y=\beta_0+\beta_1 X_{1}+\beta_3 X_{3}+\varepsilon$

Variable importance graphs are great tool to see, in a model, which variables are interesting. Since we usually use it with random forests, it looks like it is works well with (very) large datasets. The problem with large datasets is that a lot of features are ‘correlated’, and in that case, interpretation of the values of variable importance plots can...

## Applications of Chi-Square Tests

November 3, 2015
By
$\boldsymbol{N}=(N_1,\cdots,N_k)\sim\mathcal{M}(n,\boldsymbol{p})$

This morning, in our mathematical statistical class, we’ve seen the use of the chi-square test. The first one was related to some goodness of fit of a multinomial distribution. Assume that . In order to test  against , use the statistic Under , . For instance, we have the number of weddings, in a large city, per season, > n=c(301,356,413,262) We want to test...

## Statistical Tests: Asymptotic, Exact, ou based on Simulations?

October 20, 2015
By
$\boldsymbol{x}=\{x_1,\cdots,x_n\}$

This morning, in our mathematical statistics course, we’ve been discussing the ‘proportion test‘, i.e. given a sample of Bernoulli trials, with , we want to test against  A natural test (which can be related to the maximum likelihood ratio test) is  based on the statistic The test function is here To get the bounds of the acceptance region, we need the...

## Tests, Power and Significance

October 14, 2015
By
$\boldsymbol{x}=\{x_1,\cdots,x_n\}$

In the mathematical statistics course today, we started talking about tests, and decision rules. To illustrate all the concepts introduced today, we considered the case where we have a sample  with . And we want to test   against  In the course, we’ve seen that we could use a test based on the order statistics .  The test would be i.e. if  we...

## Visualising a Circular Density

October 7, 2015
By

This afternoon, Jean-Luc asked me some help about an old post I did publish, minuit, l’heure du crime; and some graphs published a few days after, where I used a different visualisation, in another post. The idea is that the hour can be seen as circular, in the sense that 23:58 is actually very close to 00:03. So when...

## Playing with Leaflet (and Radar locations)

September 30, 2015
By

## Computational Time of Predictive Models

September 25, 2015
By

Tuesday, at the end of my 5-hour crash course on machine learning for actuaries, Pierre asked me an interesting question about computational time of different techniques. I’ve been presenting the philosophy of various algorithm, but I forgot to mention computational time. I wanted to try several classification algorithms on the dataset used to illustrate the techniques > rm(list=ls()) >...

## Convergence and Asymptotic Results

September 24, 2015
By
$\overline{X}_n\ \xrightarrow{\text{a.s.}}\ \mathbb{E}(X)$

Last week, in our mathematical statistics course, we’ve seen the law of large numbers (that was proven in the probability course), claiming that given a collection  of i.i.d. random variables, with To visualize that convergence, we can use > m=100 > mean_samples=function(n=10){ + X=matrix(rnorm(n*m),nrow=m,ncol=n) + return(apply(X,1,mean)) + } > B=matrix(NA,100,20) > for(i in 1:20){ + B=mean_samples(i*10) + } > colnames(B)=as.character(seq(10,200,by=10)) > boxplot(B) It is...

## Minimalist Maps

September 5, 2015
By

This week, I mentioned a series of maps, on Twitter, some minimalist maps http://t.co/YCNPf3AR9n (poke @visionscarto) pic.twitter.com/Ip9Tylsbkv — Arthur Charpentier (@freakonometrics) 2 Septembre 2015 Friday evening, just before leaving the office to pick-up the kids after their first week back in class, Matthew Champion (aka @matthewchampion) sent me an email, asking for more details. He wanted to know if I...