  It is often claimed that Bayesian methods, in particular Bayes factor methods
for hypothesis testing, can deal with optional stopping. We first give an
overview, using elementary probability theory, of three different mathematical
meanings that various authors give to this claim: (1) stopping rule
independence, (2) posterior calibration and (3) (semi-) frequentist robustness
to optional stopping. We then prove theorems to the effect that these claims do
indeed hold in a general measure-theoretic setting. For claims of type (2) and
(3), such results are new. By allowing for non-integrable measures based on
improper priors, we obtain particularly strong results for the practically
important case of models with nuisance parameters satisfying a group invariance
(such as location or scale). We also discuss the practical relevance of
(1)--(3), and conclude that whether Bayes factor methods actually perform well
under optional stopping crucially depends on details of models, priors and the
goal of the analysis.
