Sha256: 121a1c58b8bef9cedf2f17e4134fb47972e986ba706fb694d9930ef791cbd5cf

Contents?: true

Size: 396 Bytes

Versions: 13

Compression:

Stored size: 396 Bytes

Contents

require(File.dirname(__FILE__)+'/helpers_tests.rb')


class StatsampleStratifiedTestCase < MiniTest::Unit::TestCase

  def initialize(*args)
    super
  end
  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
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
statsample-0.18.0 test/test_stratified.rb
statsample-0.17.0 test/test_stratified.rb
statsample-0.16.0 test/test_stratified.rb
statsample-0.15.1 test/test_stratified.rb
statsample-0.15.0 test/test_stratified.rb
statsample-0.14.1 test/test_stratified.rb
statsample-0.14.0 test/test_stratified.rb
statsample-0.13.1 test/test_stratified.rb
statsample-0.13.0 test/test_stratified.rb
statsample-0.12.0 test/test_stratified.rb
statsample-0.11.2 test/test_stratified.rb
statsample-0.11.1 test/test_stratified.rb
statsample-0.11.0 test/test_stratified.rb