Articles by xi'an

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...]

new order

February 4, 2021 | xi'an

The latest riddle from The Riddler was both straightforward: given four iid Normal variates, X¹,X²,X³,X⁴, what is the probability that X¹+X²
[Read more...]

hard birthday problem

February 3, 2021 | xi'an

Click to access birthday.pdf From an X validated question, found that WordPress now allows for direct link to pdf documents, like the above paper by my old friend Anirban Das Gupta! The question is about estimating a number M of individuals with N distinct birth dates over a year ...
[Read more...]

easy and uneasy riddles

February 1, 2021 | xi'an

On 15 January, The Riddler had both a straightforward and a challenging riddles. The first one was to optimise the choice of a real number d with the utility function U(d,θ)=d ℑ(θ__d), when θ is Uniform(0,100). Leading unsurprisingly to d=50… The tough(er) one was to solve a form of ... [Read more...]

wrong algebra for slice sampler

January 26, 2021 | xi'an

Once more, and thrice alas!, I became aware of a typo in our “Use R!” book through a question on X validated from a reader unable to reproduce the slice of a basic 2D slice sampler for a logistic regression with coefficients (a,b). Indeed, our slice reads as the ...
[Read more...]

Kempner Fi

January 18, 2021 | xi'an

A short code-golf challenge led me to learn about the Kempner series, which is the series made of the inverted integers, excluding all those containing the digit 9. Most surprisingly this exclusion is enough to see the series converging (close to 23). The explanation for this convergence is that, citing Wikipedia, “The ...
[Read more...]

puzzles & riddles

January 2, 2021 | xi'an

A rather simplistic game on the Riddler of 18 December: …two players, each of whom starts with a whole number of points. Players take turns “attacking” each other, which involves subtracting their own number of points from their opponent’s until one of the players is out of points. Easy to ...
[Read more...]

how many Friday 13th?

December 17, 2020 | xi'an

A short Riddler’s riddle on the maximum number of Fridays 13th over a calendar year, of which I found 9 by a dumb exploration : bi=c(1:31,1:29,1:31,1:30,1:31,1:30,1:31,1:31,1:30,1:31,1:30,1:31) oy=bi[-60] for(j in 0:(length(cy
[Read more...]

around the table

December 1, 2020 | xi'an

The Riddler has a variant on the classical (discrete) random walk around a circle where every state (but the starting point) has the same probability 1/(n-1) to be visited last. Surprising result that stems almost immediately from the property that, leaving from 0, state a is visited couterclockwise before state b__...
[Read more...]

Bernoulli factory in the Riddler

November 30, 2020 | xi'an

“Mathematician John von Neumann is credited with figuring out how to take a p biased coin and “simulate” a fair coin. Simply flip the coin twice. If it comes up heads both times or tails both times, then flip it twice again. Eventually, you’ll get two different flips — either ...
[Read more...]

the riddle(r) of the certain winner losing in the end

November 24, 2020 | xi'an

Considering a binary random walk, starting at zero, what is the probability of being almost sure of winning at some point only to lose at the end? This is the question set by the post-election Riddler, with almost sure meaning above 99% and the time horizon set to n=101 steps (it ...
[Read more...]

Le Monde puzzle [#1164]

November 15, 2020 | xi'an

The weekly puzzle from Le Monde is quite similar to older Diophantine episodes (I find myself impossible to point out): Give the maximum integer that cannot be written as 105x+30y+14z. Same question for 105x+70y+42z+30w. These are indeed Diophantine equations and the existence of a solution ...
[Read more...]

on arithmetic derivations of square roots

November 12, 2020 | xi'an

An intriguing question made a short-lived appearance on the CodeGolf section of Stack Exchange, before being removed, namely the (most concise possible) coding of an arithmetic derivation of the square root of an integer, S, with a 30 digit precision and using only arithmetic operators. I was not aware of the ...
[Read more...]
1 2 3 43

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)