Created
August 25, 2010 09:57
-
-
Save even4void/549213 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require("gsl") | |
| x = 2.0 | |
| P = GSL::Cdf::ugaussian_P(x); | |
| printf("prob(x < %f) = %f\n", x, P); | |
| Q = GSL::Cdf::ugaussian_Q(x); | |
| printf("prob(x > %f) = %f\n", x, Q); | |
| x = GSL::Cdf::ugaussian_Pinv(P); | |
| printf("Pinv(%f) = %f\n", P, x); | |
| x = GSL::Cdf::ugaussian_Qinv(Q); | |
| printf("Qinv(%f) = %f\n", Q, x); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment