rgsl/randist/
f_distribution.rs

1//
2// A rust binding for the GSL library by Guillaume Gomez (guillaume1.gomez@gmail.com)
3//
4
5/*!
6The F-distribution arises in statistics. If Y_1 and Y_2 are chi-squared deviates with \nu_1 and \nu_2 degrees of freedom then the ratio,
7
8X = { (Y_1 / \nu_1) \over (Y_2 / \nu_2) }
9
10has an F-distribution F(x;\nu_1,\nu_2).
11!*/
12
13/// This function computes the cumulative distribution functions P(x), Q(x) and their inverses for the F-distribution with nu1 and nu2 degrees of freedom.
14#[doc(alias = "gsl_ran_fdist_pdf")]
15pub fn fdist_pdf(x: f64, nu1: f64, nu2: f64) -> f64 {
16    unsafe { sys::gsl_ran_fdist_pdf(x, nu1, nu2) }
17}
18
19/// This function computes the cumulative distribution functions P(x), Q(x) and their inverses for the F-distribution with nu1 and nu2 degrees of freedom.
20#[doc(alias = "gsl_cdf_fdist_P")]
21pub fn fdist_P(x: f64, nu1: f64, nu2: f64) -> f64 {
22    unsafe { sys::gsl_cdf_fdist_P(x, nu1, nu2) }
23}
24
25/// This function computes the cumulative distribution functions P(x), Q(x) and their inverses for the F-distribution with nu1 and nu2 degrees of freedom.
26#[doc(alias = "gsl_cdf_fdist_Q")]
27pub fn fdist_Q(x: f64, nu1: f64, nu2: f64) -> f64 {
28    unsafe { sys::gsl_cdf_fdist_Q(x, nu1, nu2) }
29}
30
31/// This function computes the cumulative distribution functions P(x), Q(x) and their inverses for the F-distribution with nu1 and nu2 degrees of freedom.
32#[doc(alias = "gsl_cdf_fdist_Pinv")]
33pub fn fdist_Pinv(P: f64, nu1: f64, nu2: f64) -> f64 {
34    unsafe { sys::gsl_cdf_fdist_Pinv(P, nu1, nu2) }
35}
36
37/// This function computes the cumulative distribution functions P(x), Q(x) and their inverses for the F-distribution with nu1 and nu2 degrees of freedom.
38#[doc(alias = "gsl_cdf_fdist_Qinv")]
39pub fn fdist_Qinv(Q: f64, nu1: f64, nu2: f64) -> f64 {
40    unsafe { sys::gsl_cdf_fdist_Qinv(Q, nu1, nu2) }
41}