The Bayes sequential design is obtained for an optimization problem involving the choice of experiments. Given are experiments $A, B$, densities $p_1, p_2$, a positive integer $N$ and a number $\xi \varepsilon \lbrack 0, 1\rbrack$. A sequence of $N$ observations is to be made such that at each stage either $A$ or $B$ is observed, the loss being 1 if the experiment with density $p_2$ is chosen, 0 otherwise. $\xi$ is the prior probability that $A$ has density $p_1$. If the mean of $p_1$ is bigger than the mean of $p_2$ one obtains a more common version of the "two-armed bandit" (see e.g. [1]). The principal result of this paper is a proof of optimality for the procedure which at each stage chooses the experiment with higher posterior probability of being correct. Some attention is also given to the problem of computing risk functions.