When forming groups I always pre-select the groups rather than use randon assignment. I start by determining the size group I want and figuring out what the group size will be. I then select someone who I know will be able to provide direction and motivation, a "leader" if you will, but I do not designate anyone in the group to be the "Team Captain" (those dynamics will play out naturally within the groups). I then assign other members in round robin fashion, attempting to balance the groups in terms of academic strength, interest, etc. I likewise make sure that the "problem children" in the class are also dispersed; those with poor attendance, low academic ability, etc. In this way I insure that no good students get punished grade wise by luck of the draw. It also avoids the absolute nightmare that a statistical outlier group of all the best or worst student being in one group would create. In short, I'm looking for groups that can compete on fairly even footing with each other academically as groups, not as individuals. This, in my experience, is much more effective than random assignment, and I've never in 22 years of teaching had anyone question or challenge these assignments in any way.