num4hypothtst 0.0.6-java → 0.0.8-java
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/ext/num4hypothtst/hypothtst/GrubbsTest.java +1 -1
- data/ext/num4hypothtst/hypothtst/HypothTest3.java +12 -1
- data/ext/num4hypothtst/hypothtst/LeftSideTest.java +0 -9
- data/ext/num4hypothtst/hypothtst/RightSideTest.java +0 -9
- data/ext/num4hypothtst/hypothtst/TwoSideTest.java +0 -9
- 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: 6fc407e7a2b8d23bf305336589d7972fb385a05db4206f8a1dcd2563a75c6224
|
4
|
+
data.tar.gz: a45a13973de63bc6c33161d803baeeb6b0ba4045e0c77948fdb5318072d85535
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4318be0f0e48efc8bf3dea3b7d0ee08aab495773a3e1c46b55e727fea5e75e209629225e18e1b822787a24cd407744ee50a73a3b7adf71548557cc449dff38d
|
7
|
+
data.tar.gz: 3bcaf4b93a670104913b0d5b338515c89d71f553202a3cac0217a50c25deb7768c229dc2dae46ca6944bbb7a9b677c5565f621810b654b1f55d6faf863384794
|
data/CHANGELOG.md
CHANGED
@@ -17,7 +17,7 @@ public class GrubbsTest implements HypothTest2 {
|
|
17
17
|
}
|
18
18
|
|
19
19
|
private double calcGnValue(int n, double a) {
|
20
|
-
TDistribution tDist = new TDistribution(n);
|
20
|
+
TDistribution tDist = new TDistribution(n - 2);
|
21
21
|
double t = tDist.inverseCumulativeProbability(a / n);
|
22
22
|
double gn = (n - 1) * t / Math.sqrt(n * (n - 2 + t * t));
|
23
23
|
|
@@ -7,6 +7,17 @@ interface HypothTest3 {
|
|
7
7
|
boolean normDistTest(double statistic, double a);
|
8
8
|
boolean fDistTest(double statistic, double nf, double df, double a);
|
9
9
|
|
10
|
-
boolean populationCorre(double r, int n, double rth0, double a)
|
10
|
+
default boolean populationCorre(double r, int n, double rth0, double a) {
|
11
|
+
return normDistTest(populaCorrStatistic(r, n, rth0), a);
|
12
|
+
}
|
13
|
+
private double populaCorrStatistic(double r, int n, double rth0) {
|
14
|
+
double statistic = Math.sqrt(n-3.0) *
|
15
|
+
(
|
16
|
+
0.5 * Math.log((1.0 + r) / (1.0 - r))
|
17
|
+
- 0.5 * Math.log((1.0 + rth0) / (1.0 - rth0))
|
18
|
+
);
|
19
|
+
|
20
|
+
return statistic;
|
21
|
+
}
|
11
22
|
}
|
12
23
|
|
@@ -35,15 +35,6 @@ public class LeftSideTest implements HypothTest3 {
|
|
35
35
|
|
36
36
|
return evaluation(statistic, l_val);
|
37
37
|
}
|
38
|
-
public boolean populationCorre(double r, int n, double rth0, double a) {
|
39
|
-
double statistic = Math.sqrt(n-3.0) *
|
40
|
-
(
|
41
|
-
0.5 * Math.log((1.0 + r) / (1.0 - r))
|
42
|
-
- 0.5 * Math.log((1.0 + rth0) / (1.0 - rth0))
|
43
|
-
);
|
44
|
-
|
45
|
-
return normDistTest(statistic, a);
|
46
|
-
}
|
47
38
|
|
48
39
|
private boolean evaluation(double statistic, double l_val) {
|
49
40
|
boolean ret = true;
|
@@ -34,15 +34,6 @@ public class RightSideTest implements HypothTest3 {
|
|
34
34
|
|
35
35
|
return evaluation(statistic, r_val);
|
36
36
|
}
|
37
|
-
public boolean populationCorre(double r, int n, double rth0, double a) {
|
38
|
-
double statistic = Math.sqrt(n-3.0) *
|
39
|
-
(
|
40
|
-
0.5 * Math.log((1.0 + r) / (1.0 - r))
|
41
|
-
- 0.5 * Math.log((1.0 + rth0) / (1.0 - rth0))
|
42
|
-
);
|
43
|
-
|
44
|
-
return normDistTest(statistic, a);
|
45
|
-
}
|
46
37
|
|
47
38
|
private boolean evaluation(double statistic, double r_val) {
|
48
39
|
boolean ret = true;
|
@@ -39,15 +39,6 @@ public class TwoSideTest implements HypothTest3 {
|
|
39
39
|
|
40
40
|
return evaluation(statistic, l_val, r_val);
|
41
41
|
}
|
42
|
-
public boolean populationCorre(double r, int n, double rth0, double a) {
|
43
|
-
double statistic = Math.sqrt(n-3.0) *
|
44
|
-
(
|
45
|
-
0.5 * Math.log((1.0 + r) / (1.0 - r))
|
46
|
-
- 0.5 * Math.log((1.0 + rth0) / (1.0 - rth0))
|
47
|
-
);
|
48
|
-
|
49
|
-
return normDistTest(statistic, a);
|
50
|
-
}
|
51
42
|
|
52
43
|
private boolean evaluation(double statistic, double l_val, double r_val) {
|
53
44
|
boolean ret = true;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: num4hypothtst
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- siranovel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|