ruby-statistics 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/statistics/statistical_test/t_test.rb +5 -3
- data/lib/statistics/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 4e37b06e60f8045e0517cb48260ad5d70edab41d
|
4
|
+
data.tar.gz: f5152b5bdbb02c8bc3dd423a52d4dfd9f267e16f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e81155507b0c78cb1211faa7b7d0b3fab0dd9db8e1f8b5449e20211ed9d6cbc5fa6735649a24136a7013740fad19e39b772fb44ecfc5b2acfafafd576b738797
|
7
|
+
data.tar.gz: f5e693b125d372ee7af3e2f2a84c180608b7141087da6c5cf6bce6db4f5d46843ff01383dda27878ebd3b9ea30251ff1c650d0fbccfd5738cddd98c0f298e6ed
|
@@ -36,14 +36,15 @@ module Statistics
|
|
36
36
|
|
37
37
|
standard_error = Math.sqrt(left_root + right_root)
|
38
38
|
|
39
|
-
(sample_left_mean - sample_right_mean)/standard_error.to_f
|
39
|
+
(sample_left_mean - sample_right_mean).abs/standard_error.to_f
|
40
40
|
end
|
41
41
|
|
42
42
|
probability = Distribution::TStudent.new(degrees_of_freedom).cumulative_function(t_score)
|
43
43
|
p_value = 1 - probability
|
44
44
|
p_value *= 2 if tails == :two_tail
|
45
45
|
|
46
|
-
{
|
46
|
+
{ t_score: t_score,
|
47
|
+
probability: probability,
|
47
48
|
p_value: p_value,
|
48
49
|
alpha: alpha,
|
49
50
|
null: alpha < p_value,
|
@@ -71,7 +72,8 @@ module Statistics
|
|
71
72
|
p_value = 1 - probability
|
72
73
|
p_value *= 2 if tails == :two_tail
|
73
74
|
|
74
|
-
{
|
75
|
+
{ t_score: t_score,
|
76
|
+
probability: probability,
|
75
77
|
p_value: p_value,
|
76
78
|
alpha: alpha,
|
77
79
|
null: alpha < p_value,
|
data/lib/statistics/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-statistics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- esteban zapata
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -173,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
173
173
|
version: '0'
|
174
174
|
requirements: []
|
175
175
|
rubyforge_project:
|
176
|
-
rubygems_version: 2.
|
176
|
+
rubygems_version: 2.5.2.1
|
177
177
|
signing_key:
|
178
178
|
specification_version: 4
|
179
179
|
summary: A ruby gem for som specific statistics. Inspired by the jStat js library.
|