Archive for Yule

a journal of the conquest, war, famine, and death [definitely new] year

Posted in Books, Kids, Mountains, pictures, Running, Travel with tags , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , on February 7, 2024 by xi'an

Read some graphical novels over the Yule break, incl. the new volume in the endless Thorgal series, Adieu Aricia, created by a master of heroic fantasy comics, Recht RobinL’Art de la guerre, a refreshing if light pastiche of Blake & Mortimer drawn by Floc’h, far from the E.P. Jacob ligne claire (following another one by another master of Belgian comics, Schuiten, Le Dernier Pharaon), and Le Monde sans fin, by Blain & Jancovici, a best seller retracing the central importance of energy in evolution and the urgent need to change the entire societal software (if a bit heavy handed).

Cooked little while being away, except for a Flemish red cabbage stew and a batch of mini buckwheat galettes, and fortunately escaped the huge meals that usually plague this time of year. Avoided as well some viral issues with French oysters, despite enjoying several servings of Norman origin. While in Aubrac, has a taste of the local beef, the well-named… Aubrac breed, whose herds are raised on this immense and treeless plateau during the warmer months. Most crucially, we enjoyed very much the few days we spent there in a remote farm with no Internet, great company, long trail runs, and simple home-made dinners. (Foodwise, the difference of food prices on the local markets like Saint-Chély d’Apcher when compared with Paris and its suburb was noticeable, if not a major surprise, meaning we brought back home a month worth of local cheese.)

Watched Chicken Run #2 with my kids, which I found heavy handed and predictable, even on a 25 December afternoon, if admirable stop motion animation by the Bristol based Aardman studios, Rebel Moon by myself, just a terrible mix of existing space operas, with frankly embarrassing moments (like the disguised horses, the Warhammer-ish fights, and the final scene when the band is carelessly crushing through a wheat field)  and Blue Eye Samurai with the whole family. The latter is a French-American anime set in Japan, around the Great Furisode Fire of 1657 in Edo and the expulsion of foreigners from Japan by the Tokugawa shogunate. Graphically beautiful, Great except for the dialogues being in English, the cubist way horses are drawn and for some historical inaccuracy.

pure birth process

Posted in Statistics with tags , , , , , , on April 18, 2020 by xi'an

The Riddler has a rather simplistic riddle this week since it essentially asked for the expectation of a pure birth process (also known as the Yule process) at time t. Since the population size at time t has a geometric distribution with expectation

eλt.

It however took me a while to recover this result on my own on Easter afternoon, as I went for the integrals rather than the distribution itself and the associated differential equations. Interestingly (in a local sense!), I first following the wrong path of looking at the average time to the first birth, 1/λ, then to the second, 2/λ, and so on. Wrong since of course expectations do not carry this way… For a unit rate,  λ=1, the average time to reach 10 births is about 3, while the average number of births over t=3 is essentially 20.

a Simpson paradox of sorts

Posted in Books, Kids, pictures, R with tags , , , , , , , , , on May 6, 2016 by xi'an

The riddle from The Riddler this week is about finding an undirected graph with N nodes and no isolated node such that the number of nodes with more connections than the average of their neighbours is maximal. A representation of a connected graph is through a matrix X of zeros and ones, on which one can spot the nodes satisfying the above condition as the positive entries of the vector (X1)^2-(X^21), if 1 denotes the vector of ones. I thus wrote an R code aiming at optimising this target

targe <- function(F){
  sum(F%*%F%*%rep(1,N)/(F%*%rep(1,N))^2<1)}

by mere simulated annealing:

rate <- function(N){ 
# generate matrix F
# 1. no single 
F=matrix(0,N,N) 
F[sample(2:N,1),1]=1 
F[1,]=F[,1] 
for (i in 2:(N-1)){ 
if (sum(F[,i])==0) 
F[sample((i+1):N,1),i]=1 
F[i,]=F[,i]} 
if (sum(F[,N])==0) 
F[sample(1:(N-1),1),N]=1 
F[N,]=F[,N] 
# 2. more connections 
F[lower.tri(F)]=F[lower.tri(F)]+
  sample(0:1,N*(N-1)/2,rep=TRUE,prob=c(N,1)) 
F[F>1]=1
F[upper.tri(F)]=t(F)[upper.tri(t(F))]
#simulated annealing
T=1e4
temp=N
targo=targe(F)
for (t in 1:T){
  #1. local proposal
  nod=sample(1:N,2)
  prop=F
  prop[nod[1],nod[2]]=prop[nod[2],nod[1]]=
     1-prop[nod[1],nod[2]]
  while (min(prop%*%rep(1,N))==0){
    nod=sample(1:N,2)
    prop=F
    prop[nod[1],nod[2]]=prop[nod[2],nod[1]]=
     1-prop[nod[1],nod[2]]}
  target=targe(prop)
  if (log(runif(1))*temp<target-targo){ 
    F=prop;targo=target} 
#2. global proposal 
  prop=F prop[lower.tri(prop)]=F[lower.tri(prop)]+
   sample(c(0,1),N*(N-1)/2,rep=TRUE,prob=c(N,1)) 
prop[prop>1]=1
  prop[upper.tri(prop)]=t(prop)[upper.tri(t(prop))]
  target=targe(prop)
  if (log(runif(1))*temp<target-targo){
      F=prop;targo=target}
   temp=temp*.999
   }
return(F)}

Eward SimpsonThis code returns quite consistently (modulo the simulated annealing uncertainty, which grows with N) the answer N-2 as the number of entries above average! Which is rather surprising in a Simpson-like manner since all entries but two are above average. (Incidentally, I found out that Edward Simpson recently wrote a paper in Significance about the Simpson-Yule paradox and him being a member of the Bletchley Park Enigma team. I must have missed out the connection with the Simpson paradox when reading the paper in the first place…)

musical break

Posted in Books, Kids with tags , , , , , on January 4, 2015 by xi'an

During the Yule break, I listened mostly two CDs, the 2013  If you wait, by London Grammar, and The shape of a broken heart, by Imany. Both were unexpected discoveries, brought to me by family members, but I enjoyed those tremendously!

merry Yule!

Posted in Kids, pictures, Travel with tags , , , , , , , on December 21, 2014 by xi'an

alt