Sequence Q: 
A  B  C  C  C  A  B  A  A  C 
A  C  C  C  B  A  C  B  C  C 
C  A  A  B  B  B  A  A  B  B 
Sequence L: 
C  B  C  C  C  A  B  C  B  C 
B  B  C  A  B  C  B  B  C  C 
A  C  A  B  B  A  A  C  B  C 
Logodds.
Here we have the random probabilities for encountering the nine possible alignments of our
3letter alphabet.
P_{AA}=p_{A}p_{A}=0.07111  P_{AB}=p_{A}p_{B}=0.08889  P_{AC}=p_{A}p_{C}=0.10667 
P_{BA}=p_{B}p_{A}=0.08889  P_{BB}=p_{B}p_{B}=0.11111  P_{BC}=p_{B}p_{C}=0.13333 
P_{CA}=p_{C}p_{A}=0.10667  P_{CB}=p_{C}p_{B}=0.13333  P_{CC}=p_{C}p_{C}=0.16 
And here we have the probabilities derived from the alignment of Q and L up top, and
alignment assumed to represent Nature's preferences.
q_{AA}=M_{AA}p_{A}=0.1  q_{AA}=M_{AB}p_{B}=0.05  q_{AC}=M_{AC}p_{C}=0.11667 
q_{BA}=M_{BA}p_{A}=0.05  q_{BA}=M_{AB}p_{B}=0.23333  q_{BC}=M_{AC}p_{C}=0.05 
q_{CA}=M_{CA}p_{A}=0.11667  q_{CA}=M_{AB}p_{B}=0.05  q_{CC}=M_{AC}p_{C}=0.23333 
The first step to computing the logodds matrix is to take the ratios of all the corresponding elements
in both the qarray and the Parray. Here's the result:
q_{AA}/P_{AA}=M_{AA}/p_{A}=1.40625  q_{AB}/P_{AB}=M_{AB}/p_{A}=0.5625  q_{AC}/P_{AC}=M_{AC}/p_{A}=1.09375 
q_{BA}/P_{AB}=M_{BA}/p_{B}=0.5625  q_{BB}/P_{BB}=M_{BB}/p_{B}=2.1  q_{BC}/P_{BC}=M_{BC}/p_{B}=0.375 
q_{CA}/P_{CA}=M_{CA}/p_{C}=1.09375  q_{CB}/P_{CB}=M_{CB}/p_{C}=0.375  q_{CC}/P_{CC}=M_{CC}/p_{C}=1.45833 
Ok, so look at these numbers. If the ratio is greater than 1, then q is greater than P, which means
the particular alignment occurs at a greater than random frequency, which means that it is a
biologically favorable substitution. This occurs with all the diagonal components (AA, BB, CC), and
the AC or CA offdiagonal substitution. We want these substitutions to get positive scores, and all
the rest negative scores. The function that does this is the log function (in particular the natural
log function "ln"). We won't go into details, but recall that if X > 1, then ln(X) > 0, and if 0 < X < 1,
then ln(X) < 0. Anyway, here's what we get if we take the natural logarithm of each of the nine
components above:
ln(q_{AA}/P_{AA})= +0.34093  ln(q_{AB}/P_{AB})= 0.57536  ln(q_{AC}/P_{AC})= +0.08961 
ln(q_{BA}/P_{AB})= 0.57536  ln(q_{BB}/P_{BB})= +0.74194  ln(q_{BC}/P_{BC})= 0.98083 
ln(q_{CA}/P_{CA})= +0.08961  ln(q_{CB}/P_{CB})= 0.98083  ln(q_{CC}/P_{CC})>= +0.37729 
Well, this would be a fine scoring matrix, but we really have no reason to believe that we need this
much precision, and as biologists it would be nicer to deal with integers, so one way to make a more
comfortable matrix of alignment scores would be to take these numbers, multiply by 10, and round to the
nearest integer. In this manner we get our final result, the alignment scoring matrix below:
Given this scoring matrix the Q and L alignment above scores 49 (if I did it right),
which is quite high. The question is, is it high enough to convince the researcher that it's
biologically significant? Well, since we've assumed from the start that their alignment is
significant, we can say yes in this case. We'll attempt to answer that kind of question in general
in the Statistics section. On the next page of this section we'll finish our discussion
of scoring, and begin discussing multiple alignments.

