rubystats 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,8 +6,8 @@ def get_lower_limit(trials,alpha,p)
6
6
  lcl=0
7
7
  else
8
8
  q=trials-p+1
9
- bin= BetaDistribution.new(p,q)
10
- lcl=bin.inverse_cdf(alpha)
9
+ bet= BetaDistribution.new(p,q)
10
+ lcl=bet.icdf(alpha)
11
11
  end
12
12
  return lcl
13
13
  end
@@ -15,8 +15,8 @@ end
15
15
  def get_upper_limit(trials,alpha,p)
16
16
  q=trials-p
17
17
  p=p+1
18
- bin= BetaDistribution.new(p,q)
19
- ucl=bin.inverse_cdf(1-alpha)
18
+ bet= BetaDistribution.new(p,q)
19
+ ucl=bet.icdf(1-alpha)
20
20
  return ucl
21
21
  end
22
22
 
@@ -13,7 +13,7 @@ f = f - 1
13
13
  for i in 1..5
14
14
  pdf = bin.pdf(i)
15
15
  cdf = bin.cdf(i)
16
- inv = bin.inverse_cdf(cdf)
16
+ inv = bin.icdf(cdf)
17
17
  puts inv
18
18
  puts "#{i}: #{pdf} : #{cdf}"
19
19
  end
@@ -15,7 +15,7 @@ class TestBinomial < Test::Unit::TestCase
15
15
  inv_cdf = bin.icdf(cdf)
16
16
 
17
17
  assert_equal("0.10602553736479",pdf.to_s)
18
- assert_equal("0.872039521379601",cdf.to_s)
18
+ assert_equal("0.87203952137960", cdf.to_s[0,16])
19
19
  assert_equal("5.0",mean.to_s)
20
20
  assert_equal(f,inv_cdf)
21
21
  end
metadata CHANGED
@@ -1,15 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.11
2
+ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: rubystats
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.1
7
- date: 2006-01-18 00:00:00 -08:00
8
- summary: "Classes for statistical calculations, e.g., binomial, beta, and normal
9
- distributions with PDF, CDF and inverse CDF (all ported from PHPMath) as well as
10
- Fisher's Exact Test"
6
+ version: 0.1.2
7
+ date: 2007-05-18 00:00:00 -07:00
8
+ summary: Classes for statistical calculations, e.g., binomial, beta, and normal distributions with PDF, CDF and inverse CDF (all ported from PHPMath) as well as Fisher's Exact Test
11
9
  require_paths:
12
- - lib
10
+ - lib
13
11
  email: Bryandonovan@myrealbox.com
14
12
  homepage: http://www.bryandonovan.com
15
13
  rubyforge_project:
@@ -20,42 +18,47 @@ bindir: bin
20
18
  has_rdoc: true
21
19
  required_ruby_version: !ruby/object:Gem::Version::Requirement
22
20
  requirements:
23
- -
24
- - ">"
25
- - !ruby/object:Gem::Version
26
- version: 0.0.0
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
27
24
  version:
28
25
  platform: ruby
29
26
  signing_key:
30
27
  cert_chain:
28
+ post_install_message:
31
29
  authors:
32
- - Bryan Donovan
30
+ - Bryan Donovan
33
31
  files:
34
- - lib/beta_distribution.rb
35
- - lib/binomial_distribution.rb
36
- - lib/fishers_exact_test.rb
37
- - lib/normal_distribution.rb
38
- - lib/probability_distribution.rb
39
- - lib/modules
40
- - lib/modules/special_math.rb
41
- - lib/modules/extra_math.rb
42
- - lib/modules/numerical_constants.rb
43
- - tests/tc_beta.rb
44
- - tests/tc_fisher.rb
45
- - tests/tc_binomial.rb
46
- - tests/ts_stats.rb
47
- - tests/tc_norm.rb
48
- - examples/fisher.rb
49
- - examples/binomial.rb
50
- - examples/norm.rb
51
- - examples/beta.rb
52
- - README
32
+ - lib/beta_distribution.rb
33
+ - lib/binomial_distribution.rb
34
+ - lib/fishers_exact_test.rb
35
+ - lib/modules
36
+ - lib/normal_distribution.rb
37
+ - lib/probability_distribution.rb
38
+ - lib/modules/extra_math.rb
39
+ - lib/modules/numerical_constants.rb
40
+ - lib/modules/special_math.rb
41
+ - tests/tc_beta.rb
42
+ - tests/tc_binomial.rb
43
+ - tests/tc_fisher.rb
44
+ - tests/tc_norm.rb
45
+ - tests/ts_stats.rb
46
+ - examples/beta.rb
47
+ - examples/binomial.rb
48
+ - examples/fisher.rb
49
+ - examples/norm.rb
50
+ - README
53
51
  test_files:
54
- - tests/ts_stats.rb
52
+ - tests/ts_stats.rb
55
53
  rdoc_options: []
54
+
56
55
  extra_rdoc_files:
57
- - README
56
+ - README
58
57
  executables: []
58
+
59
59
  extensions: []
60
+
60
61
  requirements: []
61
- dependencies: []
62
+
63
+ dependencies: []
64
+