USArmy-Corps-of-Engineers-RMC / Numerics

Numerics is a free and open-source library for .NET developed by USACE-RMC, providing a comprehensive set of methods and algorithms for numerical computations and statistical analysis.
Other
20 stars 2 forks source link

Test_Statistics - RanksInplace(values, out ties) returning tie values that don't match up #69

Closed sadie-niblett closed 3 months ago

sadie-niblett commented 3 months ago

I've been testing the RanksInplace() method from the Statistic class. The overloaded method that returns the ties is confusing me. In the vector of data I'm using there are 10 repeated values. But, the number of ties the method is returning, does not line up with the number of occurrences. From what I understand, 2 occurrences would equal 1 tie, 3 occurrences would mean 2 ties, and so on. Even if this understanding it wrong, the method is still returning a different number of ties for a value with the same number of occurrences in the data. I've listed what the method is given in the number of occurrences in the vector of each number and the number of ties it is returning. If this these values are correct, then I don't understand the method and need help on how to test it.

161: 3 occurrences - 2 ties 164: 3 occurrences - 4 ties 172: 2 occurrences - 1 tie 173: 3 occurrences - 3 ties 174: 2 occurrences - 4 ties 183: 3 occurrences - 2 ties 192: 2 occurrences - 1 ties 205: 2 occurrences - 1 ties 230: 2 occurrences - 1 tie 262: 2 occurrences - 1 tie

HadenSmith commented 3 months ago

This should be fixed now.