rubystats 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/examples/beta.rb +4 -4
- data/examples/binomial.rb +1 -1
- data/tests/tc_binomial.rb +1 -1
- metadata +37 -34
data/examples/beta.rb
CHANGED
@@ -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
|
-
|
10
|
-
lcl=
|
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
|
-
|
19
|
-
ucl=
|
18
|
+
bet= BetaDistribution.new(p,q)
|
19
|
+
ucl=bet.icdf(1-alpha)
|
20
20
|
return ucl
|
21
21
|
end
|
22
22
|
|
data/examples/binomial.rb
CHANGED
data/tests/tc_binomial.rb
CHANGED
@@ -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.
|
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.
|
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.
|
7
|
-
date:
|
8
|
-
summary:
|
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
|
-
|
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
|
-
|
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
|
-
|
30
|
+
- Bryan Donovan
|
33
31
|
files:
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
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
|
-
|
52
|
+
- tests/ts_stats.rb
|
55
53
|
rdoc_options: []
|
54
|
+
|
56
55
|
extra_rdoc_files:
|
57
|
-
|
56
|
+
- README
|
58
57
|
executables: []
|
58
|
+
|
59
59
|
extensions: []
|
60
|
+
|
60
61
|
requirements: []
|
61
|
-
|
62
|
+
|
63
|
+
dependencies: []
|
64
|
+
|