Assume a constant annual force of infection across ages and calendar years. For independent sampled people with ages and binary results , fit
Applying the complementary log-log link gives
Therefore fit a binomial regression with the complementary log-log link, an intercept, and as an offset with coefficient fixed at one. Age is measured in years. An ordinary freely fitted coefficient of age, or even a freely fitted coefficient of , would describe a different exposure model. The annual force of infection estimate is
An infection-naive person's one-year infection probability is , which is approximately only when that rate is small.
The log-likelihood being maximized is, apart from constants,
A confidence interval for can be exponentiated to give a positive interval for . For groups of people at a common age , use with the same offset. If an age band is broad, use individual ages or average over the band's age distribution instead of treating its midpoint as exact. No numerical estimate is possible without the survey observations.
The biological interpretation assumes that immunoglobulin G positivity records previous infection, persists over the relevant ages, and is not substantially produced by maternal antibodies or vaccination. These are conditions to check, rather than conclusions from the fitted curve. Use known-positive and known-negative serum controls to assess the assay threshold, and validate specificity against relevant other infections. Cross-reactive antibodies to other flaviviruses can produce positive dengue virus serology, so a positive result need not be a marker specific to dengue virus exposure.[ref]
If independently established assay diagnostic sensitivity and diagnostic specificity are and , the observed positive probability is
Use that observation model in the binomial likelihood; it is generally no longer the simple intercept-plus-offset complementary log-log link fit. With only the stated survey, one cannot freely estimate , , antibody loss and an arbitrary infection history simultaneously. A single binary result also does not identify how many subsequent infections a person has experienced.
Let be the true seroprevalence at age , and the force of infection, meaning the instantaneous rate of a first infection among people still uninfected. In an irreversible serocatalytic model, people begin seronegative and retain detectable antibodies after infection. Their seronegative fraction obeys
Hence
Equivalently, where differentiation is possible, . This identifies the force of infection as a hazard function and as the survival function for remaining uninfected. For constant exposure , . A single calendar-time survey reflects each birth cohort's accumulated exposure; interpreting the same age curve as a timeless age effect requires assumptions about historical transmission.
The two descendant branches of an equal-rate Jukes-Cantor model compose to a single branch of duration . More explicitly, the model is symmetric, so summing over the ancestral base gives and a total mismatch probability . Thus use the pairwise difference fraction directly with , rather than halving the differences and correcting the halves separately:
This is the parameter in the printed formula of (c). For a mutation rate measured as actual changes per site per year, the conversion derived in (b) gives
The latter is directly comparable to the naive estimate in (a): allowing repeated changes raises that estimate by about . The exponent parameter and actual event rate are two conventions for the same fitted process, not two different biological estimates.
Under the independent-site Jukes-Cantor model, the number of differences from a known ancestor has a binomial distribution with mismatch probability
For an interior estimate, maximum likelihood estimation gives . Equating this to the model probability and rearranging gives
This is finite for . At , the estimate tends to infinity: the endpoint distribution has reached its limiting saturation and no finite rate can reproduce it exactly. For , the displayed logarithm is not defined as a real number; within this model the constrained likelihood is maximized only as . For the boundary estimate is zero. The corresponding estimate of the actual event mutation rate is .
The printed “otherwise” branch requires correction. Its factor is the probability of ending at any of the three bases different from the initial base, not of ending at one specified different base. Assigning that probability to each of three alternatives would make a row of the transition matrix sum to , which exceeds one for . This distinction is present in the source PDF, not introduced by the transcription.
For a consistent Jukes-Cantor model, let each ordered change from one nucleotide to a specified different nucleotide have instantaneous rate . Its continuous-time Markov chain has diagonal generator entries and off-diagonal entries . If is the probability of still having the same base as at time zero, its Kolmogorov equations give
Solving the linear ordinary differential equation gives
Set to match the exponent used in the question. Symmetry then gives the properly normalized transition probabilities
Summing the three different-base outcomes yields
The assumptions are a time-homogeneous Markov process, the same change rate between every distinct ordered base pair, identical rates across independent sites, and no insertions or deletions. The stationary distribution is uniform over the four bases; starting the process in that distribution is not required for this conditional calculation.
There is also a parameter-convention issue. The actual total mutation rate out of a base is . Thus the exponent parameter in (b)–(d) is times the event rate used in the elementary counting interpretation of (a). Keeping this conversion explicit avoids changing the meaning of “mutation rate” halfway through the calculation.
Let be the time since the two sampled mitochondrial genomes shared their ancestor. Under the stipulated one-change-per-difference approximation, both descendant lineages contribute, giving a total evolutionary duration . Therefore the per-site, per-lineage mutation rate estimate is
This is not a whole-genome event rate; multiplying by the number of usable sites would give that rate. Without equal lineage rates, the pairwise data identify their sum rather than either rate separately.
The calculation assumes an accurate sequence alignment of corresponding ancestral sites, negligible errors in DNA sequencing, and an appropriate divergence-time calibration for the sampled mitochondrial genomes. It assumes a constant molecular clock on each lineage, comparable rates across sites for this simple average, and no extra differences introduced by incorrectly aligned insertions or deletions. It treats observed nucleotide substitutions as a record of mutations; interpreting a substitution-based rate as the underlying mutation rate additionally requires a suitable neutral model rather than strong filtering by natural selection. Independence between sites is useful for a simple sampling model and uncertainty calculation. The supplied time must refer to the common ancestor of these sequences: a species split need not coincide exactly with a sampled gene's ancestral split.
Let be the hidden state. With the usual convention and , the Markov property and the conditional independence of emissions factor the joint probability as
The requested state-path probability after observing the complete data is the corresponding conditional probability:
Here the forward algorithm and backward algorithm give the same normalizer at any interior time,
There is no extra factor : it is already included in . If an unconditioned joint probability with the observations is intended, it is the numerator alone. Summing the boxed expression over all gives one.
For the same uniform background and base-two log-likelihood ratio, replace every emission probability by . The background specifies independent letters, not a competing hidden-state process. Its single emitting state has continuation factor one when scoring a fixed-length word, so each model transition contributes ; dividing every transition by would incorrectly count the background twice.
The complete transition-score diagram is
Every omitted transition has score . Silent Start and End supply no emission score. The complete table of emission scores is
For the unique nonzero path identified in (b), add the five emission scores and all transition scores:
This equals (c). For a sequence with several nonzero hidden paths, the full log-likelihood ratio is the log-sum-exp of their path scores; selecting only the largest score would instead compute a best-path approximation.
Use a uniform independent DNA background, so each nucleotide has probability . Conditional on length five, its sequence probability is . The requested score, often called log-odds in sequence analysis, is a log-likelihood ratio against this background:
Using natural logarithms instead gives . Identically distributed independent positions do not, by themselves, require equal base frequencies. If the intended background instead has specified frequencies , the general answer is
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 . 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.
The sequence has five characters, while the four match states account for four compulsory emissions. Consequently exactly one insertion state emission is needed. An insertion at would have to emit T, which has probability zero there. The only nonzero hidden path is therefore
Multiply its transition probabilities and emission probabilities, including the probability of exiting immediately and bypassing :
Normally the forward algorithm sums over all compatible paths. Here all other paths have probability zero, so this single path gives the full sequence probability.
With no deletion states allowed, each match state must emit once in every aligned sequence. Thus the four gap-free alignment columns, , become . Columns and form one optional run, represented by a single looping insertion state ; column requires a separate insertion state after . Two insertion states are sufficient and minimal in an ordered profile hidden Markov model: the two optional regions are separated by a compulsory emission and occupy different positions in the profile.
Estimate each transition probability by the number of observed uses of that transition divided by all transitions leaving its source state. The complete arrow diagram is given below; repeated labels denote the same state, so the second and third lines supply the branches of the first line. Start and End are silent:
Three aligned sequences visit , giving three exits to , while one sequence emits twice there, giving one self-transition. Thus its exit and loop probabilities are and , respectively. Two sequences visit and two bypass it. All absent transitions have probability zero.
The probability mass functions of the emitting states, estimated from all characters assigned to each state with no added counts, are
In particular, pooling the two optional columns into pools four emissions: two T, one A and one G. This is a generative Hidden Markov model, so it can generate other run lengths and combinations as well as the training sequences; reproducing each training column deterministically is not its purpose.
Build an FM-index: store the Burrows-Wheeler transform, cumulative character counts , and a structure supporting fast rank queries for . Then each step of backward search uses two rank queries instead of rescanning the last column. A wavelet tree or suitably checkpointed counts can supply these queries while keeping memory manageable. The counting cost is proportional to query length times the rank query cost, rather than repeatedly scanning the whole genome.[ref]
To recover genomic positions, store a sampled suffix array and follow the last-to-first mapping to a sampled position, adding the number of steps taken. More samples trade storage for faster position recovery. Index character counts and sample positions, rather than storing the quadratic-size full cyclic rotation matrix.
Use one-based row numbers, and write and for the first and last columns. The last-to-first mapping matches the th occurrence of a character in to its th occurrence in : equal characters retain the ordering of their following suffixes. This lets us extend an interval of matching suffixes one character to the left without reconstructing the full strings.
Start with the last query character. Rows of contain C, so the interval of suffixes beginning with C is . Within those rows, the A entries of are at rows and . They are respectively the first and second A entries in all of , and therefore map to rows and of . These are exactly the suffixes beginning with AC. Reading their supplied positions gives matches starting at positions 11 and 3, or positions 3 and 11 in increasing genomic order.
The same calculation can be written as backward search. Let count characters strictly smaller than , and let count occurrences of in , with . Prepending changes an inclusive interval to
Here , and , giving .
To invert the Burrows-Wheeler transform, begin with six empty rows. At every iteration prepend the supplied last-column characters in their fixed row order, then sort the resulting rows in lexicographic order. After iterations the rows contain the length- prefixes of the sorted cyclic rotations. For example, the first two iterations give
Each iteration works because sorting the preceding character together with the already reconstructed prefix restores the ordering of the next-longer prefixes. Six iterations give the completed matrix
The original linear string is the unique row ending in the terminator, hence
As a check, the reconstructed matrix's final column is precisely the supplied Burrows-Wheeler transform.
A cyclic rotation moves the first character to the end without changing the cyclic order of the remaining characters. Starting with the specified terminator-first row and repeatedly rotating left gives the following matrix; its row order is only a construction order, not a sorting order:
Under lexicographic order, compare characters from left to right, using . The sorted cyclic rotation matrix is therefore
The Burrows-Wheeler transform is the last column, read downwards, so the transformed string is
Expanding the squared Euclidean distances gives
For distinct centroids, choose
A point assigned to has the displayed distance difference at most zero and therefore ; assignment to gives the reverse inequality. The separating hyperplane is the perpendicular bisector of the line segment joining the two centroids. Points tied between them lie on that hyperplane. This is the nearest-centroid decision hyperplane.
The requested nonzero needs the additional assumption . It does not follow from the stated algorithm alone. In one dimension, take and , whose centroids are both zero. A tie rule that retains previous assignments can leave this configuration after an iteration. The inequalities at imply , while the inequality at zero implies , forcing . Thus the unconditional nonzero-separator claim has this degenerate exception.
Combining the first two parts gives the centroid sum-of-squares identity
The added term is nonnegative and, since , vanishes exactly at . Thus the unique minimizing centroid in this step of K-means clustering is
An empty cluster needs a separate algorithmic convention because its sample mean is undefined and its objective is identically zero.
The centred observations sum to zero:
By linearity of the inner product,
This cancellation holds for every .
Write and suppose the cluster is nonempty. Expanding the Euclidean norm through its inner product gives
Sum over . The final term does not depend on , so its sum is , which proves the requested identity. This expansion is the starting point for the centroid sum-of-squares identity.
Direct independent sampling is preferable. The posterior distribution is the standard beta distribution , for which exact posterior moments and standard random-number generators are available. For example, draw independent and with the same rate, and return . This has the required beta distribution and avoids Markov chain Monte Carlo convergence problems. A correct, converged MCMC method could sample this target, but it is unnecessarily complicated here.

There are unlisted articles, also show them or only show them.