A method comprising: for each sample of a plurality of samples from different subjects having a same type of cancer, receiving a set of one or more mutations in DNA measured in the sample, the DNA including a plurality of genes; for each sample of the plurality of samples, determining a sample mutation rate based on a total number of mutations measured in the sample; for each mutation context of a plurality of mutation contexts, determining a context mutation rate based on a first number of mutations identified in the sets of mutations for the mutation context, wherein a mutation context corresponds to a type of substitution or deletion; for each gene of the plurality of genes, determining, for each sample of the plurality of samples, a second number of silent mutations measured in the gene in the sample; determining an expected silent mutation rate using a sum of context mutation rates of silent mutations in the gene, wherein a silent mutation does not cause a change to an amino acid sequence of a translated protein for the gene; determining a probability distribution of gene-specific background mutation rate across the plurality of samples for the gene based on the expected silent mutation rate for the gene and the sample mutation rates of the plurality of samples, wherein determining the probability distribution of gene-specific background mutation rate for the gene includes: optimizing one or more parameters of the probability distribution of gene-specific background mutation rate for the gene to increase a fit of the probability distribution to the second number of silent mutations; determining an expected non-silent mutation rate using a sum of context mutation rates of a subset of non-silent mutations in the gene; determining an expected number of samples having at least one non- silent mutation using the expected non-silent mutation rate and the probability distribution of the gene-specific background mutation rate for the gene; and comparing the expected number to the measured number of samples having at least one non-silent mutation to obtain a likelihood value for the measured number; and identifying a group of genes having likelihood values above a threshold as candidate driver genes. for each sample of a plurality of samples from different subjects having a same type of cancer, receiving a set of one or more mutations in DNA measured in the sample, the DNA including a plurality of genes; for each sample of the plurality of samples, determining a sample mutation rate based on a total number of mutations measured in the sample; for each mutation context of a plurality of mutation contexts, determining a context mutation rate based on a first number of mutations identified in the sets of mutations for the mutation context, wherein a mutation context corresponds to a type of substitution or deletion; for each gene of the plurality of genes, determining, for each sample of the plurality of samples, a second number of silent mutations measured in the gene in the sample; determining an expected silent mutation rate using a sum of context mutation rates of silent mutations in the gene, wherein a silent mutation does not cause a change to an amino acid sequence of a translated protein for the gene; determining a probability distribution of gene-specific background mutation rate across the plurality of samples for the gene based on the expected silent mutation rate for the gene and the sample mutation rates of the plurality of samples, wherein determining the probability distribution of gene-specific background mutation rate for the gene includes: optimizing one or more parameters of the probability distribution of gene-specific background mutation rate for the gene to increase a fit of the probability distribution to the second number of silent mutations; determining an expected non-silent mutation rate using a sum of context mutation rates of a subset of non-silent mutations in the gene; determining an expected number of samples having at least one non- silent mutation using the expected non-silent mutation rate and the probability distribution of the gene-specific background mutation rate for the gene; and comparing the expected number to the measured number of samples having at least one non-silent mutation to obtain a likelihood value for the measured number; and identifying a group of genes having likelihood values above a threshold as candidate driver genes. optimizing one or more parameters of the probability distribution of gene-specific background mutation rate for the gene to increase a fit of the probability distribution to the second number of silent mutations; determining an expected non-silent mutation rate using a sum of context mutation rates of a subset of non-silent mutations in the gene; determining an expected number of samples having at least one non- silent mutation using the expected non-silent mutation rate and the probability distribution of the gene-specific background mutation rate for the gene; and comparing the expected number to the measured number of samples having at least one non-silent mutation to obtain a likelihood value for the measured number; and identifying a group of genes having likelihood values above a threshold as candidate driver genes.