We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d879bb8 + 3a98c27 commit 4cfaf30Copy full SHA for 4cfaf30
sample.html
@@ -70,14 +70,12 @@
70
},
71
};
72
73
- const normalCDF = (x) => 0.5 * (1 + erf(x / Math.sqrt(2)));
74
-
75
- const erf = (x) => {
76
- const a1 = 0.254829592;
77
- const a2 = -0.284496736;
78
- const a3 = 1.421413741;
79
- const a4 = -1.453152027;
80
- const a5 = 1.061405429;
+ const erf = (x) => {
+ const a1 = 0.254829592;
+ const a2 = -0.284496736;
+ const a3 = 1.421413741;
+ const a4 = -1.453152027;
+ const a5 = 1.061405429;
81
const p = 0.3275911;
82
83
const sign = x >= 0 ? 1 : -1;
@@ -92,6 +90,8 @@
92
90
return sign * y;
93
91
94
+ const normalCDF = (x) => 0.5 * (1 + erf(x / Math.sqrt(2)));
+
95
const calculatePower = (n1, n2, p1, p2) => {
96
const pooledP = (n1 * p1 + n2 * p2) / (n1 + n2);
97
const se1 = Math.sqrt(
0 commit comments