Articles by xi'an

bean bag win

May 18, 2021 | xi'an

A quick riddle from The Riddler, where a multiple step game sees a probability of a 3 point increase of .4 and a probability of a 1 point increase of .3 with a first strategy (A), versus a probability of a 3 point increase of .4 and a probability of a 1 point increase of […]
[Read more...]

R rexp()

May 17, 2021 | xi'an

Following a question on X validated about the reasons for coding rexp() following Ahrens & Dieter (1972) version, I re-read Luc Devroye’s explanations. Which boils down to an optimised implementation of von Neumann’s Exponential generator. The central result is that, for any μ__0, M a Geometric variate with failure probability exp(... [Read more...]

unbalanced sampling

May 16, 2021 | xi'an

A question from X validated on sampling from an unknown density f when given both a sample from the density f restricted to a (known) interval A , f¹ say, and a sample from f restricted to the complement of A, f² say. Or at least on producing an estimate of ...
[Read more...]

warped Cauchys

May 3, 2021 | xi'an

A somewhat surprising request on X validated about the inverse cdf representation of a warped Cauchy distribution. I had not come across this distribution, but its density being means that it is the superposition of shifted Cauchys on the unit circle (with nice complex representations). As such, it is easily ...
[Read more...]

one-way random walks

May 1, 2021 | xi'an

A rather puzzling riddle from The Riddler on an 3×3 directed grid and the probability to get from the North-West to the South-East nodes following the arrows. Puzzling because while the solution could be reasonably computed with an R code like suc...
[Read more...]

ten computer codes that transformed science

April 22, 2021 | xi'an

In a “Feature” article of 21 January 2021, Nature goes over a poll on “software tools that have had a big impact on the world of science”. Among those, the Fortran compiler (1957), which is one of the first symbolic languages, developed by IBM. This is the first computer language I learned (in 1982) ...
[Read more...]

simulating Maxwell distribution

April 21, 2021 | xi'an

A question that came out on X validated a few days ago is how to efficiently simulate from a distribution with density x²φ(x). (Obviously properly normalised since the second moment of the standard Normal  distribution is one.) The first solution that came out (by Jarle Tufto) exploits the fact ...
[Read more...]

ABC in Svalbard [the day after]

April 18, 2021 | xi'an

The following and very kind email was sent to me the day after the workshop thanks once again to make the conference possible. It was full of interesting studies within a friendly environment, I really enjoyed it. I think it is not easy to make a comfortable and inspiring conference ...
[Read more...]

the new DIYABC-RF

April 14, 2021 | xi'an

My friends and co-authors from Montpellier have released last month the third version of the DIYABC software, DIYABC-RF, which includes and promotes the use of random forests for parameter inference and model selection, in connection with Louis Raynal’s thesis. Intended as the earlier versions of DIYABC for population genetic ...
[Read more...]

ABC in Svalbard [#2]

April 13, 2021 | xi'an

The second day of the ABC wwworkshop got a better start than yesterday [for me] as I managed to bike to Dauphine early enough to watch the end of Gael’s talk and Matias Quiroz’ in full on the Australian side (of zoom). With an interesting take on using frequency-domain (...
[Read more...]

ABC in Svalbard [#1]

April 12, 2021 | xi'an

It started a bit awkwardly for me as I ran late, having accidentally switched to UK time the previous evening (despite a record-breaking biking-time to the University!), then the welcome desk could not find the key to the webinar room and I ended up following the first session from my ...
[Read more...]

plusquamperfect squares

April 1, 2021 | xi'an

A perfect riddle: For some perfect squares, when you remove the last digit, you get another perfect square. The first five perfect squares are 16, 49, 169, 256 and 361. What are the next three ones? Is there a more than perfect square other than 169 such that removing the last two digits returns a […] [Read more...]

composition versus inversion

March 30, 2021 | xi'an

While trying to convey to an OP on X validated why the inversion method was not always the panacea in pseudo-random generation, I took the example of a mixture of K exponential distributions when K is very large, in order to impress (?) upon said OP that solving F(x)=u ...
[Read more...]

handbook of mixture analysis [review]

March 18, 2021 | xi'an

“In my opinion, the editors have done an excellent job when selecting the contents of the handbook and putting the different chapters together. For instance, this can be appreciated by the fact that, despite the large number of authors and contributions, all chapters have kept the same notation. Furthermore, in ... [Read more...]

meandering

March 11, 2021 | xi'an

A bit of a misunderstanding from Randall Munroe and then some: the function F returns a triplet, hence G should return a triplet as well. Even if the limit does return three identical values. And he should have also included the (infamous) harmonic mean! And the subtext (behind the picture) ...
[Read more...]

stack overload

March 2, 2021 | xi'an

The Riddle this week is rather straightforward to explain: stacking identical objects (bars of length and mass two, say) on top of one another so that the center of each new bar is uniformly distributed along the previous bar, what is the distribution of the number of bars when the ...
[Read more...]

more, please!

February 25, 2021 | xi'an

As The Riddler proposed for several weeks a CrossProduct™ puzzle when 3 x n one-digit integers have to be deduced from their rowwise and columnwise products, I attempted at writing an R solver by applying a few basic rules repeatedly, which worked for the first two puzzles, if not for the ...
[Read more...]

folded Normals

February 24, 2021 | 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 ...
[Read more...]

love thy command line [Bourne again]

February 14, 2021 | xi'an

“Prebuilt into macOS and Unix systems (…) the command line (also called the shell) is a powerful text-based interface in which users issue terse instructions to create, find, sort and manipulate files, all without using the mouse. There are actually several distinct (…) shell systems, among the most popular of which [sic?] ...
[Read more...]
1 2 3 44

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)