Sha256: 01921f536fa3bec7339dfcc8df03286ba23954537e11fa9d4ae97ebdce40328e

Contents?: true

Size: 432 Bytes

Versions: 6

Compression:

Stored size: 432 Bytes

Contents

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

class StatsampleStratifiedTestCase < Minitest::Test
  def initialize(*args)
    super
  end

  def test_mean
    a = [10, 20, 30, 40, 50]
    b = [110, 120, 130, 140]
    pop = a + b
    av   = Daru::Vector.new(a)
    bv   = Daru::Vector.new(b)
    popv = Daru::Vector.new(pop)
    assert_equal(popv.mean, Statsample::StratifiedSample.mean(av, bv))
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
statsample-ekatena-2.0.2.1 test/test_stratified.rb
statsample-ekatena-2.0.2 test/test_stratified.rb
statsample-2.1.0 test/test_stratified.rb
statsample-2.0.2 test/test_stratified.rb
statsample-2.0.1 test/test_stratified.rb
statsample-2.0.0 test/test_stratified.rb