# Blog Archives

## reversible chain[saw] massacre

May 15, 2016
By

A paper in Nature this week that uses reversible-jump MCMC, phylogenetic trees, and Bayes factors. And that looks at institutionalised or ritual murders in Austronesian cultures. How better can it get?! “by applying Bayesian phylogenetic methods (…) we find strong support for models in which human sacrifice stabilizes social stratification once stratification has arisen, and

## AISTATS 2016 [#1]

May 10, 2016
By

Travelling through Seville, I arrived in Càdiz on Sunday night, along with a massive depression . Walking through the city from the station was nonetheless pleasant as this is an town full of small streets and nice houses. If with less churches than Seville! Richard Samworth gave the first plenary talk of AISTATS 2016  with

## a Simpson paradox of sorts

May 5, 2016
By

The riddle from The Riddler this week is about finding an undirected graph with N nodes and no isolated node such that the number of nodes with more connections than the average of their neighbours is maximal. A representation of a connected graph is through a matrix X of zeros and ones, on which one

## gap frequencies [& e]

April 28, 2016
By

A riddle from The Riddler where brute-force simulation does not pay: For a given integer N, pick at random without replacement integers between 1 and N by prohibiting consecutive integers until all possible entries are exhausted. What is the frequency of selected integers as N grows to infinity? A simple implementation of the random experiment

## Le Monde puzzle [#960]

April 27, 2016
By

An arithmetic Le Monde mathematical puzzle: Given an integer k>1, consider the sequence defined by F(1)=1+1 mod k, F²(1)=F(1)+2 mod k, F³(1)=F²(1)+3 mod k, &tc. For which value of k is the sequence the entire {0,1,…,k-1} set? This leads to an easy brute force resolution, for

## an integer programming riddle

April 20, 2016
By

A puzzle on The Riddler this week that ends up as a standard integer programming problem. Removing the little story around the question, it boils down to optimise 200a+100b+50c+25d under the constraints 400a+400b+150c+50d≤1000, b≤a, a≤1, c≤8, d≤4, and (a,b,c,d) all non-negative integers. My first attempt was a brute force R code since there are only

## Le Monde puzzle [#959]

April 19, 2016
By

Another of those arithmetic Le Monde mathematical puzzle: Find an integer A such that A is the sum of the squares of its four smallest dividers (including1) and an integer B such that B is the sum of the third poser of its four smallest factors. Are there such integers for higher powers? This begs

## Le Monde puzzle [#958]

April 10, 2016
By

A knapsack Le Monde mathematical puzzle: Given n packages weighting each at most 5.8kg for a total weight of 300kg, is it always possible to allocate these packages  to 12 separate boxes weighting at most 30kg each? weighting at most 29kg each? This can be checked by brute force using the following R code and

## Statistical rethinking [book review]

April 5, 2016
By

Statistical Rethinking: A Bayesian Course with Examples in R and Stan is a new book by Richard McElreath that CRC Press sent me for review in CHANCE. While the book was already discussed on Andrew’s blog three months ago, and enthusiastically recommended by Rasmus Bååth on Amazon, here are the reasons why I

## Le Monde puzzle [#956]

April 4, 2016
By

A Le Monde mathematical puzzle with little need of R programming: Does there exist a function f from N to N such that (i) f is (strictly) increasing, (ii) f(n)≥n, and (iii) f²(n)=f(f(n))=3n? Indeed, the constraints imply (i) f²(0)=0, hence that that f(0)=0, (ii) f(1)=2 as it can be neither 1 (else f²(1) would be equal