Articles by xi'an

sampling the mean

December 11, 2019 | xi'an

A challenge found on the board of the coffee room at CEREMADE, Université Paris Dauphine: When sampling with replacement three numbers in {0,1,…,N}, what is the probability that their average is (at least) one of the three? With a (code-golfed!) brute force solution of mean(!apply((a
[Read more...]

Le Monde puzzle [#1119]

December 7, 2019 | xi'an

A digit puzzle as Le weekly Monde current mathematical puzzle that sounds close to some earlier versions: Perfect squares are pairs (a²,b²) with the same number of digits such that a²b² is itself a square. What is the pair providing a²b² less than 10⁶? Is there a solution ...
[Read more...]

riddle by attrition

December 1, 2019 | xi'an

The weekend riddle from The Riddler is rather straightforward [my wording and simplification]: Construct a decimal number X between 0 and 1 by drawing the first digit a¹ uniformly over {0,1,…,9}, the second digit a² uniformly over {0,1,…,9}, &tc., until 0 is attained. What is the expectation of this random variable X? Since each new […]
[Read more...]

Froebenius coin problem

November 28, 2019 | xi'an

A challenge from The Riddler last weekend came out as the classical Frobenius coin problem, namely to find the largest amount that cannot be obtained using only n coins of specified coprime denominations (i.e., with gcd equal to one). There is always such a largest value. For the units ...
[Read more...]

BayesComp 20 [schedule]

November 19, 2019 | xi'an

The schedule for the program is now available on the conference webpage of BayesComp 20, for the days of 7-10 Jan 2020. There are twelve invited sessions, including one j-ISBA session, and a further thirteen contributed sessions were selected by the scientific committee. And three tutorials on the first day. Looking forward ...
[Read more...]

Galton’s board all askew

November 19, 2019 | xi'an

Since Galton’s quincunx has fascinated me since the (early) days when I saw a model of it as a teenager in an industry museum near Birmingham, I jumped on the challenge to build an uneven nail version where the probabilities to end up in one of the boxes were ...
[Read more...]

Le Monde puzzle [#1115]

October 27, 2019 | xi'an

A two-person game as Le weekly Monde current mathematical puzzle: Two players Amaruq and Atiqtalik are in a game with n tokens where Amaruq chooses a number 1
[Read more...]

three birthdays and a numeral

October 17, 2019 | xi'an

The riddle of the week on The Riddler was to find the size n of an audience for at least a 50% chance of observing at least one triplet of people sharing a birthday, as is the case in the present U.S. Senate. The question is much harder to solve ...
[Read more...]

Le Monde puzzle [#1114]

October 15, 2019 | xi'an

Another very low-key arithmetic problem as Le Monde current mathematical puzzle: 32761 is 181² and the difference of two cubes, which ones? And 181=9²+10², the sum of two consecutive integers. Is this a general rule, i.e. the root z of a perfect square that is the difference of two cubes is always ...
[Read more...]

Le Monde puzzle [#1112]

October 2, 2019 | xi'an

Another low-key arithmetic problem as Le Monde current mathematical puzzle: Find the 16 integers x¹,x²,x³,x⁴,y¹,y²,y³,y⁴,z¹,z²,z³,z⁴,w¹,w²,w³,w⁴ such that the groups x¹,y¹,z¹,w¹, &tc., are made of distinct positive integers, the sum of the x’s ...
[Read more...]

poor statistics

September 23, 2019 | xi'an

I came over the weekend across this graph and the associated news that the county of Saint-Nazaire, on the southern border of Brittany, had a significantly higher rate of cancers than the Loire countries. The complete study written by Solenne Delacour, Anne Cowppli-Bony, amd Florence Molinié, is quite cautious about ...
[Read more...]

Le Monde puzzle [#1111]

September 17, 2019 | xi'an

Another low-key arithmetic problem as Le Monde current mathematical puzzle: Notice that there are 10 numbers less than, and prime with 11, 100 less than and prime with 101, 1000 less than, and prime with 1111? What is the smallest integer N such that the cardinal of the set of M
[Read more...]

Le Monde puzzle [#1110]

September 15, 2019 | xi'an

A low-key sorting problem as Le Monde current mathematical puzzle: If the numbers from 1 to 67 are randomly permuted and if the sorting algorithm consists in picking a number i with a position higher than its rank i and moving it at the correct i-th position, what is the maximal number ...
[Read more...]

Le Monde puzzle [#1109]

September 3, 2019 | xi'an

A digital problem as Le Monde current mathematical puzzle: Noble numbers are such that they only involve different digits and are multiple of all their digits. What is the largest noble number? Hmmmm…. Brute force? Since the maximal number of digits is 10, one may as well try: k=soz=9 for (...
[Read more...]

Gibbs sampling with incompatible conditionals

July 22, 2019 | xi'an

An interesting question (with no clear motivation) on X validated wondering why a Gibbs sampler produces NAs… Interesting because multi-layered: The attached R code indeed produces NAs because it calls the Negative Binomial Neg(x¹,p) random generator with a zero success parameter, x¹=0, which automatically returns NAs. This can ...
[Read more...]

a non-riddle

July 11, 2019 | xi'an

Unless I missed a point in the last riddle from the Riddler, there is very little to say about it: Given N ocre balls, N aquamarine balls, and two urns, what is the optimal way to allocate the balls to the urns towards drawing an ocre ball with no urn ... [Read more...]

CRAN does not validate R packages!

July 9, 2019 | xi'an

A friend called me the other day for advice on how to submit an R package to CRAN along with a proof his method was mathematically sound. I replied with some items of advice taken from my (limited) experience with submitting packages. And with the remark that CRAN would not ...
[Read more...]

Le Monde puzzle [#1105]

July 7, 2019 | xi'an

Another token game as Le Monde mathematical puzzle: Archibald and Beatrix play with a pile of n__100 tokens, sequentially picking m tokens from the pile with m being a prime number [including m=1] or a multiple of 6, the winner taking the last tokens. If Beatrix knows n and proposes to ...
[Read more...]

Le Monde puzzle [#1104]

June 17, 2019 | xi'an

A palindromic Le Monde mathematical puzzle: In a monetary system where all palindromic amounts between 1 and 10⁸ have a coin, find the numbers less than 10³ that cannot be paid with less than three coins. Find if 20,191,104 can be paid with two coins. Similarly, find if 11,042,019 can be paid with two or […]
[Read more...]

another attempt at code golf

June 11, 2019 | xi'an

I had another lazy weekend go at code golf, trying to code in the most condensed way the following task. Provided with a square matrix A of positive integers, keep iterating the steps take the highest square ????² in A. find the smallest adjacent neighbour ???? replace x² with x and n ...
[Read more...]
1 7 8 9 10 11 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)