= Solution
Use a uniform independent <DNA> background, so each <nucleotide> has probability $1/4$. Conditional on length five, its sequence probability is $4^{-5}=1/1024$. The requested score, often called log-odds in sequence analysis, is a <log-likelihood ratio> against this background:
$$
\boxed{\log_2\frac{P(\texttt{CGTTA})}{4^{-5}}=\log_2\frac{27}{4}\approx2.75489\ \text{bits}}.
$$
Using <natural logarithms> instead gives $\ln(27/4)\approx1.90954$. Identically distributed independent positions do not, by themselves, require equal base frequencies. If the intended background instead has specified frequencies $q_A,q_T,q_G,q_C$, the general answer is
$$
\log\frac{27/4096}{q_Cq_Gq_T^2q_A}.
$$
The numerical value above uses the conventional equal-frequency random <DNA> model.
Taking a <logarithm> only after multiplying probabilities does not prevent <floating-point underflow>: the product may already have rounded to zero, and its <logarithm> is then $-\infty$. \b[Accumulate logarithms before forming tiny products]; where alternative paths must be added, use <log-sum-exp> in the <forward algorithm> or rescale its intermediate probabilities.
Back to article page