Sha256: cae3d7b9536a1332fd1900bd734138ffce95e3e822122fbfe63fac5d1547aae6

Contents?: true

Size: 554 Bytes

Versions: 3

Compression:

Stored size: 554 Bytes

Contents

require File.expand_path(File.dirname(__FILE__)+"/spec_helper.rb")

include ExampleWithGSL

describe Distribution::Weibull do

	 #shared_examples for "Weibull engine" do
	        it "should return correct pdf" do
		   Distribution::Weibull::pdf(2, 1, 1).should be_within(1e-3).of(0.13533)
		end
	 	it "should return correct cdf" do 
		   Distribution::Weibull::cdf(2, 1, 1).should be_within(1e-3).of(0.86466)
		end
		it "should return correct p-value" do 
		   Distribution::Weibull::p_value(0.86466, 1, 1).should be_within(1e-3).of(2.0)
		end
	 #end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
distribution-0.7.3 spec/weibull_spec.rb
distribution-0.7.2 spec/weibull_spec.rb
distribution-0.7.1 spec/weibull_spec.rb