File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
lib/node_modules/@stdlib/stats/base/variancetk/lib Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -27,19 +27,18 @@ var ndarray = require( './ndarray.js' );
27
27
// MAIN //
28
28
29
29
/**
30
- * Computes the variance of a strided array.
30
+ * Computes the variance of a strided array using a one-pass textbook algorithm .
31
31
*
32
32
* @param {PositiveInteger } N - number of indexed elements
33
- * @param {PositiveInteger } correction - degrees of freedom adjustment
33
+ * @param {number } correction - degrees of freedom adjustment
34
34
* @param {NumericArray } x - input array
35
35
* @param {integer } strideX - stride length
36
36
* @returns {number } variance
37
37
*
38
38
* @example
39
39
* var x = [ 1.0, -2.0, 2.0 ];
40
- * var N = x.length;
41
40
*
42
- * var v = variancetk( N , 1, x, 1 );
41
+ * var v = variancetk( x.length , 1, x, 1 );
43
42
* // returns ~4.3333
44
43
*/
45
44
function variancetk ( N , correction , x , strideX ) {
You can’t perform that action at this time.
0 commit comments