descriptive-statistics 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- checksums.yaml.gz.sig +2 -4
- data.tar.gz.sig +1 -1
- data/lib/descriptive-statistics/shape.rb +5 -3
- data/lib/descriptive-statistics/spread.rb +6 -3
- data/lib/descriptive-statistics/version.rb +1 -1
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YWY0OGUwNGYzMTE4YmZkOWUzNjllZWJlMmVmMjhkYmZkZjU4MDJmZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzhkNjZlNGY2ODY4OTQ3Njk4ODUwNzlkMDZhNTYwY2I0NzU1ZGRlYg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZjIxNDBlODY2ZmIyODY2ZWUwNTc1YzA5OGY1YmVkYmUxN2M2OTE5N2NjYTk4
|
10
|
+
ZTlhYTMxN2M4NDUyYTEyODMxMjJhZmZlMGVmODk3OWRiMzU2MTg2YzBmMWQ3
|
11
|
+
MTRkYzM4ZTJjNzZkMmJkZTRkOTNmMDY4YzEwYTU2NzNhNWY2MjA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NDBjOWVlMTEwODE2NWRiOTIwMTdmODI5MzZlNzIxNjE3ZmQ4NDc1YmM1YWE1
|
14
|
+
MTFmNzA2ZDVkMGQwMGMwMzAzZmU0ZjhiMDRhNmViNWIxYTRlMTBkN2RlYjEw
|
15
|
+
Mjg4NTg2NGEyOTQ1MWExNGM5ODE1MjMyNGU3YjZlNmY3OGViZWU=
|
checksums.yaml.gz.sig
CHANGED
@@ -1,4 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
B���l����
|
4
|
-
�H�0l#�����8"l�{��&�.Y�v5y���{�����-{Z����b}�����%��m˱�����ǢU����*��?�n�%�<ߤt����^��J�L�6�Z���K¡L�v_ƭP� ��=Y�����`���h��QGGp
|
1
|
+
`��
|
2
|
+
�fK���2�DZ#0�����p���^6��+�.�s�����~�=���X�����$P��.�3}��؟[��m/�Y�Ŗ���oF���GJdܢ�U;��а�Ĵ�hIoF�,NF�ߞ�3��қ�&�$���sI2�гi��4wG��� CaF��fy�7�(T�
|
data.tar.gz.sig
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
�.,�Az�G̀�WϢ����Rb�va�<���r���2cպ��S� b�{���x�����ıI���*j#<�PS���$ [��H:(�=#5�Y6c_�1��_�6���i��P|��9�s�lj�8��:O�_�hY�ϔ0`(es�S#��Oh�:͛�&o���b��!ٷ�;�����ߔ^o���pG�#��Y���q:svm!(�w�.7M�<;�Y.+i8�S�F�se\���t��fU^��
|
@@ -16,7 +16,8 @@ module DescriptiveStatistics
|
|
16
16
|
private
|
17
17
|
|
18
18
|
def sum_cubed_deviation
|
19
|
-
|
19
|
+
precalculated_mean = mean
|
20
|
+
inject(0) {|sum, value| sum + (value - precalculated_mean) ** 3}
|
20
21
|
end
|
21
22
|
|
22
23
|
def cubed_standard_deviation
|
@@ -24,7 +25,8 @@ module DescriptiveStatistics
|
|
24
25
|
end
|
25
26
|
|
26
27
|
def sum_quarted_deviation
|
27
|
-
|
28
|
+
precalculated_mean = mean
|
29
|
+
inject(0) {|sum, value| sum + (value - precalculated_mean) ** 4}
|
28
30
|
end
|
29
31
|
|
30
32
|
def quarted_standard_deviation
|
@@ -32,4 +34,4 @@ module DescriptiveStatistics
|
|
32
34
|
end
|
33
35
|
|
34
36
|
end
|
35
|
-
end
|
37
|
+
end
|
@@ -2,13 +2,15 @@ module DescriptiveStatistics
|
|
2
2
|
module Spread
|
3
3
|
def variance
|
4
4
|
return if length < 1
|
5
|
-
|
5
|
+
precalculated_mean = mean
|
6
|
+
sum = self.inject(0) {|accumulator, value| accumulator + (value - precalculated_mean) ** 2 }
|
6
7
|
sum / (length.to_f - 1)
|
7
8
|
end
|
8
9
|
|
9
10
|
def population_variance
|
10
11
|
return if length < 1
|
11
|
-
|
12
|
+
precalculated_mean = mean
|
13
|
+
sum = self.inject(0) {|accumulator, value| accumulator + (value - precalculated_mean) ** 2 }
|
12
14
|
sum / length.to_f
|
13
15
|
end
|
14
16
|
|
@@ -19,7 +21,8 @@ module DescriptiveStatistics
|
|
19
21
|
|
20
22
|
def relative_standard_deviation
|
21
23
|
return if length < 1
|
22
|
-
|
24
|
+
precalculated_mean = mean
|
25
|
+
(population_standard_deviation / precalculated_mean) * 100.0
|
23
26
|
end
|
24
27
|
|
25
28
|
def population_standard_deviation
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: descriptive-statistics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julian Tescher
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
V3NaK2F3dzJpU05DNVhGaEEvOHhzSzBCbHRZUkY5blAKSEE0MVV0RHhySmtI
|
36
36
|
TDNOMXo4Z1BNWFNyRlQ0MUZSMndnazgrbDE0UCs3ZzFVVFBpZDJFSXdmdDJ4
|
37
37
|
T2JGZUE9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
|
38
|
-
date: 2014-
|
38
|
+
date: 2014-03-21 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: rspec
|
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
144
|
version: '0'
|
145
145
|
requirements: []
|
146
146
|
rubyforge_project:
|
147
|
-
rubygems_version: 2.2.
|
147
|
+
rubygems_version: 2.2.2
|
148
148
|
signing_key:
|
149
149
|
specification_version: 4
|
150
150
|
summary: Simply calculate descriptive statistics such as measures of central tendency
|
metadata.gz.sig
CHANGED
Binary file
|