Publications by xi'an

simulating signed mixtures

01.02.2024

While simulating from a mixture of standard densities is relatively straightforward, when the component densities are easily simulated, to the point that many simulation methods exploit an intermediary mixture construction to speed up the production of pseudo-random samples from more challenging distributions (see Devroye, 1986), things get surpris...

2435 sym 8 img

simulating Gumbel’s bivariate exponential distribution

13.01.2024

A challenge interesting enough for a sunny New Year morn, found on X validated, namely the simulation of a bivariate exponential distribution proposed by Gumbel in 1960, with density over the positive quadrant in IR² Although there exists a direct approach based on the fact that the marginals are Exponential distributions and the conditionals sig...

1459 sym 6 img

max spacing between mass shootings [data graphics]

10.01.2024

Related To leave a comment for the author, please follow the link and comment on their blog: R – Xi'an's Og. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job. Want to share your content on R-bloggers? click here if ...

396 sym 2 img

making the next meeting more productive

24.08.2023

One of the students’ requests I almost invariably reject is code debugging (and they are warned about it from the start). Here is an illustration why, with an R code sent by a student working this summer on the standard estimators of a Cauchy location parameter, asking for debugging help in order “to make the next meeting more productive”. Wh...

1066 sym R (580 sym/1 pcs)

uniform spacings

07.06.2023

A riddle on uniform spacings!, namely when considering eight iid Uniform (0,1) variates as visiting times and three further iid Uniform (0,1) variates as server availability times, with unit service time, the question being the probability a server is available for a ninth visiting time, T⁹. Which can be decomposed into four cases: at least one ...

1415 sym 2 img

Galton and Watson voluntarily skipping some generations

01.06.2023

A riddle on a form of a Galton-Watson process, starting from a single unit, where no one dies but rather, at each of 100 generations, Dog either opts for a Uniform number υ of additional units or increments a counter γ by this number υ, its goal being to optimise γ. The solution proposed by the Riddler does not establish his solution’s is the...

1105 sym R (149 sym/1 pcs) 2 img

operation precisely impossible

12.05.2023

Since the solution to the previous riddle from The Riddler on the maximum of  different terms in the composed operation a∅b∅c∅d∅e∅f depending on the bracketing ordering and the meaning of each ∅ among one of the six elementary operations got posted today as 974,860, I got back to my R code to understand why it differed from my figures ...

1384 sym 2 img

operation impossible

29.04.2023

A riddle from The Riddler on how many different numbers one could at most produce from six initial values and the four basic operations. In other words, how many values could the terms in a∅(b∅{c∅[d∅(e∅f)]}) could take? (With each ∅ being one of the four operations and a,…,f the initial values or a permutation of these.) A very crude ...

1284 sym 2 img

simulated annealing and logistic regression to the max

25.04.2023

A Riddler puzzle on the three binary and sequential questions one should ask three players hiding their respective U(0,1) realisation, U, V, and W, to best guess which player holds the largest number, max{U,V,W}. Assuming questions of the type Is U, &tc., the challenge boils down to selecting seven bounds (one for U, two for V, and four for W) in o...

1870 sym R (130 sym/2 pcs) 2 img

powering a probability [a Bernoulli factory tale]

20.04.2023

Starting from an X validated question on finding an unbiased estimator of an integral raised to a non-integer power, I came across a somewhat interesting Bernoulli factory solution! Thanks to Peter Occil’s encyclopedic record of cases, pointing out to Mendo’s (2019) solution for functions of ρ that can be expressed as power series. Like ργ s...

809 sym R (211 sym/1 pcs) 4 img