Articles by xi'an

shelled and riddled

August 9, 2022 | xi'an

Consider a shell game with three shells and a ball where only the location of the shell with the ball is exchanged with the location of an empty shell, randomly chosen. If one starts with the ball as rightmost, what is the distribution of the location of the ball after ...
[Read more...]

Goats do room

July 15, 2022 | 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 ...
[Read more...]

simulating from the joint cdf

July 12, 2022 | xi'an

An X validated question (what else?!) brought back (to me) the question of handling a bivariate cdf for simulation purposes. In the specific case of a copula when thus marginals were (well-)known…. And led me to an erroneous chain of thought, fortunately rescued by Robin Ryder! When the marginal ...
[Read more...]

Bayes Rules! [book review]

July 4, 2022 | xi'an

Bayes Rules! is a new introductory textbook on Applied Bayesian Model(l)ing, written by Alicia Johnson (Macalester College), Miles Ott (Johnson & Johnson), and Mine Dogucu (University of California Irvine). Textbook sent to me by CRC Press for review. It is available (free) online as a website and has a ...
[Read more...]

Bayes in Riddler mode

June 5, 2022 | xi'an

A very classical (textbook) question on the Riddler on inferring the contents of an urn from an Hypergeometric experiment: You have an urn with an equal number N of red balls and white balls, but you have no information about what N might be. You draw n=19 balls at random, ...
[Read more...]

Bayesian sampling without tears

May 23, 2022 | xi'an

Following a question on Stack Overflow trying to replicate a figure from the paper written by Alan Gelfand and Adrian Smith (1990) for The American Statistician, Bayesian sampling without tears, which precedes their historical MCMC papers, I looked at the R code produced by the OP and could not spot an ...
[Read more...]

taking advantage of the constant

May 18, 2022 | xi'an

A question from X validated had enough appeal for me to procrastinate about it for ½ an hour: what difference does it make [for simulation purposes] that a target density is properly normalised? In the continuous case, I do not see much to exploit about this knowledge, apart from the value ...
[Read more...]

sum of Paretos

May 11, 2022 | xi'an

A rather curious question on X validated about the evolution of when $M$ increases. Actually, this expectation is asymptotically equivalent to or again where the average is made of Pareto (1,1), since one can invoke Slutsky many times. (And the above comparison of the integrated rv’s does not show a ...
[Read more...]

truncated mixtures

May 3, 2022 | xi'an

A question on X validated about EM steps for a truncated Normal mixture led me to ponder whether or not a more ambitious completion [more ambitious than the standard component allocation] was appropriate. Namely, if the mixture is truncated to the interval (a,b), with an observed sample x of ...
[Read more...]

null recurrent = zero utility?

April 27, 2022 | xi'an

The stability result that the ratio converges holds for a Harris π-null-recurrent Markov chain for all functions f,g in L¹(π) [Meyn & Tweedie, 1993, Theorem 17.3.2] is rather fascinating. However, it is unclear it can be useful in simulation environments, as for the integral priors we have been studying over the years ...
[Read more...]

riddle of the week

April 20, 2022 | xi'an

The Riddler of April 1 offered this simple question: start with the number 1 and then try to reach a target number through a series of steps. For each step, you can always choose to double the number you currently have. However, if the number happens to be one (1) more than an ... [Read more...]

extinction minus one

March 13, 2022 | xi'an

The riddle from The Riddler of 19 Feb. is about the Bernoulli Galton-Watson process, where each individual in the population has one or zero descendant with equal probabilities: Starting with a large population os size N, what is the probability that the size of the population on the brink of extinction ...
[Read more...]

spiral matrix [X-validated]

February 10, 2022 | xi'an

One recent code-golf challenge was to write the shortest possible code representing the first n² integers in a spiral progression, e.g., 0 1 2 3 4 15 16 17 18 5 14 23 24 19 6 13 22 21 20 7 12 11 10 9 8 While I did not come close to the best […] [Read more...]

blind monty hall

January 9, 2022 | xi'an

As I was waiting for my boat on a French Guiana beach last week, I thought back about a recent riddle from The Riddler where an item does a random walk over a sequence of N integers. Behind doors. The player opens a door at the same rate as the ...
[Read more...]

triple ruin

December 27, 2021 | xi'an

An almost straightforward riddle from The Riddler involving a triple gambler’s ruin: Dawn competes against three players Alessandra, Berenike, and Chinue, with probabilities of winning one round ¾, ½, and ¼, respectively, until the cumulated score reaches ±15, ±30, and ±45, for the first, second, and third games. What is Dawn’s optimal sequence of ... [Read more...]

dice and sticks

November 18, 2021 | xi'an

A quick weekend riddle from the Riddler about the probability of getting a sequence of increasing numbers from dice with an increasing number of faces, eg 4-, 6-, and 8-face dice. Which happens to be 1/4. By sheer calculation (à la Gauss) or simple enumération (à la R): __ for(i in 1:4)for(...
[Read more...]

Xing glass bridges [or not]

November 9, 2021 | xi'an

A riddle from the Riddler surfing on Squid Games. Evaluating the number of survivors (out of 16 players) able to X the glass bridge, when said bridge is made of 18 consecutive steps, each involving a choice between a tempered and a non-tempered glass square. Stepping on a non-tempered square means death, ...
[Read more...]

[maximin] geometric climbing

October 4, 2021 | xi'an

A puzzle from The Riddler this week returning to the ranking of climbing competitors in Tokyo. And asking for the maximin score, that is, the worst possible absolute score guaranteeing victory. In the case of eight competitors, a random search for a maximin over 10⁶ draws leads to a value of 48=1...
[Read more...]

1 / duh?!

September 27, 2021 | xi'an

An interesting case on X validated of someone puzzled by the simulation (and variance) of the random variable 1/X when being able to simulate X. And being surprised at the variance of the ratio being way larger than the variances of both numerator and ...
[Read more...]
1 2 3 4 5 47

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)