There were a few mathematical issues brought up in this episode, but the primary one was probability theory, which Charlie used to determine that there were higher than expected rates of cancer around schools who contracted with Kenwell Construction. This led Don to look further into the construction sites, eventually unearthing the toxic waste buried underneath.
The Texas sharpshooter fallacy is based on the legend of a Texan who shot several times into the side of a barn, painted a target around the tightest cluster of bullet holes, and claimed to be a sharpshooter. While it is easy to see in this case that there is no organization to the shots, it can be much harder to tell in some real-world situations. Random events can seem to cluster non-randomly, especially when the number of events is low. The sharpshooter fallacy depends on the tendency for humans to find and invent patterns where none exist. However, this fallacy does not apply if there is some reason a priori to believe that a particular site should have a higher incidence of a particular type of event than other similar sites, for instance if one is investigating a company accused of dumping toxic waste in their construction sites. This is the metaphorical equivalent of the Texan sharpshooter drawing the target on the side of the barn before he starts shooting.
As mentioned in the episode, about 1 in 10,000 children in the United States develops leukemia. Even without specific environmental causes, odds are that some of these cases would appear close enough together, spatially and temporally, that it would invite speculation that there was, in fact, an environmental source. These clusters do appear and are called cancer clusters. Clusters can consist of a higher than usual incidence of all cancers combined or of a repeated occurrence of a very rare type of cancer.
Thousands of suspected cancer clusters have been investigated in the U.S., though in all but about 5% to 15% of these suspected clusters, the incidence of cancer is no more than would be expected with random clustering. And even with a majority of the clusters with a much higher incidence than expected, no environmental cause has been found, though an environmental toxin may still remain undiscovered.
Charlie tells us that 1 in 10,000 children develops leukemia. Let's say we have an imaginary country with 200 cities, each with 10,000 children.