Modèles de Prévision, suite

La seconde partie de transparents pour le cours ACT6420 est en ligne. Il s’agit d’un document qui permettra à tout le monde garder des traces, mais je n’entends pas forcément les suivre… Par exemple, ce soir, je propose de jouer un peu avec les données d’incendies à Chicago

> chicago=read.table("http://freakonometrics.free.fr/chicago.txt",
> Y=chicago$Fire > X1=chicago$X_1
> X2=chicago$X_2 > X3=chicago$X_3
> base=data.frame(Y,X1,X2,X3)

ou une base sur les états américains (cf un ancien billet)

> US=read.table("http://freakonometrics.free.fr/US.txt", + header=TRUE,sep=";")

Sinon, la semaine passée, on avait évoqué la matrice chapeau (dont on reparlera davantage lorsque l’on évoquera la phase de diagnostique). L’idée était de noter que

$\widehat{\boldsymbol{Y}} = H \boldsymbol{Y}$

avec

$H = \boldsymbol{X} \left(\boldsymbol{X}^\top \boldsymbol{X} \right)^{-1} \boldsymbol{X}^\top$

On peut visualiser cette matrice avec le code suivant

> X=cbind(1,cars\$speed)
> M=X %*% solve( t(X) %*% X) %*% t(X)
> Q=matrix(as.numeric(cut(M,c(-10,quantile(M,(1:5)/6),10),labels=1:6)),50,50)
> plot(1:50,1:50,col="white",axes=FALSE,xlab="",ylab="",ylim=c(50,0))
> library(RColorBrewer)
> couleur=rev(brewer.pal(6,"RdBu"))
> for(i in 1:50){for(j in 1:50){ points(i,j,col=couleur[Q[i,j]],pch=15,cex=1)}}
> axis(1)
> axis(2)

avec des cases rouges pour les valeurs importantes (et positive) et des case bleues pour des valeurs importantes (mais négatives)

Chicago, Baseball and Paul Erdös

Thursday afternoon, before the 2013 CAE Faculty Conference, Stuart Klugman should invit us to go and watch the Cubs playing, in Chicago. That should be fun. First baseball game, ever. I will be back in Montréal (and on the blog) next week !

That will be an opportunity to discuss with mathematicians and baseball fans. Actually, a colleague told me that there was a nice anecdote about baseball and mathematics. Hank Aaron, “considered to be one of the greatest baseball players of all time” is supposed to have an Erdös number of 1 (see e.g. http://boolesrings.org/mpawliuk/….). Some pretend that it is only because Hank Aaron has signed the same baseball as Paul Erdös (thus, they cosigned something, giving him the Erdös number 1) while both of them were invited in some ceremony to get honorary diplomas… The funny part is that, even if he was not a mathematician (but has an Erdös number of 1), he also has named some numbers, the so-called Ruth–Aaron pairs. The story is nice, actually. On April 1974, Hank Aaron become famous for swatting his 715th home run. The prior record was held by Babe Ruth, with (have a wise guess…) 714 home run. Three mathematicians in Georgia (including Carl Pomerance) notice that 714 × 715 was not a common pair of consecutive number. It consists of two consecutive integers for which the sums of the prime factors of each integer are equal, since

714 = 2 × 3 × 7 × 17

715 = 5 × 11 × 13

and

2 + 3 + 7 + 17 = 5 + 11 + 13    (= 29)

Those are Ruth-Aaron pairs, see e.g. http://mathworld.wolfram.com/… or Pomerance (1999). Note that Carl Pomerance published more than 40 papers with Paul Erdös. End of the loop.

Chicago, Society of Actuaries

I will be in Chicago for the next few days, at the 2013 CAE Faculty Conference, organized by the Society of Actuaries,