A word or two about random drug tests:
Marijuana detection is, to some extent, a function of an individual's metabolism. A urine test for an occasional user will usually detect use 3 or 4 days afterwards. A heavy user can have a positive test more than a month later.
The active ingredient in marijuana is THC. THC causes the high. Once in the system the liver breaks down the THC into THC-COOH. The drug test is for THC-COOH - not for THC. If you test positive for marijuana, it does not mean you have the active ingredient THC in your system.
Regarding heroin, cocaine, meth, ect..., most of these (excluding PCP) are undetectable after a couple of days. So it a kid want try heroin or other drugs that might kill them, they just have to make sure they are unavailable for testing (e.g. summer vacation). Ironic that a kid might try cocaine rather than pot because it is less detectable.
You can be sure that all of the athletes using drugs are aware of the drug detection times. And if they are not, well, its another indicator that maybe school is not for them. It does not take a rocket scientist to figure out that the time an athlete is most likely to use drugs is after a "negative" drug test. Unless they are going to follow up with another test two days later. And two days after that......
So how effective is a random drug test? Well, you can be dead drunk and pass - just don't drive to the test. You could have used heroin last weekend and still pass. But if you got "high in Colorado", as John Denver used to sing about (I think he was talking about a different high), you might end up playing hoops somewhere is Tennessee.