|
248 | 248 | Compute the sample variance of a collection `v` with known mean(s) `m`, |
249 | 249 | optionally over the given dimensions. `m` may contain means for each dimension of |
250 | 250 | `v`. If `corrected` is `true`, then the sum is scaled with `n-1`, |
251 | | -whereas the sum is scaled with `n` if `corrected` is `false` where `n = length(x)`. |
| 251 | +whereas the sum is scaled with `n` if `corrected` is `false` where `n = length(v)`. |
252 | 252 |
|
253 | 253 | !!! note |
254 | 254 | If array contains `NaN` or [`missing`](@ref) values, the result is also |
@@ -278,7 +278,7 @@ The algorithm will return an estimator of the generative distribution's variance |
278 | 278 | under the assumption that each entry of `v` is an IID drawn from that generative |
279 | 279 | distribution. This computation is equivalent to calculating `sum(abs2, v - mean(v)) / |
280 | 280 | (length(v) - 1)`. If `corrected` is `true`, then the sum is scaled with `n-1`, |
281 | | -whereas the sum is scaled with `n` if `corrected` is `false` where `n = length(x)`. |
| 281 | +whereas the sum is scaled with `n` if `corrected` is `false` where `n = length(v)`. |
282 | 282 | The mean `mean` over the region may be provided. |
283 | 283 |
|
284 | 284 | !!! note |
@@ -345,7 +345,7 @@ deviation under the assumption that each entry of `v` is an IID drawn from that |
345 | 345 | distribution. This computation is equivalent to calculating `sqrt(sum((v - mean(v)).^2) / |
346 | 346 | (length(v) - 1))`. A pre-computed `mean` may be provided. If `corrected` is `true`, |
347 | 347 | then the sum is scaled with `n-1`, whereas the sum is scaled with `n` if `corrected` is |
348 | | -`false` where `n = length(x)`. |
| 348 | +`false` where `n = length(v)`. |
349 | 349 |
|
350 | 350 | !!! note |
351 | 351 | If array contains `NaN` or [`missing`](@ref) values, the result is also |
@@ -376,7 +376,7 @@ std(iterable; corrected::Bool=true, mean=nothing) = |
376 | 376 | Compute the sample standard deviation of a vector `v` |
377 | 377 | with known mean `m`. If `corrected` is `true`, |
378 | 378 | then the sum is scaled with `n-1`, whereas the sum is |
379 | | -scaled with `n` if `corrected` is `false` where `n = length(x)`. |
| 379 | +scaled with `n` if `corrected` is `false` where `n = length(v)`. |
380 | 380 |
|
381 | 381 | !!! note |
382 | 382 | If array contains `NaN` or [`missing`](@ref) values, the result is also |
@@ -882,7 +882,7 @@ probabilities `p` on the interval [0,1]. The keyword argument `sorted` indicates |
882 | 882 | `itr` can be assumed to be sorted. |
883 | 883 |
|
884 | 884 | Quantiles are computed via linear interpolation between the points `((k-1)/(n-1), v[k])`, |
885 | | -for `k = 1:n` where `n = length(v)`. This corresponds to Definition 7 of Hyndman and Fan |
| 885 | +for `k = 1:n` where `n = length(itr)`. This corresponds to Definition 7 of Hyndman and Fan |
886 | 886 | (1996), and is the same as the R default. |
887 | 887 |
|
888 | 888 | !!! note |
|
0 commit comments