require 'statsample'
Statsample::Analysis.store(Statsample::Test::UMannWhitney) do
a = Daru::Vector.new(10.times.map {rand(100)})
b = Daru::Vector.new(20.times.map {(rand(20))**2+50})
u=Statsample::Test::UMannWhitney.new(a,b)
summary u
end
Statsample::Analysis.run_batch
Analysis 2016-03-26 02:37:49 +0000 = Statsample::Test::UMannWhitney == Mann-Whitney's U Mann-Whitney's U results +--------------------------------------+-------------------+ | Sum of ranks | 81.000 | | Sum of ranks | 384.000 | | U Value | 26.000 | | Z | -3.258 (p: 0.001) | | Exact p (Dinneen & Blakesley, 1973): | 0.001 | +--------------------------------------+-------------------+