# puzzle

### Code Optimization: One R Problem, Ten Solutions – Now Eleven!

November 2, 2011 |

Earlier this year I came across a rather interesting page about optimisation in R from rwiki. The goal was to find the most efficient code to produce strings which follow the pattern below given a single integer input n: From this we can see that the general pattern for n ... [Read more...]

### Asher’s enigma

July 25, 2010 |

On his Probability and statistics blog, Matt Asher put a funny question (with my rephrasing): Take a unit square. Now pick two spots at random along the perimeter, uniformly. For each of these two locations, pick another random point from one of the three other sides of the square and ... [Read more...]

### Le Monde rank test (corr’d)

April 6, 2010 |

Since my first representation of the rank statistic as paired was incorrect, here is the histogram produced by the simulation perm=sample(1:20) saple[t]=sum(abs(sort(perm[1:10])-sort(perm[11:20]))) when . It is obviously much closer to zero than previously. An interesting change is that the regression of the log-mean ... [Read more...]

### Le Monde rank test

April 4, 2010 |

In the puzzle found in Le Monde of this weekend, the mathematical object behind the silly story is defined as a pseudo-Spearman rank correlation test statistic, where the difference between the ranks of the paired random variables and is in absolute value instead of being squared as in the Spearman ... [Read more...]

### New Le Monde puzzle

March 3, 2010 |

When I first read Le Monde puzzle this weekend, I though it was even less exciting than the previous one: find and , such that is a multiple of . The solution is obtained by brute-force checking through an R program: and then the a next solution is (with several values for ... [Read more...]

# 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)