Articles by xi'an

grasshoppers for pythons

May 17, 2023 | xi'an

Following my earlier post on the terrible performances of ChatGPT for a grasshopping riddle, Bob Carpenter sent me his interaction with GPT4, using the same entry. Here is the python code outcome he obtained. The code is running  and the answer is correct. BC: Thanks. Can you write a python ...
[Read more...]

operation precisely impossible

May 12, 2023 | xi'an

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 ...
[Read more...]

operation impossible

April 29, 2023 | xi'an

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 ...
[Read more...]

powering a probability [a Bernoulli factory tale]

April 20, 2023 | xi'an

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 ...
[Read more...]

partial rankings and aggregate ranks

March 21, 2023 | xi'an

When interviewing impressive applicants from a stunning variety of places and background for fellows in our Data Science for Social Good program (in Warwick and Kaiserslautern) this summer, we came through the common conundrum of comparing ranks while each of us only meeting a subset of the candidates. Over a ...
[Read more...]

JAGS Workshop [10-14 July 2023]

March 20, 2023 | xi'an

Hey, JAGS users and would-be users, be warned that registration is now open for the annual JAGS workshop on probabilistic modelling for cognitive science. The tenth instalment of this workshop takes place July 10–14, 2023 in Amsterdam and online. This workshop is meant for researchers who want to learn how to apply ...
[Read more...]

alone in Napoli

March 12, 2023 | xi'an

A combinatorics puzzle from The Riddler about a Napoli solitaire where 4 x 10 cards numbered from 1 to 10 are shuffled and the game is lost when a number (1,2, or 3) is equal to its position modulo 3 (1,2 or 3). A simple R code shows that the probability of winning is around […]
[Read more...]

The Effect [book review]

March 9, 2023 | xi'an

While it sounds like the title of a science-fiction catastrophe novel or of a (of course) convoluted nouveau roman, this book by Nick Huntington-Klein is a massive initiation to econometrics and causality. As explained by the subtitle, An Introduction to Research Design and Causality. This is a hüûüge book, ...
[Read more...]

Diophantine riddle

February 26, 2023 | xi'an

The weekly riddle from The Riddler is to find solutions to the Diophantine equation c³-c=b²+4 (when b and c are positive integers). First, forget about ChatGPT since it states this is a Pell equation. With a wrong argument. Second, when running a basic R code, using as.double ...
[Read more...]

latest math stats exam

January 27, 2023 | xi'an

As I finished grading our undergrad math stats exam (in Paris Dauphine) over the weekend, which was very straightforward this year, the more because most questions had already been asked on weekly quizzes or during practicals, some answers stroke me as atypical (but ChatGPT is not to blame!). For instance, ...
[Read more...]

Tribonacci sequence

January 2, 2023 | xi'an

A simplistic puzzle from The Riddler when applying brute force: A Tribonacci sequence is based on three entry integers a ≤ b ≤ c, and subsequent terms are the sum of the previous three. Among Tribonacci sequences containing 2023, which one achieves th... [Read more...]

optimal leap year

November 18, 2022 | xi'an

A riddle about leap years: a solar year consists of approximately 365.24217 mean solar days, which is why there is a leap year approximately every four years. Approximately because the Gregorian calendar plans 97 and not 100 leap years over 400 years. Is this the optimal solution? No, since the Gregorian difference is 3.3 10⁻⁴ […]
[Read more...]

another drawer of socks

November 5, 2022 | xi'an

A socks riddle from the Riddler but with no clear ABC connection! Twenty-eight socks from fourteen pairs of socks are taken from a drawer, one by one, and laid on a surface that only fit nine socks at a time, with complete pairs removed. What is the probability that all ...
[Read more...]

why is this algorithm simulating a Normal variate?

September 14, 2022 | xi'an

A backward question from X validated as to why the above is a valid Normal generator based on exponential generations. Which can be found in most textbooks (if not ours). And in The Bible, albeit as an exercise. The validation proceeds from the (standard) Exponential density dominating the (standard) Normal ...
[Read more...]

fast track & slow lane

September 2, 2022 | xi'an

A riddle from the Riddler where N cars going at random (iid) speeds drive a road with a slow and a fast lane, each car choosing the fast lane iff any of the cars ahead in the slow lane is slowerthan them. With the question of the average number of ...
[Read more...]

optimal Gaussian zorbing

August 29, 2022 | xi'an

A zorbing puzzle from the Riddler: cover the plane with four non-intersecting disks of radius one towards getting the highest probability (under the standard bivariate Normal distribution). As I could not see a simple connection between the disks and the standard Normal, beyond the probability of a disk being given ...
[Read more...]

the Kelly criterion and then some

August 25, 2022 | xi'an

The Kelly criterion is a way to optimise an unlimited sequence of bets under the following circumstances: a probability p of winning each bet, a loss of a fraction a of the sum bet, a gain of a fraction b of the sum bet, and a fraction f of the ...
[Read more...]
1 2 3 4 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)