The text in 6.18.30 FTEST has some typographical problems, where indices are missing, or wrong typeset as exponent => errata
The algorithm needs improvement. Following the current descriptions can result in probabilities larger than 1, which is mathematically not possible. Because these needs example documents and the typographical problems need an ODF document, I'll bring it to the mailing list for discussion.
[update] Problem description and example documents are attached to https://lists.oasis-open.org/archives/office/201606/msg00013.html.