Toyota Research Institute explains statistical thinking for robot policy evaluation: from rigorous A/B testing to effective visualization
The Toyota Research Institute (TRI) published a tutorial article introducing a statistical A/B testing method based on success/failure labels for robot policy evaluation.
Source: Toyota Research Institute Robotics · medium.com
The TRI authors systematically explain statistical pitfalls and reusable tools in robot policy A/B testing, with runnable Python examples.
Source original · Original text in the source language.
Statistical Thinking for Robot Policy Evaluation: From Rigorous A/B Testing to Effective Visualization
By Haruki Nishimura + Masha Itkina

TL;DR
Robot policy evaluation is noisy, expensive, and easy to get wrong. This post introduces practical and statistically sound tools to robotics researchers and practitioners to make trustworthy policy comparisons.
We focus on A/B testing based on success/failure labels, a common scenario that appears in many academic papers and technical reports. We first review conventional batch testing and identify a subtle but common pitfall that can invalidate statistical assurances. We then introduce STEP, a novel sequential testing method that avoids this pitfall and retains sample efficiency while still guaranteeing strict error control — saving substantial on-robot human time.
For multi-policy comparison, we explain how to run corrected pairwise tests, effectively summarize results with Compact Letter Display (CLD), and visualize epistemic uncertainty using Bayesian beta-posterior violin plots, which avoid misleading interpretations from overlapping confidence intervals. These are the key ingredients for rigorous statistical analysis that we adopted in our recent Large Behavior Models (LBMs) paper.
We wrap up with a short comparison to the well-known Bradley–Terry ranking model (as seen in RoboArena, etc.) and offer practical tips for running fair, efficient, and reproducible robot experiments.
Throughout this article, we provide extensive yet lightweight Python examples you can use directly in your own experiments. The most plug-and-play notebook is attached here for your convenience, while the full notebook list is given at the end of this article.
1. Why Statistical Thinking Matters in Robot Policy Evaluation
The rapid progress of generalist robot policies is radically transforming how we think about robot learning. With advances in large-scale machine learning and generative modeling, we are beginning to see robots that can adapt to a wide variety of tasks and environments. Finally, robots are moving beyond narrow, task-specific behaviors towards flexible, general-purpose control.
However, evaluating their performance has become one of the hardest challenges in the field as these systems become more capable. Real-world testing, which is essential for understanding how these policies work in practice, is slow and expensive. Each policy rollout requires careful scene preparation and manual reset, often with randomized initial conditions. Testing in out-of-distribution conditions, such as adding clutter or changing lighting, adds more work and complexity.
Moreover, many modern robot policies are inherently stochastic. Due to the use of generative models, such as diffusion or flow-matching, their actions naturally vary across rollouts due to randomness. Even deterministic policies suffer stochasticity that arises from the environment dynamics, especially in contact-rich manipulation domains. Therefore, we must perform repeated policy rollouts to capture the full, stochastic performance profile.
A central question emerges: how do we know if our new policy is better than a baseline? This question arises very frequently in different scenarios. A researcher in an academic lab compares new methods against established baselines to demonstrate scientific progress. An engineer in industry evaluates several design choices side-by-side to decide which candidate to deploy or iterate on next.
In both cases, reliable policy comparison is the cornerstone of policy evaluation. It turns raw experimental outcomes into meaningful, defensible conclusions. Without a sound comparison, any empirical results can induce misleading claims of improvement. This need for rigor in A/B testing has been emphasized across several recent studies, including Bose and Kuang, 2021 and Kress-Gazit et al., 2024.
Here’s the key question:
Suppose you ran Policy A and Policy B 50 times each. Policy A succeeded 25 times, while Policy B succeeded 29 times. How confident are you that B is truly better than A?
Put differently:
How unlikely is it that pure randomness contributed to this apparent win of Policy B over Policy A?
This is a fundamental reproducibility question that is critical to make rigorous empirical statements about policy performance. If another researcher were to repeat your experiment under perfectly identical conditions (same robot, same initial condition distribution, same objects, same lighting, etc., which may be an impossible ideal), would they reach the same conclusion that Policy B outperforms Policy A?
To answer this question properly, we have to invoke statistical thinking.
At Toyota Research Institute (TRI), we recently released a research paper that puts statistical comparison at the core of robot policy evaluation, which greatly influenced our study of Large Behavior Models (LBMs). In this post, we will walk through the key ideas behind our approach (without heavy statistical jargon) and show how to implement these methods in lightweight Python examples for your own robot experiments.
We will begin with pairwise policy comparison, explaining how to rigorously test whether one policy outperforms another. Then, we will move on to multi-policy comparison, demonstrating how to analyze results across multiple contenders with clear and effective visualizations. Lastly, we briefly discuss how our statistical approach compares with other ranking methods, and summarize practical considerations for designing and executing objective policy evaluation.
2. A Basic Approach with Batch Testing
Let’s start with a simple, classic approach to comparing two robot policies: batch testing. Suppose you already know exactly how many rollouts you plan to run (e.g., 50 for each policy). In that case, Barnard’s exact test is a powerful tool for determining whether one policy performs significantly better (i.e., more successful) than the other.
In practice, Barnard’s test is conveniently implemented in SciPy, so you can perform it with just a few lines of Python code:
What does this code do under the hood? From the 50 rollouts per policy, the test observes empirical success rates of Policy A (25/50 = 0.5) and Policy B (29/50 = 0.58). These are merely noisy estimates of the (unknown) true success rates. The test will then infer the relative magnitude of the true quantities from small, finite noisy samples. This inference maintains a user-specified confidence level (95% in the example above). This means that the probability of false discovery — incorrectly concluding that Policy B is better than Policy A — is 5%. Put differently, if 1,000 researchers were to independently perform the exact same experiment under perfectly identical conditions, collecting their own results and using the same Python function for analysis, we would expect around 950 of them to reach the conclusion of “Policy B does not outperform Policy A” when that is indeed the truth. A statistical test essentially acts as a safety guardrail against drawing conclusions that are erroneous (yet possibly exciting) out of inherently noisy experiments.
In our running example (25 successes for A, 29 for B), the test fails to conclude that B is statistically more successful than A, as shown in the Colab notebook. Despite the small empirical difference in success counts, the signal-to-noise ratio is not high enough to make a definitive conclusion.
At this point, you might be tempted to keep collecting more rollouts, such as performing an additional 50 rollouts per policy, and rerunning the test on the entire data. Indeed, increasing the sample size generally improves the test’s statistical power, making it more likely to detect a real performance difference if one exists. As noted by Ramdas et al., 2023, this is a common pitfall that researchers often fall into when performing statistical analysis.
In fact, you must never do this incrementally with Barnard’s test. Running the test repeatedly as new data arrives until you “get a significant result” is known as data dredging (or p-hacking). This practice would inflate the false-positive rate, meaning that you could end up “discovering” nonexistent improvements more often than your intended error tolerance of 5%.
This brings us to a key limitation. Barnard’s test is a batch method: you must decide in advance how many rollouts you will collect, commit to that number and analyze the results only once after all the results become available.
Even worse, the number of necessary rollouts needed to detect a difference depends on the true performance gap between the two policies: the smaller the gap, the more rollouts you need. But this gap is unknown before running the experiment, making it difficult to choose an appropriate sample size in advance.


3. A Sequential Paradigm for Flexible Testing
The rigidity of batch testing motivates a new perspective: sequential testing methods. Unlike batch methods that require committing to a fixed number of rollouts before seeing any results, sequential testing allows us to collect rollouts incrementally and adaptively decide when to stop, all while maintaining rigorous statistical assurances.

This paradigm has been studied for decades (e.g., in Lai, 1988) and still is an active research topic in the statistical research community, as exemplified by papers such as Ramdas et al., 2023, and Turner and Grünwald, 2023.
TRI’s Trustworthy Learning under Uncertainty (TLU) team and Princeton University developed a novel sequential testing framework named STEP (Sequential Testing for Efficient Policy Comparison). STEP is designed primarily for robot policy comparison problems based on success/failure outcomes.
The full technical details are described in our paper presented at RSS 2025. The project website also visually illustrates how STEP works, along with strong empirical results. From a theoretical standpoint, STEP satisfies three essential statistical properties that make it both sound and efficient:
- Controlled False Positive Rate. STEP optimizes over the entire sequential decision process and ensures that the overall probability of false discovery meets a user-specified threshold (e.g., 5%).
- Sample Efficiency. STEP is designed to approximately minimize the number of rollouts required before reaching a conclusion, saving valuable on-robot human time.
- High Statistical Power. Whenever a true performance difference exists, STEP will detect it with high probability.
We verified these properties through extensive simulations and real-world robot experiments. In particular, STEP maintains a high statistical power even with relatively small sample sizes (20, 50, 100, etc.). This makes STEP an effective tool for robot policy evaluation where researchers often cannot afford large-scale experiments.
Despite its mathematical depth, STEP is simple to use in practice. The code is publicly available with a non-commercial license, allowing you to integrate sequential testing directly into your robot evaluation pipeline. An example Colab notebook is provided for your reference:
In the Colab example above, Policy A succeeded only 2 times out of the first 9 rollouts, while Policy B performed much better and succeeded 8 times. As a result, the test concluded that Policy B was better than Policy A in the middle of the evaluation session, even though it was originally planned for up to 20 rollouts each. In total, this saves 11 x 2 = 22 individual rollouts without compromising statistical rigor. In case the test did not detect the difference, you could have collected more results up to num_max_rollouts.
This is a flexibility that batch testing simply cannot offer.
You might wonder whether you need to carefully specify the maximum number of rollouts. Although the test does become slightly more conservative as you increase the maximum evaluation budget, STEP is remarkably robust to the choice of this parameter. In the example above, increasing num_max_rollouts by a factor of 5 would only yield 2 or 3 additional rollouts required before reaching a decision. Thanks to this small logarithmic growth, you may safely set the budget to your maximal practical hardware (or simulation) time limits — as long as you specify it before running the experiment, not after, to avoid data-dredging.
Comparing Multiple Policies at Once
So far, we have focused on comparing two policies at a time. But what if you want to evaluate three or more candidate policies (including different training settings, architectures, or baseline methods) simultaneously?
This is often the reality in robotics research, where we want to identify not just whether a new method outperforms a baseline, but how all candidates rank relative to each other, while still maintaining all possible statistical rigor.
Given k policies (and assuming k is not too large), we can perform pairwise comparisons between every possible pair, resulting in k(k — 1)/2 individual tests. For example, comparing 4 policies requires 6 pairwise tests.
However, there is an important caveat: the more comparisons you make, the higher the chance of a false discovery. Each additional test increases the probability of mistakenly finding an illusory difference.
To compensate for this, we set the error tolerance of individual tests by dividing the global tolerance (e.g., 5%) by the number of tests. This is known as the Bonferroni correction or union bounding, which ensures that the overall false-positive rate remains bounded (at the inevitable cost of reduced statistical power).
Once all pairwise tests are done, we face another challenge: how to present the results concisely and coherently.
Listing out all pairwise comparisons quickly becomes unreadable. Therefore, we use a visualization technique known as Compact Letter Display (CLD).
In CLD, each policy is assigned one or more letters, such as “a,” “ab,” or “bc.” Two policies that do NOT share any letter are statistically separated, while those that have at least one letter in common are not significantly different. This provides a compact, label-based summary of statistical relationships that can be directly annotated on visual plots.

A natural next question is how to represent statistical uncertainty in these plots.
Researchers often use confidence intervals on bar plots to visualize statistical uncertainty, but this can be misleading when combined with CLD labels. It is a common misconception that overlapping confidence intervals imply no significant difference. In fact, two intervals can overlap substantially while still being statistically separated via direct hypothesis testing (such as STEP). This point was clearly articulated by Greenland et al., 2016.

To avoid this visual confusion, our team at TRI adopted a different approach in the Large Behavior Models paper. Instead of confidence intervals, we visualize the posterior uncertainty of each policy’s success rate using violin plots derived from Bayesian analysis. Technical details behind this approach can be found in our paper, as well as standard statistics textbooks such as Bolstad and Curran, 2007 (Chapter 8).
Putting everything together, we obtain a visualization like this:

Each policy’s performance distribution is shown as a violin, annotated with bold CLD letters on top. This representation concisely communicates both relative rankings and statistical uncertainty, making it easy to interpret which policies are different. The code for this multi-policy comparison is available below for your own use, along with further examples showing how to appropriately aggregate results from multi-task evaluations.
5. Comparison to Probabilistic Ranking Methods
When it comes to pairwise comparison and ranking, readers familiar with Large Language Models (LLMs) might think of probabilistic ranking models such as the Bradley-Terry (BT) model. These models estimate a latent preference parameter for each candidate, which is typically fit via maximum likelihood. Popular LLM leaderboards such as LMArena adopt variants of this approach, and similar methods have recently been applied to robot policy comparison (e.g., RoboArena).
As a natural question, how does this differ from the statistical testing framework we have discussed so far, and when should you use one over the other?
Probabilistic ranking models become particularly useful when the number of policies k grows large (e.g., 10 or more), where the statistical approach would suffer excessive conservativeness by strictly controlling error rates across many pairwise comparisons. On the other hand, additional statistical analysis of probabilistic ranking results typically rely on asymptotic approximations: its validity only holds approximately when a large number of independent comparisons are available. This limitation may be acceptable if you have enough resources to collect a few hundred rollouts per policy, or are performing exploratory analysis where reproducibility is not the primary concern.
By contrast, the statistical testing approach described earlier offers strict, finite-sample error control, even with limited evaluation data or adaptive stopping. It is therefore well-suited for confirmatory analysis — ensuring that an apparent improvement is genuine and reproducible rather than a by-product of random variation. It is also worthwhile to note that most real-world robot evaluations fall into this small-sample regime (often 10–50 rollouts per policy), where each policy rollout is costly in time and labor. In this regime, careful statistical analysis — as illustrated in Figure 5 — can safeguard us from being misled by over-interpreting marginal improvements.
In summary:
- The probabilistic ranking approach is ideal when you have many policies, a large-scale evaluation budget, or seek exploratory insights where approximate statistical error control is acceptable.
- The statistical testing framework is preferred when you need strict error guarantees and high reproducibility, even with small, finite samples.
6. Conclusion and Practical Considerations
We hope this article has shed light on the importance of statistical thinking when evaluating robot policies. Of course, it is important to remember that every statistical method comes with a set of underlying assumptions, and the theoretical rigor holds only when those assumptions are reasonably met. A common one shared by many methods is that observed results are independent and identically distributed (i.i.d.), which rarely holds in real-world experiments but is nonetheless widely accepted in practice.
Nevertheless, thoughtful experimental design effectively mitigates unwanted bias and correlation, allowing us to approximate these assumptions closely enough for meaningful inference. For further discussion on experimental rigor and design of evaluation protocols, we encourage you to explore references such as Kress-Gazit et al. (2024), Gao et al. (2025), and the Large Behavior Models paper.
Summarized below are a few tips suggested by the authors of these papers:
- Define a detailed, unambiguous success criteria ahead of time.
- Execute all policies within a continuous session. Randomize and interleave the policy ordering in a manner that is blind to the evaluator, to maximize fairness for each policy. (E.g., if Policy A is evaluated all during daytime and Policy B during nighttime, their performance might differ due to environmental conditions).
- Use the same distribution of initial conditions when evaluating each policy to the best of the experimenter’s ability.
- Explicitly report full experimental conditions and evaluation details, such as the number of rollouts, environment setup, and success criteria.
- Complement success rate analysis with other metrics, such as task completion time, partial task progress, or failure analysis, to give a richer and more transparent picture of real-world performance.
- Evaluate policies along multiple axes of generalization, such as visual distraction robustness, instruction variations, etc.
Finally, keep in mind that a lack of statistical significance does not imply the absence of a true difference. A non-significant result may simply reflect limited data, high variability, or unmeasured confounding factors. As the tips above suggest, complementary analysis — such as the use of more fine-grained metrics like partial task progress — can still reveal valuable empirical evidence about where and why one policy might outperform another. Simply chasing after “statistically significant results” alone is a risky approach. Instead, focus on full transparency and scientific reasoning, no matter whether your CLD letters indicate significant differences or not.
In short, careful statistical evaluation is an essential ingredient for building trustworthy, reproducible, and scientifically grounded robot learning systems. We hope this perspective encourages broader adoption of rigorous evaluation practices and helps the community advance the frontiers of robotics together.
List of Colab Notebooks
- How to Compare Policies via Batch Statistical Testing
- How to Make Policy Comparison More Flexible with Sequential Testing
- Confidence Intervals with Hypothesis Testing: A Possible Source of Confusion?
- How to Compare Three or More Policies with Sequential Testing and Visualize Results
Statistical Thinking for Robot Policy Evaluation: From Rigorous A/B Testing to Effective… was originally published in Toyota Research Institute on Medium, where people are continuing the conversation by highlighting and responding to this story.