ruby-statistics 3.0.1 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +3 -3
- data/lib/statistics/statistical_test/t_test.rb +7 -3
- data/lib/statistics/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5708aa695b3da8169acd11eade4bd66fb882176031dcb246217c25a8f07bfa66
|
4
|
+
data.tar.gz: 85e85043d9ff86f5b87fd9bd5fb0d447682919f4a2ad9bd6925c88efc62885f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c950d0983e6184e6372b0f4e1ba3306826b7260900062c44a3dad08cdbfbd7b2835b8df0f5974e1a89ae360efcda633e34c667d2b32aee743a5163d665075789
|
7
|
+
data.tar.gz: b04fe969caca5709430c7e5a213cbc5396359c49c42829d4f678266d7f207ce051d552a3820ff511198128c8f4ac3b5c7c2f4037664c225fdeed6830e3650d2a
|
data/.github/workflows/ruby.yml
CHANGED
@@ -10,7 +10,7 @@ jobs:
|
|
10
10
|
steps:
|
11
11
|
- uses: actions/checkout@v3
|
12
12
|
- name: Set up Ruby 3.1
|
13
|
-
uses: ruby/setup-ruby@v1.
|
13
|
+
uses: ruby/setup-ruby@v1.146.0
|
14
14
|
with:
|
15
15
|
ruby-version: 3.1.2
|
16
16
|
- name: Build and test with Rake
|
@@ -26,7 +26,7 @@ jobs:
|
|
26
26
|
steps:
|
27
27
|
- uses: actions/checkout@v3
|
28
28
|
- name: Set up Ruby 2.7
|
29
|
-
uses: ruby/setup-ruby@v1.
|
29
|
+
uses: ruby/setup-ruby@v1.146.0
|
30
30
|
with:
|
31
31
|
ruby-version: 2.7.6
|
32
32
|
- name: Build and test with Rake
|
@@ -42,7 +42,7 @@ jobs:
|
|
42
42
|
steps:
|
43
43
|
- uses: actions/checkout@v3
|
44
44
|
- name: Set up Ruby 3.0
|
45
|
-
uses: ruby/setup-ruby@v1.
|
45
|
+
uses: ruby/setup-ruby@v1.146.0
|
46
46
|
with:
|
47
47
|
ruby-version: 3.0.4
|
48
48
|
- name: Build and test with Rake
|
@@ -74,10 +74,14 @@ module Statistics
|
|
74
74
|
|
75
75
|
t_score = (differences.mean - 0)/down.to_r
|
76
76
|
|
77
|
-
|
77
|
+
t_distribution = Distribution::TStudent.new(degrees_of_freedom)
|
78
|
+
probability = t_distribution.cumulative_function(t_score)
|
78
79
|
|
79
|
-
p_value =
|
80
|
-
|
80
|
+
p_value = if tails == :two_tail
|
81
|
+
2 * (1 - t_distribution.cumulative_function(t_score.abs))
|
82
|
+
else
|
83
|
+
1 - probability
|
84
|
+
end
|
81
85
|
|
82
86
|
{ t_score: t_score,
|
83
87
|
probability: probability,
|
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: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- esteban zapata
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|