A reference genome is a string over {A, C, G, T}. A sequencer returns short reads; each base of a read is wrong with probability e (substitution error, replaced by one of the other three bases). Alignment asks where in the genome the read came from. The simplest aligner slides the read along the genome and scores every start position i:
score(i) = (1/L) · Σj [ readj = genomei+j ]
call = argmaxi score(i) (a tie = ambiguous)
At the true site every base matches unless it was an error, so E[score] = 1 − e. At a wrong site each base matches by chance with probability q = Σb pb², which is 0.25 for a 50% GC genome and larger when the composition is skewed. The number of matches at a wrong site is then Binomial(L, q), so the expected number of wrong windows that reach a threshold k is (N−L+1) · P(Bin(L, q) ≥ k). Short reads, high error and skewed GC all raise it, which is why short reads map ambiguously.
To cover a genome with M reads of length L the average coverage is c = M·L/(N−L+1), and a base is left uncovered with probability (1 − L/(N−L+1))M ≈ e−c (Lander–Waterman).