You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/stats/strided/dvarmpn/README.md
+17-17Lines changed: 17 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -98,7 +98,7 @@ The use of the term `n-1` is commonly referred to as Bessel's correction. Note,
98
98
var dvarmpn =require( '@stdlib/stats/strided/dvarmpn' );
99
99
```
100
100
101
-
#### dvarmpn( N, mean, correction, x, strideX )
101
+
#### dvarmpn( N, correction, mean, x, strideX )
102
102
103
103
Computes the [variance][variance] of a double-precision floating-point strided array provided a known `mean` and using Neely's correction algorithm.
104
104
@@ -107,15 +107,15 @@ var Float64Array = require( '@stdlib/array/float64' );
107
107
108
108
var x =newFloat64Array( [ 1.0, -2.0, 2.0 ] );
109
109
110
-
var v =dvarmpn( x.length, 1.0/3.0, 1, x, 1 );
110
+
var v =dvarmpn( x.length, 1, 1.0/3.0, x, 1 );
111
111
// returns ~4.3333
112
112
```
113
113
114
114
The function has the following parameters:
115
115
116
116
-**N**: number of indexed elements.
117
-
-**mean**: mean.
118
117
-**correction**: degrees of freedom adjustment. Setting this parameter to a value other than `0` has the effect of adjusting the divisor during the calculation of the [variance][variance] according to `N-c` where `c` corresponds to the provided degrees of freedom adjustment. When computing the [variance][variance] of a population, setting this parameter to `0` is the standard choice (i.e., the provided array contains data constituting an entire population). When computing the unbiased sample [variance][variance], setting this parameter to `1` is the standard choice (i.e., the provided array contains data sampled from a larger population; this is commonly referred to as Bessel's correction).
var x1 =newFloat64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
142
142
143
-
var v =dvarmpn( 4, 1.25, 1, x1, 2 );
143
+
var v =dvarmpn( 4, 1, 1.25, x1, 2 );
144
144
// returns 6.25
145
145
```
146
146
147
-
#### dvarmpn.ndarray( N, mean, correction, x, strideX, offsetX )
147
+
#### dvarmpn.ndarray( N, correction, mean, x, strideX, offsetX )
148
148
149
149
Computes the [variance][variance] of a double-precision floating-point strided array provided a known `mean` and using Neely's correction algorithm and alternative indexing semantics.
150
150
@@ -153,7 +153,7 @@ var Float64Array = require( '@stdlib/array/float64' );
153
153
154
154
var x =newFloat64Array( [ 1.0, -2.0, 2.0 ] );
155
155
156
-
var v =dvarmpn.ndarray( x.length, 1.0/3.0, 1, x, 1, 0 );
156
+
var v =dvarmpn.ndarray( x.length, 1, 1.0/3.0, x, 1, 0 );
157
157
// returns ~4.33333
158
158
```
159
159
@@ -168,7 +168,7 @@ var Float64Array = require( '@stdlib/array/float64' );
168
168
169
169
var x =newFloat64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );
170
170
171
-
var v =dvarmpn.ndarray( 4, 1.25, 1, x, 2, 1 );
171
+
var v =dvarmpn.ndarray( 4, 1, 1.25, x, 2, 1 );
172
172
// returns 6.25
173
173
```
174
174
@@ -202,7 +202,7 @@ var x = discreteUniform( 10, -50, 50, {
202
202
});
203
203
console.log( x );
204
204
205
-
var v =dvarmpn( x.length, 0.0, 1, x, 1 );
205
+
var v =dvarmpn( x.length, 1, 0.0, x, 1 );
206
206
console.log( v );
207
207
```
208
208
@@ -236,14 +236,14 @@ console.log( v );
236
236
#include"stdlib/stats/strided/dvarmpn.h"
237
237
```
238
238
239
-
#### stdlib_strided_dvarmpn( N, mean, correction, \*X, strideX )
239
+
#### stdlib_strided_dvarmpn( N, correction, mean, \*X, strideX )
240
240
241
241
Computes the [variance][variance] of a double-precision floating-point strided array provided a known `mean` and using Neely's correction algorithm.
#### stdlib_strided_dvarmpn_ndarray( N, mean, correction, \*X, strideX, offsetX )
262
+
#### stdlib_strided_dvarmpn_ndarray( N, correction, mean, \*X, strideX, offsetX )
263
263
264
264
Computes the [variance][variance] of a double-precision floating-point strided array provided a known `mean` and using Neely's correction algorithm and alternative indexing semantics.
- **N**: `[in] CBLAS_INT` number of indexed elements.
276
-
- **mean**: `[in] double` mean.
277
276
- **correction**: `[in] double` degrees of freedom adjustment. Setting this parameter to a value other than `0` has the effect of adjusting the divisor during the calculation of the [variance][variance] according to `N-c` where `c` corresponds to the provided degrees of freedom adjustment. When computing the [variance][variance] of a population, setting this parameter to `0` is the standard choice (i.e., the provided array contains data constituting an entire population). When computing the unbiased sample [variance][variance], setting this parameter to `1` is the standard choice (i.e., the provided array contains data sampled from a larger population; this is commonly referred to as Bessel's correction).
277
+
- **mean**: `[in] double` mean.
278
278
- **X**: `[in] double*` input array.
279
279
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
280
280
- **offsetX**: `[in] CBLAS_INT` starting index for `X`.
0 commit comments