We quantified deviation from expectation with a Z score11, which for synonymous variants is centered at zero, but is significantly shifted towards higher values (greater constraint) for both missense and PTV (Wilcoxon p < 10−50 for both; Figure 3a). The genes on the X chromosome are significantly more constrained than those on the autosomes for missense (p < 10−7) and loss-of-function (p < 10−50), in line with previous work15. The high correlation between the observed and expected number of synonymous variants on the X chromosome (r = 0.97 vs 0.98 for autosomes) indicates that this difference in constraint is not due to a calibration issue. To reduce confounding by coding sequence length for PTVs, we developed an expectation-maximization algorithm (Supplementary Information Section 4.4) using the observed and expected PTV counts within each gene to separate genes into three categories: null (observed ≈ expected), recessive (observed ≤50% of expected), and haploinsufficient (observed <10% of expected). This metric – the probability of being loss-of-function (LoF) intolerant (pLI) – separates genes of sufficient length into LoF intolerant (pLI ≥0.9, n=3,230) or LoF tolerant