Scientific studies involving statistics have to have a minimum of % of the whole population in order to be relevant, there is actually a formula for calculating. First-year college statistical courses cover this, and any scientific study goes to painstaking methods to eliminate variables that can skew the study, and yes it is random, typically double-blinded eliminating clinical bias. But part of the study is showing their methodology of operation, which is always up for scrutiny.
But all of what you question is learned really early its common practice to eliminate as many of these variables that can skew the results.
2000 STD Prevention Conference - African Americans Disproportionately Affected by STDs
www.cdc.gov
en.wikipedia.org