class StatsampleStratifiedTestCase

Public Class Methods

new(*args) click to toggle source
Calls superclass method
# File pkg/statsample-1.4.0/test/test_stratified.rb, line 5
def initialize(*args)
  super
end

Public Instance Methods

test_mean() click to toggle source
# File pkg/statsample-1.4.0/test/test_stratified.rb, line 8
def test_mean
  a=[10,20,30,40,50]
  b=[110,120,130,140]
  pop=a+b
  av=a.to_vector(:scale)
  bv=b.to_vector(:scale)
  popv=pop.to_vector(:scale)
  assert_equal(popv.mean,Statsample::StratifiedSample.mean(av,bv))
end