## one more time around the block [UTMB 22]

Posted in Mountains, Running, Travel with tags , , , , , , , , , , , on August 22, 2022 by xi'an

## Goats do room

Posted in Books, Kids, R, Statistics, Wines with tags , , , , , , , , , , , , on July 16, 2022 by xi'an

The riddle of the week is about 10 goats sequentially moving to their room, which they have chosen at random and independently (among ten rooms), unless another goat already occupies the room, in which case they move to the first free room with a higher number or fail. What is the probability that all goats end up in a room?

Coding the experiment is straightforward:

```g=sample(1:N,N,rep=TRUE)
o=0*g
for(i in 1:N){
if(min(o[g[i]:N])){f=f+1;break()
}else{
o[min(which(!o[g[i]:N]))+g[i]-1]=1
}}}
```

returning an estimated probability of approximately 0.764.

As I had some free time during the early mornings at ISBA 2022, I tried to reformulate the question as a continuous event on uniform order statistics, turning to be at most one uniform larger than (N-1)/N, at most two larger than (N-2)/N, and so on… Asking the question on math.stackexchange quickly produced an answer that reversed engineered my formulation back to the goats (or parking lot), with a generic probability of

$\dfrac{(N+1)^{N-1}}{N^N}$

which of course coincides with the Monte Carlo approximation!

As an aside, I once drank South-African wines named Goats-do-Roam and Goat-Roti at my friends Jim and Maria’s place,  and they were quite enjoyable!

## Mont Blanc [jatp]

Posted in Mountains, pictures, Running, Travel with tags , , , , , , , , , , on March 23, 2022 by xi'an

## sunset boulevard [jatp]

Posted in Statistics with tags , , , , , , , , , , on February 10, 2022 by xi'an

## sixteen ways to defend a walled city [book review]

Posted in Statistics with tags , , , , , , , , , on September 2, 2020 by xi'an

The title of this book, sixteen ways to defend a walled city,  enticed me to order it and after a slow beginning I became hooked to the story. I had forgotten I had read and enjoyed a book by K.J. Parker before, namely Devices and Desires, which was quite pleasant as far as I remember! (Not to be confused with another book under the same title by P.D. James.) The concept is somewhat similar, with the same universe if eons laters: boosted medieval warfare seen from an engineer’s perspective. (Devices and Desires started the Engineer Trilogy to make it clear to everyone!) Which makes for a pleasant change as devious ingenuity usually trumps frontal strength and there is at last attention paid to good, I mean in the sense of good delivery, resources, shortage, &tc.! The style is light and funny, the characters are somewhat too nice overall (until they die), but this makes for a tolerable kind of pastiche, most enjoyable to stand a heatwave! A second book just came out and I may be tempted to buy it, heatwave or not. Although the first one concluded in a rather definitive way, making a sequel unlikely… I may also complete the Engineer Trilogy.