Let G be a finite group. Efficient generation of nearly uniformly distributed random elements in G, starting from a given set of generators of G, is a central problem in computational group theory. In this paper we demonstrate a weakness in the popular “product replacement algorithm,” widely used for this purpose. The main results are the following. Let N k(G) be the set of generating k-tuples of elements of G. Consider the distribution of the first components of the k-tuples in N k(G) induced by the uniform distribution over N k(G) . We show that there exist infinite sequences of groups G such that this distribution is very far from uniform in two different senses: (1) its variation distance from uniform is >1− ϵ; and (2) there exists a short word (of length (loglog| G|) O( k) ) which separates the two distributions with probability 1− ϵ. The class of groups we analyze is direct powers of alternating groups. The methods used include statistical analysis of permutation groups, the theory of random walks, the AKS sorting network, and a randomized simulation of monotone Boolean operations by group operations, inspired by Barrington's work on bounded-width branching programs. The problem is motivated by the product replacement algorithm which was introduced in [Comm. Algebra 23 (1995) 4931–4948] and is widely used. Our results show that for certain groups the probability distribution obtained by the product replacement algorithm has a bias which can be detected by a short straight line program.