Archive for swimming pool

where to save [no gas & no nuke]

Posted in Books, pictures, Statistics, Travel with tags , , , , , , , , , on October 18, 2022 by xi'an

Bruxelles ma belle

Posted in Books, Running, Travel with tags , , , , , , , , , on September 25, 2022 by xi'an

Tour de Paris [of pools]

Posted in Kids, pictures, Running, Travel with tags , , , , , , , on April 25, 2021 by xi'an

As I am prevented from running since the beginning of this year, due to a ligament injury caused by an excess of kilometers run since the beginning of the (first) lockdown, I have started swimming most days I can find a free window of time. And an open swimming pool! While Paris and most of the suburban cities near me have a decent offer of (cheap) public pools, it is often a challenge to find one open at a manageable time. Meaning for me mostly in the early morning. The lockdown has obviously reduced opening hours and introduced restricted access, requiring a medical certificate for indoor pools, and I have thus being recently visiting a rather extensive array of pools to fit such constraints, since both nearby pools, at home and at work, are rarely available. Last week, I biked to the most exotic so far, namely a pool made from a barge standing on the Seine River. It is alas not yet outdoor, but not yet crowded either (if small and rather hot). By comparison, the nearer and wider pool at Porte d’Orléans is surprisingly crowded at 7am (but pleasantly colder) and the historical pool on Butte aux Cailles also gets quickly crowded and is missing its outdoor pool (but is close to a fantastic bakery!). Even careful scheduling does not always work as I sometimes find an unexpected closed door, as two weeks ago when Butte aux Cailles had emptied overnight or a few days ago when Joséphine Baker had a disfunctioning pediluvium enough to bar entry. (The outdoor 50m pool in Villejuif I used to go to has just reopened to the general public and is not yet overcrowded, despite milder temperatures.)

folded Normals

Posted in Books, Kids, pictures, R, Running, Statistics with tags , , , , , , , , , , , , on February 25, 2021 by xi'an

While having breakfast (after an early morn swim at the vintage La Butte aux Cailles pool, which let me in free!), I noticed a letter to the Editor in the Annals of Applied Statistics, which I was unaware existed. (The concept, not this specific letter!) The point of the letter was to indicate that finding the MLE for the mean and variance of a folded normal distribution was feasible without resorting to the EM algorithm. Since the folded normal distribution is a special case of mixture (with fixed weights), using EM is indeed quite natural, but the author, Iain MacDonald, remarked that an optimiser such as R nlm() could be called instead. The few lines of relevant R code were even included. While this is a correct if minor remark, I am a wee bit surprised at seeing it included in the journal, the more because the authors of the original paper using the EM approach were given the opportunity to respond, noticing EM is much faster than nlm in the cases they tested, and Iain MacDonald had a further rejoinder! The more because the Wikipedia page mentioned the use of optimisers much earlier (and pointed out at the R package Rfast as producing MLEs for the distribution).

Riddle of the lanes

Posted in Books, Kids, R with tags , , , , , on July 13, 2020 by xi'an

An express riddle from the Riddler about reopening pools, where lanes are allowed provided there is no swimmer in the lane or in any of the adjacent lanes. If swimmers pick their lane at random (while they can), what is the average number of occupied lanes?

If there are n lanes and E(n) is the expected number of swimmers, E(n) satisfies a recurrence relation determined by the location of the first swimmer:

E(n)=1+\frac{1}{n}[2E(n-2)+\sum_{i=2}^{n-1}\{E(i-2)+E(n-i-1)\}]

with E(0)=0, E(1)=E(2)=1. The above can be checked with a quick R experiment:

en=0
for(t in 1:T){
   la=rep(u<-0,N)
   while(sum(la)<N){
     i=sample(rep((1:N)[!la],2),1)
     la[max(1,i-1):min(N,i+1)]=1
     u=u+1}
   en=en+u}
%d bloggers like this: