Skip to content

Commit 7a0c0d1

Browse files
authored
Clarify "IID" (#58)
1 parent 4b3ef9a commit 7a0c0d1

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/Statistics.jl

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,9 @@ end
306306
Compute the sample variance of collection `itr`, with known mean(s) `mean`.
307307
308308
The algorithm returns an estimator of the generative distribution's variance
309-
under the assumption that each entry of `itr` is an IID drawn from that generative
310-
distribution. For arrays, this computation is equivalent to calculating
309+
under the assumption that each entry of `itr` is a sample drawn from the same
310+
unknown distribution, with the samples uncorrelated.
311+
For arrays, this computation is equivalent to calculating
311312
`sum((itr .- mean(itr)).^2) / (length(itr) - 1)`.
312313
If `corrected` is `true`, then the sum is scaled with `n-1`,
313314
whereas the sum is scaled with `n` if `corrected` is
@@ -343,8 +344,9 @@ end
343344
Compute the sample variance of collection `itr`.
344345
345346
The algorithm returns an estimator of the generative distribution's variance
346-
under the assumption that each entry of `itr` is an IID drawn from that generative
347-
distribution. For arrays, this computation is equivalent to calculating
347+
under the assumption that each entry of `itr` is a sample drawn from the same
348+
unknown distribution, with the samples uncorrelated.
349+
For arrays, this computation is equivalent to calculating
348350
`sum((itr .- mean(itr)).^2) / (length(itr) - 1))`.
349351
If `corrected` is `true`, then the sum is scaled with `n-1`,
350352
whereas the sum is scaled with `n` if `corrected` is
@@ -418,8 +420,9 @@ stdm(A::AbstractArray, m; corrected::Bool=true) =
418420
Compute the sample standard deviation of collection `itr`.
419421
420422
The algorithm returns an estimator of the generative distribution's standard
421-
deviation under the assumption that each entry of `itr` is an IID drawn from that generative
422-
distribution. For arrays, this computation is equivalent to calculating
423+
deviation under the assumption that each entry of `itr` is a sample drawn from
424+
the same unknown distribution, with the samples uncorrelated.
425+
For arrays, this computation is equivalent to calculating
423426
`sqrt(sum((itr .- mean(itr)).^2) / (length(itr) - 1))`.
424427
If `corrected` is `true`, then the sum is scaled with `n-1`,
425428
whereas the sum is scaled with `n` if `corrected` is
@@ -461,8 +464,9 @@ std(iterable; corrected::Bool=true, mean=nothing) =
461464
Compute the sample standard deviation of collection `itr`, with known mean(s) `mean`.
462465
463466
The algorithm returns an estimator of the generative distribution's standard
464-
deviation under the assumption that each entry of `itr` is an IID drawn from that generative
465-
distribution. For arrays, this computation is equivalent to calculating
467+
deviation under the assumption that each entry of `itr` is a sample drawn from
468+
the same unknown distribution, with the samples uncorrelated.
469+
For arrays, this computation is equivalent to calculating
466470
`sqrt(sum((itr .- mean(itr)).^2) / (length(itr) - 1))`.
467471
If `corrected` is `true`, then the sum is scaled with `n-1`,
468472
whereas the sum is scaled with `n` if `corrected` is

0 commit comments

Comments
 (0)