1. A method of detecting aneuploidy or sex in a fetus, the method comprising: (a) extracting DNA from the blood of an individual carrying the fetus; (b) mapping segments of the extracted DNA to a reference genome comprising a chromosome of interest; (c) partitioning substrings of the reference genome into a plurality of partition levels based on a source of variability that biases chromosome abundance measurements; (d) calculating an expected number of segments mapped to the chromosome of interest using (i) the number of substrings in the chromosome of interest in each partition level, and (ii) the number of substrings in the reference genome in each partition level; and (e) detecting aneuploidy or sex in the fetus by comparing an actual number of segments mapped to the chromosome of interest against the expected number of segments mapped to the chromosome of interest.