Your new experience awaits. Try the new design now and help us make it even better

ORIGINAL RESEARCH article

Front. Appl. Math. Stat., 12 January 2026

Sec. Statistics and Probability

Volume 11 - 2025 | https://doi.org/10.3389/fams.2025.1640488

Node-crossing vectors (“NXV”) feasibly extends Mann Whitney U to handle ties and small samples for clinical rating scales


Keith Reid,
&#x;Keith Reid1,2*
  • 1Positive and Safe Care, Cumbria Northumberland Tyne and Wear NHS Foundation Trust, Newcastle upon Tyne, United Kingdom
  • 2Health and Life Sciences, Northumbria University at Newcastle, Newcastle upon Tyne, United Kingdom

The Mann-Whitney U test (“MWU”) is a canonical test of order used to compare two groups. A longstanding gap is that MWU handles ties and small samples incorrectly. In the present author's clinical field, this impairs analyses of ward incident counts, or “small” rating scales used for comparing clinical populations such as Clinical Global Impression (“CGI”) and Brøset Violence Checklist (“BVC”). This paper introduces Node-Crossing Vectors (“NXV”), an extension of MWU that solves those problems. While MWU uses sample size and U-scores of order to calculate probability, NXV furthermore proceeds from first principles to handle expectations of ties combinatorially. MWU is briefly outlined in NXV's terms, then proven to be inexact for small clinical rating scales. Hitherto, ties were sometimes ignored due to computational difficulty. No settled method had been extant. Here, NXV was applied a priori to real CGI scores in a real n = 13 problem which featured seven tied elements. Ties were decisive: the population parameter λ (expected τ tied elements per individual sample of size n) critically affects power. NXV with a grounded expectation of seven tied elements gives pλ7 = 0.0280(3sf), above two-tailed α = 0.025, suggesting no difference. Alternatively expecting six tied elements gives pλ6 = 0.0241(3sf), changing the result. NXV is more exact than MWU, has viable code, and improves the analysis of two small samples. The explanation is visually accessible, and simulation data are shown. NXV arose during analyses aiming to protect the rights of restrained persons with protected characteristics and other small samples, but it is generalizable.

1 Introduction

1.1 Aim

Node-Crossing Vectors (“NXV”) was developed by the present author during research to reduce restraint in psychiatry [1]. This monograph was written for a special issue on the restraint of women, and allocated to the present applied statistical journal. The present manuscript aims to improve the evaluation of two samples, for ward-sized counts of events and small rating scales, in a novel way, to address long-standing problems regarding measures of order.

1.2 MWU and the new test NXV

1.2.1 Canonical nature of MWU

MWU is over 75 years old. It may be used when an approximately normal distribution of sample scores cannot be relied upon. A literature search for MWU for the present article gave over 50,000 articles on PubMed [2].

1.2.2 MWU problems with ties

MWU was not designed for ties but for continuous data [3]. Continuous data can have any value and expects no ties [4]. Small or tied samples may occur while analyzing restraint or other clinical problems on wards, which may feature “small” population sizes less than twenty and/or rating scales smaller than that. Indeed, as proven below, ties must occur when the sample size exceeds the scoring options, see theorem at 1.3. It is problematic and motivating that a canonical test is provably inexact.

1.2.3 Debate over how to respond to MWU difficulty with ties

The literature discusses how to adapt MWU to handle ties. Options (ignore ties, jitter ties) were compared in mental health care by McGee, who concluded empirically that it is least bad to ignore ties [5]. In response, Neuhäuser and Ruxton, while also using empirical approaches, raised concerns that ignoring ties can violate test assumptions. They particularly recommend exact combinatorial methods [6].

1.2.4 Node Crossing Vectors

The present manuscript aims to support such debate at least for small samples. This new test is called “Node-Crossing Vectors,” or NXV, due to its mechanism and visual appearance of lines crossing dots across a lattice. NXV is contrived to spell MWU shifted forward, one letter alphabetically: (M → N; W → X; U → V).

1.2.5 Outline of approach

NXV defines a “tied element.” NXV creates a “local” distribution for all of the mutually exclusive predicates regarding how many tied elements there are per sample. The range of such predicates is constrained by sample size. Each mutually exclusive predicate is a statement, “the sample has τ tied elements.” NXV proves a distribution of each τ-predicate called E which turns out to be a truncated Poisson distribution, see proof at 1.4.5.

NXV then uses combinatorics derived from further proofs to “solve” each local distribution. There are three such novel combinatorial algorithms. They agree with each other and with the MWU statistical tables for small values, which were predicated on τ0. They are Napkin-shifting (see below), bitstring partition, and constrained Stern-Brocot path generation (see Sections 2.4.1–2). They are open source. These make sense in a visually accessible lattice paradigm, and all paths with any τ cross a lattice of size s×t as will be seen. The local combinatorics are tightly constrained by τ, because τ affects path length, see discussion at Sections 1.4.1–1.4.4.

To bridge the longstanding gap, this manuscript describes MWU concepts in NXV terms. These include: UN, the “order score” of a path N; and 𝕌s, t, the “null distribution” of the order score for a given pair of sample sizes s and t. A real a priori problem is analyzed, and ties are shown to be decisive. This is placed in the context of simulation data.

1.3 Theorem: MWU is always inexact for small scales

The founding MWU paper showed, employing the notation Um, n, that the distribution of orders 𝕌s, t approaches the binomial, then the normal distributions [3]. NXV uses s and t from combinatorial literature, allowing the notation n = s+t. While for large n the normal approximation is acceptable, for smaller numbers, conversely, it is unacceptable. With relevance to the restraint of women, comparisons involving minorities may tend to be smaller, arguably systematizing biases. One cut-off for acceptability is n10, ten cases, reflected in the design decision by an MWU online engine to not allow less than n10 [7]. Denote the cut-off d (for De Moivre-Laplace), and set it at d = 10 denoted d10. Let proofs proceed, as if MWU for n below d10 were inexact.

Set d10 below which the MWU-normal approximation fails. Allow the Pigeonhole Principle, modeled on mail-sorting. It states that if there are more cards than pigeonholes, some cards must share a pigeonhole [8]. Denote the range size of any clinical rating scale using r. Define “small” r as less than d. Some scales used in psychiatry have small r<d10. Brøset Violence Checklist (“BVC”) has r6 being the sum of six binary sub-scores [9]. The Clinical Global Impression (“CGI”) or the Bristol Stool Chart has r7 possible scores [10, 11]. Generally, any sample using these scales with n greater than r has at least nr tied elements.

The proposition is that, “any measurement scale with r<d always suffers inexact MWU.” Clearly, n is either bigger than r (Case A) or not (Case B).

• Case A: If n is bigger than r there must be ties due to the Pigeonhole Principle. MWU is not exact with ties, so in Case A, MWU is inexact.

• Case B: We know that r<d in “small” scales by definition. Then, if n is not bigger than r, n must be smaller than d. This situation is denoted nr<d. In Case B, MWU is inexact because n<d due to the approximation breaking down.

Any measurement scale with r<d suffers from inexact MWU □.

1.4 Proposed method for tied elements

1.4.1 Each untied MWU order maps to a Manhattan path

Imagine truly continuous data, or pragmatically accept methods of jittering, or ignoring ties. Hence, confidently expect τ0. Certainty in τ0 implies 100% weight to τ0, 0% to τ1, ..., until the options for τ run out. Denote such expectation (with foreshadowing) as λ0. This predicate λ0 allows acceptable use of MWU if MWU does not handle ties.

There is a visually accessible way to consider orders of two samples given λ0 see Figure 1. It has been discussed by authorities such as Bucchianico [12], Knuth [13], and Stanley [14]. NXV calls the smaller sample S with s elements and the other T with t elements. Call the total sample N with n = s+t elements. Any order has its order score. Denote the order score U of a total sample N using UN. UN tends toward s×t as S comes first in order stochastically.

Figure 1
www.frontiersin.org

Figure 1. 𝕌3, 4λ0 null distribution; of 35 possible orders, two in the dashed box have UU1.

On a lattice of width s and height t, paths encoding all distinct orders with regard to U may be comprised by vectors going right for s and up for t. The ordered set of all possible paths across this lattice encodes 𝕌st. Paths must always go from the Cartesian origin (0, 0) to the terminus (s, t). For each path, the size of the area around (0, t), cut off by the path, is UN. The number of possible untied paths is calculable using the binomial. That is simpler than generating paths, see Technical Appendix A. The binomial works for the same reason Pascal's triangle relates to the binomial: each node enjoys the sum of its parent nodes as paths to the terminus, see Technical Appendix B.

To illustrate, take a small non-trivial stochastic order of two samples over a 𝕌s3t4λ0 lattice, N = [t, t, t, s, t, s, s] . As encoded in Figure 1, it has an order score UN = 1. See that |𝕌 ≤ UN| = 2 in the dotted box. See that |𝕌| = 35. The exact probability of this local s3t4λ0U1 problem is hence pλ0=235=0.0571(3sf).

Now, only the tail needs to be generated to give |𝕌 ≤ UN|. The present author wrote a simple algorithm for any s, t, U, λ0 situation, see Technical Appendix C. The algorithm is called Napkin-shifting. Iterating from U0 to UN gives the numerator of the probability equation. If the tail is small, i.e., near α, this is efficient. Napkin-shifts resemble napkins on a table being moved while remaining pushed into the corner of a table. The intent was to reduce the need for approximation, especially for small probabilities, but it is a lemma to the tied problem.

1.4.2 Definition of tied elements

By NXV's novel definition, any “tied element” is directionally tied to one, and only one, other measure. In graph-theory terms, NXV considers elements, the nodes of tying rather than “ties” which are the edges. A tied element is never tied to two or more. There are obvious base cases that neither an empty sample s0t0n0, nor a single measure s0t1n1, have tied elements. Iff a second element is tied, it is tied to the first, and so on by induction. The stochastic mapping of tied elements to the elements they are tied to, amongst a shared value, is injective; but the distribution does not “need to know” the specific mapping, which would not affect U or U. Each measure is either tied or not, so τ is a whole number. Because each tied measure exhausts one element to be “tied to,” by induction, there cannot be more than n−1 tied measures. Hence, in NXV, τ < n and 0 ≤ τ ≤ n−1 also denoted τ∈[0:n−1], i.e. tau is in the range zero to n−1.

1.4.3 Tied elements between S and T lead to slopes

In λ0, each element encoded a step which, for s, is a vector going right in the U-lattices in Figure 1; and the t is a vector going up. Under non-λ0, in NXV, the vector sum of st-tied steps gives an angled vector. Where there could be st-tied elements, but there happen not to be, in a given step, due to either no s or no t, the step is still a vector; but simply a vector wth a zero value for the relevant axis. This gives MWU-style vertical or horizontal steps as in Figure 1.

Sloping steps have a number of consequences. Any possible combination of steps will still cross the lattice, even a complete tie, which will be a long diagonal line, due to the associative nature of addition. These include null distributions with half-scores for UN, not just whole numbers. The number of possible paths grows. For example, s1 and t1 can have three orders: [s, t], [t, s] and [ts], rather than two. This 3 is the same three near the top of Figure 2: it has 3 paths home to the top.

Figure 2
www.frontiersin.org

Figure 2. McMeekin Hill: each number counts paths home via any visible node, not just two parents.

The present author contributed a peer-reviewed method to compute all paths across a lattice if tied elements and sloped steps are allowed [15]. This creates McMeekin Hill, an elaboration of Pascal's Triangle named for his doctoral supervisors, Figure 2 [16]. This gives a visual proof that the total number of paths across an s3t4 lattice is 266 if the lattice can allow slopes to model ties. Each number in that triangular structure is the sum of all visible nodes, not just the two parents. For example, see the path below in Figure 3. This use of slopes to manage the complexity of tied elements is the core innovation of NXV.

Figure 3
www.frontiersin.org

Figure 3. Sam and Terri's N = [t↑, t↑, (ttt↑↑↑), (ssttt↗), (st↗), s → ] is a s4t9q6 path with U5.5.

1.4.4 Consequences and constraints on r, n, q, and τ

Any MWU or NXV path encoding an order of measures has steps. Each step encodes the presence of one or more measures from S or T. Denote the number of steps q. q has limits derivable from s and t as follows.

The lower limit of q is 1, because any path has steps/measures. One upper limit of q is n, because steps encode elements in n. When there are no ties, all paths can be made from n steps as in Figure 1. This q = n attribute is true of all paths with no tied elements and hence all orders handled by MWU.

Tied elements shorten paths, reducing the steps. The pigeonhole principle implies n = q+τ or, from q's point of view, q = n−τ. This is consistent with λ0 having paths of length n.

Furthermore, if a rating scale has a countable number of possible scores r, as in CGI r7, the path cannot have more steps than r. So there have to be at least as many tied elements as the difference between n and r. This limit is denoted τ≥rn. NXV needs a new null Ust, or family of them, that handles λ>0. It must correctly weigh the expectation of each mutually exclusive predicate regarding τ. These are [τ0, τ1...τn−1] if rn; or [τ0+nr, τ1+nr...τn−1] if r<n.

1.4.5 Theorem: devising a correct null distribution for tied elements

Two useful axioms seem fair in the context of constructing this null.

• If tied elements occur in samples from a population with consistent “tiedness” between samples, the expected rate of tied elements may be denoted λ. λ may be any non-negative real number, but is subject to the same upper and lower limits as τ because λ is a count of tied elements. While τ must be a whole number, λ may be any real number in the possible range of τ. NXV calls this first condition “constancy of λ.”

• Secondly, the null distribution for a test of order must not make assumptions about order. Patterns in tied elements are an aspect of order. There may be patterns in the actual population and in the samples; that is a different question from constructing a fair null. Each tied element in the null must be assumed to occur independently, albeit it at a certain overall rate per N, which is λ. NXV calls this condition, “independence of tied elements in the null.”

The null distribution of tied elements is hence modeled by a known distribution. That is the Poisson distribution, the assumptions for which are: constancy of λ; and independence of tied elements in the null. Poisson is used for independent events occurring over a defined space, like the number of calls a resident doctor gets per on-call. The distribution will be bounded by the limits on τ, which are 0 or nr at the bottom and n−1 at the top. Bringing this together, the null distribution of tied elements is a “truncated Poisson distribution.” □

2 Worked example

Denote the truncated Poisson 𝔼 for expectation. The benefit of defining 𝔼 is that it helps weigh all mutually exclusive possible τ. It is simple to calculate, as solving a real a priori problem will show.

2.1 Setting

Now, NXV is demonstrated to analyze anonymized a priori real data. In January 2025, CGI ratings were performed on patients of two clinicians, Sam and Terri. A two-tailed test reduced α to α = 0.025.

2.2 Data

2.2.1 Algebraic encoding

Sam's cohort had CGI scores of S = [4, 4, 5, 6]. Terri's had T = [1, 2, 3, 3, 3, 4, 4, 4, 5]. Terri's come first, but to keep U below s×t2, aiding tail calculation, paths can be reversed, to keep the U-area top left without affecting extremity, in a two-tailed test. If round brackets mean steps with tied measures and the superscripts are counts of tied elements in each step, the overall order may be written:

N=[t,t,(ttt)2,(ssttt)4,(st)1,s].

There are τ = 2+4+1 = τ7 tied elements in total, so this is an s4t9n13τ7 situation.

2.2.2 Lattice path encoding

See Figure 3 for the path encoding, which features slopes for steps with st-tied elements. The order score is U5.5, picked out in gray dashes, analogous to the black parts of Figure 1. As with the more blocky MWU lattices, there is a decidable order of all possible lattices that comprise the null distribution. The problem's path length is thus n13−τ7 = q6, though the first steps have the same angle. The appearance of four actual congruent lines may be called an appearance of four “limbs.”

2.2.3 Analysis as if λ0, no ties (inaccurate)

U5.5 does not exist in the MWU distribution. MWU only makes whole numbers of U. An approximation would be to use the efficient methods above applied to U5.5. By factorials, |𝕌3, 9| = 715. By Napkin-shifting |𝕌4, 9 ≤ 5| = 18. The exact probability of this incorrect question is pλ0=18715=0.0252(3sf). In this two tailed test, α was set as 0.025. Hence, by a small margin, the null hypothesis remains that neither clinician has easier patients: the author reaffirms that the data were collected a priori, though the narrowness of the result becomes pedagogically useful. Figure 4 shows the null 𝕌4, 9λ0 distribution with the lower tail picked out in blue. Though U5.5 would be a gray scatter point, it does not arise.

Figure 4
www.frontiersin.org

Figure 4. The distribution s4t9 with U≤ 5.5 in blue, which are tail = 18 of the possible total = 715 orders.

2.3 Using the correct distribution for tied elements

2.3.1 Defining bounds

There are thirteen possible s4t9τi distributions, each predicated on a particular possible τ. See Technical Appendix D. Sam and Terri ground λ on τ7 and fix λ7. The Poisson distribution predicts a probability of various τ being found in null distributions of similar samples. The lowest possible τ is n13r7 = τ6 which could be used if the assumption of lowest possible tied elements were seen as parsimonious. The highest is n13−1 = τ12. So all possible counts of tied elements are in that range, called “tau in range 6 to 12,” denoted τ∈[6:12]. In similar terms, the MWU distribution expecting no ties is a truncated Poisson distribution 𝔼λ0[0:n−1].

2.3.2 Using 𝔼

The only conditions are the constancy of λ, independence of tied elements, and the constraints of truncation. Sam and Terri denote their truncated Poisson distribution 𝔼λ7[6:12]. 𝔼 is a bridge to predicting path lengths. The claim was made that 𝔼 is easy to calculate. Each probability for each τ should have the standard Poisson formula:

pτ=e-λλττ!.

This can be simplified as follows. The values e and λ are constant. e is a constant and λ does not vary due to constancy of λ. So, taking out e−λ gives each τ a simpler formula while keeping their proportional values intact. Using ∝ for “proportional to” instead of =:

pτλττ!.

This is just λ times itself τ times, divided by the factorial of τ, and can be done by hand for small values. The sum of probabilities for all possible τ is p = 1.0, so they can all be divided by their sum to get a series of probabilities which add up to p = 1.0. This gives a formula for a list of probabilities in the truncated Poisson distribution 𝔼λ7[6:12].

The link between τ and q is crucial. Each τ-predicate, iff true, implies one and only one q because of the rule n = q+t. These probabilities are exact when written as fractions, but are rounded here for readability. So, rounded to 3 significant figures, the probabilities of the various numbers τ of tied elements are:

𝔼λ7[6:12]=766!,777!,...71212!666!+777!+...+71212!                 =163289720,163289720,...28869737699705605673714                 =pτ6q7:0.222, pτ7q6:0.222,pτ8q5:0.194,pτ9q4:0.151,               pτ10q3:0.106, pτ11q2:0.067,pτ12q1:0.039(3sf)

It is convenient to reverse these values and leave just the q label before building all paths. The reversed form of the distribution could be denoted ℚ. ℚ is 𝔼 in reverse order, so q7=16328972073714=0.222(3sf) has gone from the front to the back.

λ7[6:12]=pq1:0.039,pq2:0.067,pq3:0.106,                  pq4:0.151,pq5:0.194,pq6:0.222,pq7:0.222(3sf)

2.4 Combinatorial approaches for each local distribution 𝕌stq

Napkin-shifting was a method for building the tail of λ0 distributions, to complement the ease of binomial calculation. Two other methods have been developed by the present author for NXV, and both are submitted with the manuscript and explained here. The first is bitstring partition, and the second, which has proved more efficient, is constrained Stern-Brocot path generation. They give equivalent answers to each other, and to Napkin-shifting for λ0, and to the original MWU paper's data tables.

2.4.1 Bitstring partition

Every path has at least one s or t element in every step in its length q. This means each path can be represented by a figure like this T 111110S 000111, of length q, which is called a “presence bit-string.” Indeed, this figure T 111110S 000111 represents N, the order of Sam and Terri's path. The 1s represent the presence of some elements in T and S over the whole path, and the length is still q6. The present author has written another algorithm to generate all such figures. Then s = 4 and t = 9 can be shared out among the ones. Each presence bit-string represents a family of orders that are different, sharing of s and t amongst its figure 1s on each line. This generates all paths that can arise for a given length. There is some redundancy. In s4t4q2, for example, the bit-string T 11S 11 could encode both T 2,2S 2,2 and T 3,1S 3,1 which result in the same limbs.

2.4.2 Constrained Stern-Brocot path generation

This approach, based on Figure 2, uses the Stern-Brocot tree to generate all vectors that have co-prime s and t vectors, allowing for extension through limbs. All paths of length q have q such vectors and meet at the terminus. With inputs of s, t, q, it generates all paths across a lattice of length q. Constrained Stern-Brocot path generation is efficient enough to have solved and cached all s, t, q distributions up to a certain size in a “output.txt” file on a domestic computer. The file in the shared source code is a Julia program called “stqU_iterator.jl” which writes the output, including Unicode graphs of distributions per Appendix D. Once output is cached, the execution is trivial on a domestic computer as a separate program called “jupyter-st_base.ipynb” does the lambda weighting and presentation. This was used for the simulations.

2.4.3 Implications

Therefore, each mutually exclusive q-set of paths has two calculable attributes shown in Table 1. Each has its Ustq which gives its own probability, based on a fraction tailtotal. Each also has its own probability under ℚ. For clarity, the left-hand column is the probabilities of each predicate, the right-hand column is the local probability if the predicate is true. The left is built using Poisson assumptions about τ. The right is combinatorially built using constraints of q. The bridge between them is the pigeonhole principle n = q+t.

Table 1
www.frontiersin.org

Table 1. Each number of steps q has a tail and total giving a local pnxv, and a defined probability under ℚ.

2.4.4 The local probability score of each path length is weighted according to E

Each local pnxv q can be multiplied by the probability of the q path length arising to give a weighted sum. That is the exact test score, pNXV, written with capital subscripts above to reflect it is the weighted sum of all the circumstances arising from this U, s, t, λ situation. Applying this method with λ0 gives pMWU test results, which is p = 0.252, as seen at 2.2.3. That is the probability if ties are impossible, and if the pnxvqn tailtotal=18252 is weighted at p = 1.00 of occurring. That is out of the question, because there is no likelihood of λ0 in this problem given n and CGI's small r.

2.5 Final results

The answer with λ7 was pNXVλ7 = 0.0280. Neither clinician would have more unwell patients. The answer or pNXV with λ6, which was lowest possible λ, is pNXVλ6 = 0.0241 falling below α. It would have made Sam appear to have more unwell patients. This demonstrates the helpfulness of a derived combinatorial method for tied elements.

2.6 Simulations

The following simulations were performed referring to guidance from Morris et al. [17]. The importance of tied elements and λ was felt to have been shown for the present problem. So the estimand of interest was λ and how the weighted nulls performed against “null” samples, which were st samples that were taken and then shuffled. Because there is an infinite number of possible s, t, q, and λ, it was decided to use samples that reflect particular difficulties or edge cases.

The st sizes chosen were:

• smallest non-trivial s3t4.

• most asymmetric s2t11.

s5t5 near d10 cutoff.

• like Sam and Terri s4t9.

• largest complete symmetric s10t10.

Generating code was retained with explicit seeds. Underlying populations were independently shuffled columns and are in .csv files. All were presented unjittered and jittered; jittering tends to push the expectation of tied elements toward λ0. The simulations are submitted as .html files. They estimate λ using mode, mean, mean of a sample of n samples, and the found τ in the sample. Where r is not restrictive, truncation could be empirical. Options for truncation include defined using all τ that arose, or only those that were significantly present, i.e., more than 0.05 of all samples. The simulations iterate through these. These are the problems.

• Six-Sided dice vs. Seven-Sided dice.

• Primes up to 20 vs. Odd numbers up to 20.

• Ints up to 20 vs. Rounded Floats one decimal up to 10.

• Vowels in the first 270 words of McGee vs. the first 270 words of Neuhäuser and Ruxton.

• Word length in the first 270 words of McGee vs. the first 270 words of Neuhäuser and Ruxton.

• Risk ordinal rating data: Item A n = 320 vs Item_B anonymized bulk risk data n = 320; both are mainly 0,1,2 but A can exceptionally be rated 3.

• Cauchy-derived distribution of integers with incremental increases of t values by 0,1,2,4,8.

• Normally-derived distribution of integers with incremental increases of t values by 0,1,2,4,8.

See for example, Figure 5 the estimation of λ in an s4t9 comparison of the number of vowels in the text of McGee vs Neuhäuser & Ruxton. The mean appears to be a good estimate on visual inspection. The randomly chosen sample must have had one tied element, which leads to a truncated λ1 distribution. The modal estimate is often acceptable. In this example, however, the modal estimate becomes λ0, losing the double curve shape - integers U in one, half-Us in the other.

Figure 5
www.frontiersin.org

Figure 5. s4t9 samples of text comparing numbers of vowels with NXV distributions for different λ.

3 Discussion and limitations

The intent of NXV was to develop an extension of MWU that is more exact, inspired by Fisher's Exact test's exactness over Chi-Squared. As explained in a textbook on “Essential Statistics,” Fisher's is exact but not always available because the calculation is “tedious” [18]. Until NXV, the exact assessment of MWU with no tied elements, which is pNXVλ0, had been similarly more laborious than the normal approximation. But the λ0 subset of MWU can now be calculated using factorials, or addition for the total and napkin-shifting for the tail. NXV thus aspires to greater exactitude without tedium for the clinician.

There are limitations, as with any method. Firstly, regarding 𝔼λ[main:max], perhaps the assumptions of constancy of λ, and independence of tied elements in the null distribution are open to criticism. There are two responses that occur. Some other author may cogently suggest a “better” 𝔼 to describe tied elements. This might be something other than based on Poisson, for example, hypergeometric or negative binomial null distributions. That new 𝔼′ could still be a bridge to path lengths, giving a new ℚ′. In that context, the innovations of tied slopes and stq-distributions still stand and can be used.

However, to the present author, the two assumptions of the constancy of lambda and the independence of tied elements are supported, having been argued for above. If a given population breaches them, this may be part of the process that is the thing under study. In simulations, the distribution of actual samples of U-scores was usually different from the null, especially where an effect was coded in, such as the increments of 0, 1, 2, 4, 8 to the integer series.

The increased computational demand of allowing ties stops calculation at about s10t10 on a domestic computer. There is a some computational efficiency to be gained yet. Some principles of this are discussed below in a section regarding future work. The point of the current article was not a perfect tool but rather proof of principle. Multi-threading alone, i.e., the use of multiple cores, will bring increases because each stq problem can be tackled in parallel.

NXV, despite any claimed benefits, may not change the quality of analysis. No amount of exactitude can help incomplete data, which is characteristic of restraint data both nationally in England and internationally [1, 19]. Ironically, an attempt to exactly quantify incompleteness of restraint data, using MWU, by the present author, was the spur to trying to extend MWU [20]. Even if analysis were perfect, the causes of unnecessary restraint, especially among women, partly rest in wider societal issues which an individual analyst may find difficult to change, no matter how exact and complete their data analysis is.

4 Conclusion

This manuscript offers proof of principle of NXV. NXV is proposed as a new extension of MWU so that small groups of clinical data, which may be tied, can be exactly compared. It has been argued that this is of relevance where r is small, especially in minority groups or for women. Though NXV was developed in medicine, it may be generalizable. It is hoped that the visual methods make the NXV method interesting and understandable in order to apply this test in clinical practice.

There are several possible future directions. Firstly, the author hopes these methods can help protect human rights by being part of the restraint reduction effort, which seems prone to small data and tied data. Secondly, NXV may be generalized across any samples of two groups that require analysis of order, perhaps due to not being approximately normally distributed. Thirdly, from fellow clinicians and clinical researchers, the present author invites them to re-examine data sets that are tied or small, especially if they were close to significance and featured ties. It has not been possible to establish what proportion of the tens of thousands of citations of MWU featured ties, but there may be utility in NXV, which handles tied elements, if even a fraction could benefit.

To applied statisticians, NXV is offered, including the present methods, and the underlying source code, which exists in Python, Julia, R, and Libre Office, available on request in an open-source spirit. It exists in an application written by the present author, which was very helpful for writing the article. The present author hopes to push the algorithm to major languages soon and also to self-host an online web application. To software developers and mathematicians, NXV offers routes to further efficiencies in lattice combinatorics, which are not made out here but are to some extent broached in gray literature, such as a doctoral thesis, which is soon to be published under creative commons by the university, though the present data are new. These include super-curves and cellular automata to generate all corner paths of any s, t, q so that an easy tail can be calculated. These are visually appealing and intuitive, but space does not allow them here.

Data availability statement

The datasets presented in this study can be found in online repositories. The names of the repository/repositories and accession number(s) can be found below: they are clearly stated in line in the text as you will see.

Author contributions

KR: Writing – original draft, Writing – review & editing.

Funding

The author(s) declared that financial support was received for this work and/or its publication. This work was done during a self funded part-time doctorate while working as a psychiatrist.

Acknowledgments

KR acknowledges the support of Professor Peter McMeekin and Associate Professor Michael Hill of Northumbria University at Newcastle who supervised his PhD, and for graciously allowing him to continue this project as a monograph. He also acknowledges the scholarly encouragement of Dr Alessandro Di Bucchianico of Eindhoven University of Technology, who sadly died before the thesis or this paper could be sent to him.

Conflict of interest

The author declares that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Generative AI statement

The author(s) declare that no Gen AI was used in the creation of this manuscript.

Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.

Publisher's note

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.

Supplementary material

The Supplementary Material for this article can be found online at: https://www.frontiersin.org/articles/10.3389/fams.2025.1640488/full#supplementary-material

References

1. Reid K, Price O. PROD-ALERT: Psychiatric restraint open data-analysis using logarithmic estimates on reporting trends. Front Digit Health. (2022) 4:945635. doi: 10.3389/fdgth.2022.945635

PubMed Abstract | Crossref Full Text | Google Scholar

2. NLM U. PubMed Central (PMC). Bethesda (MD): National Center for Biotechnology Information (2000). Available online at: https://www.ncbi.nlm.nih.gov/pmc/ (Accessed April 11, 2024).

Google Scholar

3. Mann HB, Whitney DR. On a test of whether one of two random variables is stochastically larger than the other. Ann Mathem Statist. (1947) 18:50–60. doi: 10.1214/aoms/1177730491

Crossref Full Text | Google Scholar

4. Upton GJG, Cook I. A Dictionary of Statistics. 3rd ed. Oxford paperback reference Oxford: Oxford University Press. (2014).

Google Scholar

5. McGee M. Case for omitting tied observations in the two-sample t-test and the Wilcoxon-Mann-Whitney Test. PLoS ONE. (2018) 13:e0200837. doi: 10.1371/journal.pone.0200837

PubMed Abstract | Crossref Full Text | Google Scholar

6. Neuhäuser M, Ruxton GD. A note on the Wilcoxon-Mann-Whitney test and tied observations. PLoS ONE. (2024) 19:1–6. doi: 10.1371/journal.pone.0309074

PubMed Abstract | Crossref Full Text | Google Scholar

7. Lowry R. Mann Whitney U. Poughkeepsie, NY, USA (2022). Available online at: http://www.vassarstats.net/utest.html (Accessed December 12, 2025).

Google Scholar

8. Borowski J, Borwein JM. Mathematics. 2nd ed. Collins Dictionary of London, England: Collins. (2002).

Google Scholar

9. Abderhalden C, Needham I, Miserez B, Almvik R, Dassen T, Haug HJ, et al. Predicting inpatient violence in acute psychiatric wards using the Broset-Violence-Checklist: a multicentre prospective cohort study. J Psychiatr Ment Health Nurs. (2004) 11:422–7. doi: 10.1111/j.1365-2850.2004.00733.x

Crossref Full Text | Google Scholar

10. Busner J, Targum SD. The clinical global impressions scale: applying a research tool in clinical practice. Psychiatry. (2007) 4:28–37.

PubMed Abstract | Google Scholar

11. Lewis SJ, Heaton KW. Stool form scale as a useful guide to intestinal transit time. Scand J Gastroenterol. (1997) 32:920–4. doi: 10.3109/00365529709011203

PubMed Abstract | Crossref Full Text | Google Scholar

12. Bucchianico AD. Combinatorics, computer algebra and the Wilcoxon-Mann-Whitney test. J Stat Plan Inference. (1999) 79:349–64. doi: 10.1016/S0378-3758(98)00261-4

Crossref Full Text | Google Scholar

13. Knuth DE. The Art of Computer Programming. Upper Saddle River, NJ: Addison-Wesley. (2005).

Google Scholar

14. Stanley RP. Cambridge Studies in Advanced Mathematics Enumerative Combinatorics. 2nd ed. Cambridge, England: Cambridge University Press. (2011).

Google Scholar

15. Reid KS. Online Encyclopedia of Integer Series A362242 Triangle read by rows: T(n,k) is the number of lattice paths from (0,0) to (k,n-k) using steps (i,j) with i,j gte 0 and gcd(i,j)=1; 2023. Downloaded May 20 2024 vanity name: McMeekin Hill. Available online at: https://oeis.org/A362242 (Accessed December 12, 2025).

Google Scholar

16. Reid K. McMeekin Hill: A new triangle, like Pascal's, bijectively enumerates all paths across any lattice which allows diagonals. GitHub. (2023). Available online at: https://github.com/keithreid-sfw/McMeekinHillDiagonalsLattice/blob/main/Reid_McMeekinHill_DiagonalLattice_Enumeration.pdf (Accessed December 12, 2025).

Google Scholar

17. Morris TP, White IR, Crowther MJ. Using simulation studies to evaluate statistical methods. Stat Med. (2019) 38:2074–102. doi: 10.1002/sim.8086

PubMed Abstract | Crossref Full Text | Google Scholar

18. Rees DG. Essential Statistics. 4th ed. Texts in statistical science Philadelphia, PA: Chapman & Hall/CRC. (2000).

Google Scholar

19. Savage MK, Lepping P, Newton-Howes G, Arnold R, Staggs VS, Kisely S, et al. Comparison of coercive practices in worldwide mental healthcare: overcoming difficulties resulting from variations in monitoring strategies. BJPsych Open. (2024) 10:e26. doi: 10.1192/bjo.2023.613

PubMed Abstract | Crossref Full Text | Google Scholar

20. Reid K, Price O. PROD-ALERT 2: replicating and extending psychiatric restraint open data analysis using logarithmic estimates of reporting trends. Front Psychiatry. (2024) 15:1325142. doi: 10.3389/fpsyt.2024.1325142

PubMed Abstract | Crossref Full Text | Google Scholar

Keywords: algorithm, combinatorics, exact, Mann-Whitney U, ordinal, rating scales, non-parametric, Wilcoxon

Citation: Reid K (2026) Node-crossing vectors (“NXV”) feasibly extends Mann Whitney U to handle ties and small samples for clinical rating scales. Front. Appl. Math. Stat. 11:1640488. doi: 10.3389/fams.2025.1640488

Received: 04 June 2025; Revised: 09 November 2025;
Accepted: 28 November 2025; Published: 12 January 2026.

Edited by:

Zakariya Yahya Algamal, University of Mosul, Iraq

Reviewed by:

Naveen Bansal, Marquette University, United States
Mahmood M. Taher, Amirkabir University of Technology, Iran

Copyright © 2026 Reid. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

*Correspondence: Keith Reid, a2VpdGgucmVpZEBjbnR3Lm5ocy51aw==

ORCID: Keith Reid orcid.org/0000-0002-0280-9183

Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.