-
Notifications
You must be signed in to change notification settings - Fork 420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gaussian & LogNormal distributions #775
Comments
LogNormals by mean and CVFor another project, we decided the most convenient way to parameterise log-normals was by the (linear) mean and coefficient of variation. Code found here, written by myself. We should add this functionality, and clarify the parameters to |
Z-scores and correlated samplesSometimes it can be useful to save a z-score (sample from a standard normal), and use it to sample from a parameterised Normal or LogNormal distribution, allowing correlated samples or a disconnect between the RNG machinery and parmeterisation. Additionally, it is possible to generate partially-correlated z-scores (with correlation measured in linear space for Normal samples, or in log-space for LogNormal samples). Example code for this here (also written by myself). |
I tried to clarify the parameter names in 466a0fc. |
@dhardy Can this be closed? |
Yes, I think so. |
Negative standard deviation
Currently
Normal::new
checks thatstd_dev
is not negative. I see no need to keep this check (GSL lacks it), though it should be pointed out that effectively the standard deviation will bestd_dev.abs()
.The only drawback is that calculations erroneously producing a negative value would no longer be detected, though I doubt this often happens (and non-negative erroneous values would still not be detected).
The text was updated successfully, but these errors were encountered: