Software to optimize mice randomization for in vivo experiments.

Start Randomization


Randmice is an online tool to optimize mice randmization in order to:

It works by testing randomly all the combinations of mice within the different groups, and returns the combination that provides the lowest difference in tumor volume between groups. By default, it uses the difference in mean for each group (tumor volume 1 + tumor volume 2, if 2 tumors on the mice) as the key parameter to minimize.

Manual randomization is not perfect

Mice randomization becomes even more critical for small samples (mice per group < 8) as picking mice randomly induces a high discrepancy (difference between the maximum tumor volume mean and minimum between all groups) (Bertsimas et al. 2015). So, optimizing randomization is important to avoid any bias in tumor volume.

Discrepancy with group size.
Discrepancy increases when group size is smaller.

The problem becomes even more complicated when we have 2 tumors on each mice as each tumor has its own growing speed and there is a significant variability between groups. One solution is to use high number of mice per group (> 20) but this is most of the time not possible due to cost or ethical issues. Also, if we decide to optimize randomization based on tumor 1, we cannot control the randomization on tumor 2, which can induce a bias if tumor volumes are too different.

Figure of the example.
Example of manual vs computational optimization of mice randomization.

This example shows that with the manual optimization the discrepancy in tumor volume was 2 mm3 for tumor 1 but 24 mm3 for tumor 2. With the algorithm, we can achieve a much better optimization with 1.1 mm3 for tumor 1 and 0.7 mm3 for tumor 2, almost 97% of improvement !

Reduce number of mice

The Three Rs rule (Reduce, Refine, Replace) is a guide for more ethical use of animals testing. It is incorporated in the European regulation (n°2010/63/UE). Randmice can help to reduce the number of animals per experiment by keeping or even improve tumor volume distribution between the different groups.

Figure to show that we can reduce number of mice per experiment.
Example of reducing number of mice for an in vivo experiment.

This example shows that Randmice reduces the number of mice from 8 mice/group to 6 mice/group while at the same time it keeps the same tumor volume differences and an acceptable standard deviation between all groups. It is even improved compared to manual randomization. This saves 2 mice per group ! At 5 mice/group we start to loose accuracy in standard deviation. Randmice can be used to find the optimal number of mice to use, specifically for your experience, save mice for additional experiments, and comply with ethical rules.

A lots of combinations

Optimizing randomization is not a trivial problem due to high number of combinations...
Let's say we have n mice that we want to spread into k groups. Number of combinations is:

C(n,k) = n! / ( k! * ( ( n / k )! )^k )

The number of combinations exponentially increases with n and k which turns the problem to be difficult to solve as we cannot test all the combinations. Some examples:

The idea is to test a relative large number (10e9) of combinations, and to find the best randomization that we take as acceptable. Even if we did not try all the possible combinations, several trials on large mice experients show a better mice randomization than with manual methods.


This is a big data problem that can be speeded-up by using parallelism computing. To reduce the overall calculation time to ~10min, we use a computing server with 72 CPUs. And this costs a lot ! So, we ask for a small financial contributions for maintaining the code and our servers.

Number of randomization Number of iterations Approx. computation time Quality of the results Price
1 randomization 10e9 ~10 min Good 50 € excl. VAT
1 randomization 2*10e9 ~30 min Very Good 100 € excl. VAT
1 randomization 10e10 >2 hours Excellent 300 € excl. VAT

If you need to have a very high frequency of use (> 100/months), let's talk we can define a global pricing.

Run Randomization