nalgebra
nalgebra copied to clipboard
Documentation does not specify if variance is population or sample
Hello, just a small suggestion here to specify in the documentation that Matrix::variance is calculating the population variance and not the sample variance. Coming from an R background, I was surprised when Matrix::row_variance didn't return the same values as R's var.
Simply changing the doc comment from "The variance of all the elements of this matrix" to "The population variance of all the elements of this matrix" might have helped my confusion.
https://github.com/dimforge/nalgebra/blob/a3c261051ba7c8201ef8c49640ae24c1f53360f7/src/base/statistics.rs#L343