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/base/nanvarianceyc/README.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,12 +100,12 @@ var nanvarianceyc = require( '@stdlib/stats/base/nanvarianceyc' );
100
100
101
101
#### nanvarianceyc( N, correction, x, strideX )
102
102
103
-
Computes the [variance][variance] of a strided array `x`ignoring `NaN` values and using a one-pass algorithm proposed by Youngs and Cramer.
103
+
Computes the [variance][variance] of a strided array ignoring `NaN` values and using a one-pass algorithm proposed by Youngs and Cramer.
104
104
105
105
```javascript
106
106
var x = [ 1.0, -2.0, NaN, 2.0 ];
107
107
108
-
var v =nanvarianceyc( x.length, 1, x, 1 );
108
+
var v =nanvarianceyc( x.length, 1.0, x, 1 );
109
109
// returns ~4.3333
110
110
```
111
111
@@ -121,7 +121,7 @@ The `N` and stride parameters determine which elements in the strided array are
121
121
```javascript
122
122
var x = [ 1.0, 2.0, 2.0, -7.0, -2.0, 3.0, 4.0, 2.0, NaN, NaN ];
123
123
124
-
var v =nanvarianceyc( 5, 1, x, 2 );
124
+
var v =nanvarianceyc( 5, 1.0, x, 2 );
125
125
// returns 6.25
126
126
```
127
127
@@ -135,7 +135,7 @@ var Float64Array = require( '@stdlib/array/float64' );
135
135
var x0 =newFloat64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );
136
136
var x1 =newFloat64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
137
137
138
-
var v =nanvarianceyc( 5, 1, x1, 2 );
138
+
var v =nanvarianceyc( 5, 1.0, x1, 2 );
139
139
// returns 6.25
140
140
```
141
141
@@ -146,20 +146,20 @@ Computes the [variance][variance] of a strided array ignoring `NaN` values and u
146
146
```javascript
147
147
var x = [ 1.0, -2.0, NaN, 2.0 ];
148
148
149
-
var v =nanvarianceyc.ndarray( 4, 1, x, 1, 0 );
149
+
var v =nanvarianceyc.ndarray( 4, 1.0, x, 1, 0 );
150
150
// returns ~4.33333
151
151
```
152
152
153
153
The function has the following additional parameters:
154
154
155
155
-**offsetX**: starting index for `x`.
156
156
157
-
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameter supports indexing semantics based on a starting index. For example, to calculate the [variance][variance] for every other value in `x` starting from the second value
157
+
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameter supports indexing semantics based on a starting index. For example, to calculate the [variance][variance] for every other element in `x` starting from the second element
158
158
159
159
```javascript
160
160
var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ];
0 commit comments