1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389
|
%perlcode %{
our @EXPORT_OK = qw/ gsl_cdf_ugaussian_P gsl_cdf_ugaussian_Q gsl_cdf_ugaussian_Pinv
gsl_cdf_ugaussian_Qinv gsl_cdf_gaussian_P gsl_cdf_gaussian_Q
gsl_cdf_gaussian_Pinv gsl_cdf_gaussian_Qinv gsl_cdf_gamma_P
gsl_cdf_gamma_Q gsl_cdf_gamma_Pinv gsl_cdf_gamma_Qinv
gsl_cdf_cauchy_P gsl_cdf_cauchy_Q gsl_cdf_cauchy_Pinv
gsl_cdf_cauchy_Qinv gsl_cdf_laplace_P gsl_cdf_laplace_Q
gsl_cdf_laplace_Pinv gsl_cdf_laplace_Qinv gsl_cdf_rayleigh_P
gsl_cdf_rayleigh_Q gsl_cdf_rayleigh_Pinv gsl_cdf_rayleigh_Qinv
gsl_cdf_chisq_P gsl_cdf_chisq_Q gsl_cdf_chisq_Pinv
gsl_cdf_chisq_Qinv gsl_cdf_exponential_P gsl_cdf_exponential_Q
gsl_cdf_exponential_Pinv gsl_cdf_exponential_Qinv gsl_cdf_exppow_P
gsl_cdf_exppow_Q gsl_cdf_tdist_P gsl_cdf_tdist_Q
gsl_cdf_tdist_Pinv gsl_cdf_tdist_Qinv gsl_cdf_fdist_P
gsl_cdf_fdist_Q gsl_cdf_fdist_Pinv gsl_cdf_fdist_Qinv
gsl_cdf_beta_P gsl_cdf_beta_Q gsl_cdf_beta_Pinv
gsl_cdf_beta_Qinv gsl_cdf_flat_P gsl_cdf_flat_Q
gsl_cdf_flat_Pinv gsl_cdf_flat_Qinv gsl_cdf_lognormal_P
gsl_cdf_lognormal_Q gsl_cdf_lognormal_Pinv gsl_cdf_lognormal_Qinv
gsl_cdf_gumbel1_P gsl_cdf_gumbel1_Q gsl_cdf_gumbel1_Pinv
gsl_cdf_gumbel1_Qinv gsl_cdf_gumbel2_P gsl_cdf_gumbel2_Q
gsl_cdf_gumbel2_Pinv gsl_cdf_gumbel2_Qinv gsl_cdf_weibull_P
gsl_cdf_weibull_Q gsl_cdf_weibull_Pinv gsl_cdf_weibull_Qinv
gsl_cdf_pareto_P gsl_cdf_pareto_Q gsl_cdf_pareto_Pinv
gsl_cdf_pareto_Qinv gsl_cdf_logistic_P gsl_cdf_logistic_Q
gsl_cdf_logistic_Pinv gsl_cdf_logistic_Qinv gsl_cdf_binomial_P
gsl_cdf_binomial_Q gsl_cdf_poisson_P gsl_cdf_poisson_Q
gsl_cdf_geometric_P gsl_cdf_geometric_Q gsl_cdf_negative_binomial_P
gsl_cdf_negative_binomial_Q gsl_cdf_pascal_P gsl_cdf_pascal_Q
gsl_cdf_hypergeometric_P gsl_cdf_hypergeometric_Q
/;
our %EXPORT_TAGS = ( all => [ @EXPORT_OK ], geometric => [ gsl_cdf_geometric_P , gsl_cdf_geometric_Q ], tdist => [ gsl_cdf_tdist_P , gsl_cdf_tdist_Q , gsl_cdf_tdist_Pinv , gsl_cdf_tdist_Qinv ], ugaussian => [ gsl_cdf_ugaussian_P , gsl_cdf_ugaussian_Q , gsl_cdf_ugaussian_Pinv , gsl_cdf_ugaussian_Qinv ], rayleigh => [ gsl_cdf_rayleigh_P , gsl_cdf_rayleigh_Q , gsl_cdf_rayleigh_Pinv , gsl_cdf_rayleigh_Qinv ], pascal => [ gsl_cdf_pascal_P , gsl_cdf_pascal_Q ], exponential => [ gsl_cdf_exponential_P , gsl_cdf_exponential_Q , gsl_cdf_exponential_Pinv , gsl_cdf_exponential_Qinv ], gumbel2 => [ gsl_cdf_gumbel2_P , gsl_cdf_gumbel2_Q , gsl_cdf_gumbel2_Pinv , gsl_cdf_gumbel2_Qinv ], gumbel1 => [ gsl_cdf_gumbel1_P , gsl_cdf_gumbel1_Q , gsl_cdf_gumbel1_Pinv , gsl_cdf_gumbel1_Qinv ], exppow => [ gsl_cdf_exppow_P , gsl_cdf_exppow_Q ], logistic => [ gsl_cdf_logistic_P , gsl_cdf_logistic_Q , gsl_cdf_logistic_Pinv , gsl_cdf_logistic_Qinv ], weibull => [ gsl_cdf_weibull_P , gsl_cdf_weibull_Q , gsl_cdf_weibull_Pinv , gsl_cdf_weibull_Qinv ], gaussian => [ gsl_cdf_gaussian_P , gsl_cdf_gaussian_Q , gsl_cdf_gaussian_Pinv , gsl_cdf_gaussian_Qinv ], poisson => [ gsl_cdf_poisson_P , gsl_cdf_poisson_Q ], beta => [ gsl_cdf_beta_P , gsl_cdf_beta_Q , gsl_cdf_beta_Pinv , gsl_cdf_beta_Qinv ], binomial => [ gsl_cdf_binomial_P , gsl_cdf_binomial_Q ], laplace => [ gsl_cdf_laplace_P , gsl_cdf_laplace_Q , gsl_cdf_laplace_Pinv , gsl_cdf_laplace_Qinv ], lognormal => [ gsl_cdf_lognormal_P , gsl_cdf_lognormal_Q , gsl_cdf_lognormal_Pinv , gsl_cdf_lognormal_Qinv ], cauchy => [ gsl_cdf_cauchy_P , gsl_cdf_cauchy_Q , gsl_cdf_cauchy_Pinv , gsl_cdf_cauchy_Qinv ], fdist => [ gsl_cdf_fdist_P , gsl_cdf_fdist_Q , gsl_cdf_fdist_Pinv , gsl_cdf_fdist_Qinv ], chisq => [ gsl_cdf_chisq_P , gsl_cdf_chisq_Q , gsl_cdf_chisq_Pinv , gsl_cdf_chisq_Qinv ], gamma => [ gsl_cdf_gamma_P , gsl_cdf_gamma_Q , gsl_cdf_gamma_Pinv , gsl_cdf_gamma_Qinv ], hypergeometric => [ gsl_cdf_hypergeometric_P , gsl_cdf_hypergeometric_Q ], negative => [ gsl_cdf_negative_binomial_P , gsl_cdf_negative_binomial_Q ], pareto => [ gsl_cdf_pareto_P , gsl_cdf_pareto_Q , gsl_cdf_pareto_Pinv , gsl_cdf_pareto_Qinv ], flat => [ gsl_cdf_flat_P , gsl_cdf_flat_Q , gsl_cdf_flat_Pinv , gsl_cdf_flat_Qinv ]);
__END__
=encoding utf8
=head1 NAME
Math::GSL::CDF - Cumulative Distribution Functions
=head1 SYNOPSIS
use Math::GSL::CDF qw/:all/;
my $x = gsl_cdf_gaussian_Pinv($P, $sigma);
use Math::GSL::CDF qw/:beta/;
print gsl_cdf_beta_P(1,2,3) . "\n";
These functions compute the cumulative distribution functions P(x), Q(x) and
their inverses for the named distributions.
=head1 DESCRIPTION
Here is a list of all the functions included in this module :
=over 4
=item gsl_cdf_ugaussian_P($x)
=item gsl_cdf_ugaussian_Q($x)
=item gsl_cdf_ugaussian_Pinv($P)
=item gsl_cdf_ugaussian_Qinv($Q)
These functions compute the cumulative distribution functions P(x), Q(x) and
their inverses for the unit Gaussian distribution.
=item gsl_cdf_gaussian_P($x, $sigma)
=item gsl_cdf_gaussian_Q($x, $sigma)
=item gsl_cdf_gaussian_Pinv($P, $sigma)
=item gsl_cdf_gaussian_Qinv($Q, $sigma)
These functions compute the cumulative distribution functions P(x), Q(x) and
their inverses for the Gaussian distribution with standard deviation $sigma.
=item gsl_cdf_gamma_P($x, $a, $b)
=item gsl_cdf_gamma_Q($x, $a, $b)
=item gsl_cdf_gamma_Pinv($P, $a, $b)
=item gsl_cdf_gamma_Qinv($Q, $a, $b)
These functions compute the cumulative distribution functions P(x), Q(x) and
their inverses for the gamma distribution with parameters $a and $b.
=item gsl_cdf_cauchy_P($x, $a)
=item gsl_cdf_cauchy_Q($x, $a)
=item gsl_cdf_cauchy_Pinv($P, $a)
=item gsl_cdf_cauchy_Qinv($Q, $a)
These functions compute the cumulative distribution functions P(x), Q(x) and
their inverses for the Cauchy distribution with scale parameter $a.
=item gsl_cdf_laplace_P($x, $a)
=item gsl_cdf_laplace_Q($x, $a)
=item gsl_cdf_laplace_Pinv($P, $a)
=item gsl_cdf_laplace_Qinv($Q, $a)
These functions compute the cumulative distribution functions P(x), Q(x) and
their inverses for the Laplace distribution with width $a.
=item gsl_cdf_rayleigh_P($x, $sigma)
=item gsl_cdf_rayleigh_Q($x, $sigma)
=item gsl_cdf_rayleigh_Pinv($P, $sigma)
=item gsl_cdf_rayleigh_Qinv($Q, $sigma)
These functions compute the cumulative distribution functions P(x), Q(x) and
their inverses for the Rayleigh distribution with scale parameter $sigma.
=item gsl_cdf_chisq_P($x, $nu)
=item gsl_cdf_chisq_Q($x, $nu)
=item gsl_cdf_chisq_Pinv($P, $nu)
=item gsl_cdf_chisq_Qinv($Q, $nu)
These functions compute the cumulative distribution functions P(x), Q(x) and
their inverses for the chi-squared distribution with $nu degrees of freedom.
=item gsl_cdf_exponential_P($x, $mu)
=item gsl_cdf_exponential_Q($x, $mu)
=item gsl_cdf_exponential_Pinv($P, $mu)
=item gsl_cdf_exponential_Qinv($Q, $mu)
These functions compute the cumulative distribution functions P(x), Q(x) and
their inverses for the Laplace distribution with width $a.
=item gsl_cdf_exppow_P($x, $a, $b)
=item gsl_cdf_exppow_Q($x, $a, $b)
These functions compute the cumulative distribution functions P(x), Q(x) for
the exponential power distribution with parameters $a and $b.
=item gsl_cdf_tdist_P($x, $nu)
=item gsl_cdf_tdist_Q($x, $nu)
=item gsl_cdf_tdist_Pinv($P, $nu)
=item gsl_cdf_tdist_Qinv($Q, $nu)
These functions compute the cumulative distribution functions P(x), Q(x) and
their inverses for the t-distribution with $nu degrees of freedom.
=item gsl_cdf_fdist_P($x, $nu1, $nu2)
=item gsl_cdf_fdist_Q($x, $nu1, $nu2)
=item gsl_cdf_fdist_Pinv($P, $nu1, $nu2)
=item gsl_cdf_fdist_Qinv($Q, $nu1, $nu2)
These functions compute the cumulative distribution functions P(x), Q(x) and
their inverses for the F-distribution with $nu1 and $nu2 degrees of freedom.
=item gsl_cdf_beta_P($x, $a, $b)
=item gsl_cdf_beta_Q($x, $a, $b)
=item gsl_cdf_beta_Pinv($P, $a, $b)
=item gsl_cdf_beta_Qinv($Q, $a, $b)
These functions compute the cumulative distribution functions P(x), Q(x) and
their inverses for the beta distribution with parameters $a and $b.
=item gsl_cdf_flat_P($x, $a, $b)
=item gsl_cdf_flat_Q($x, $a, $b)
=item gsl_cdf_flat_Pinv($P, $a, $b)
=item gsl_cdf_flat_Qinv($Q, $a, $b)
These functions compute the cumulative distribution functions P(x), Q(x) and
their inverses for a uniform distribution from $a to $b.
=item gsl_cdf_lognormal_P($x, $zeta, $sigma)
=item gsl_cdf_lognormal_Q($x, $zeta, $sigma)
=item gsl_cdf_lognormal_Pinv($P, $zeta, $sigma)
=item gsl_cdf_lognormal_Qinv($Q, $zeta, $sigma)
These functions compute the cumulative distribution functions P(x), Q(x) and
their inverses for the lognormal distribution with parameters $zeta and $sigma.
=item gsl_cdf_gumbel1_P($x, $a, $b)
=item gsl_cdf_gumbel1_Q($x, $a, $b)
=item gsl_cdf_gumbel1_Pinv($P, $a, $b)
=item gsl_cdf_gumbel1_Qinv($Q, $a, $b)
These functions compute the cumulative distribution functions P(x), Q(x) and
their inverses for the Type-1 Gumbel distribution with parameters $a and $b.
=item gsl_cdf_gumbel2_P($x, $a, $b)
=item gsl_cdf_gumbel2_Q($x, $a, $b)
=item gsl_cdf_gumbel2_Pinv($P, $a, $b)
=item gsl_cdf_gumbel2_Qinv($Q, $a, $b)
These functions compute the cumulative distribution functions P(x), Q(x) and
their inverses for the Type-2 Gumbel distribution with parameters $a and $b.
=item gsl_cdf_weibull_P($x, $a, $b)
=item gsl_cdf_weibull_Q($x, $a, $b)
=item gsl_cdf_weibull_Pinv($P, $a, $b)
=item gsl_cdf_weibull_Qinv($Q, $a, $b)
These functions compute the cumulative distribution functions P(x), Q(x) and
their inverses for the Type-1 Gumbel distribution with parameters $a and $b.
=item gsl_cdf_pareto_P($x, $a, $b)
=item gsl_cdf_pareto_Q($x, $a, $b)
=item gsl_cdf_pareto_Pinv($P, $a, $b)
=item gsl_cdf_pareto_Qinv($Q, $a, $b)
These functions compute the cumulative distribution functions P(x), Q(x) and
their inverses for the Pareto distribution with exponent $a and scale $b.
=item gsl_cdf_logistic_P($x, $a)
=item gsl_cdf_logistic_Q($x, $a)
=item gsl_cdf_logistic_Pinv($P, $a)
=item gsl_cdf_logistic_Qinv($Q, $a)
These functions compute the cumulative distribution functions P(x), Q(x) and
their inverses for the logistic distribution with scale parameter a.
=item gsl_cdf_binomial_P($k, $p, $n)
=item gsl_cdf_binomial_Q($k, $p, $n)
These functions compute the cumulative distribution functions P(k), Q(k) for
the binomial distribution with parameters $p and $n.
=item gsl_cdf_poisson_P($k, $mu)
=item gsl_cdf_poisson_Q($k, $mu)
These functions compute the cumulative distribution functions P(k), Q(k) for
the Poisson distribution with parameter $mu.
=item gsl_cdf_geometric_P($k, $p)
=item gsl_cdf_geometric_Q($k, $p)
These functions compute the cumulative distribution functions P(k), Q(k) for
the geometric distribution with parameter $p.
=item gsl_cdf_negative_binomial_P($k, $p, $n)
=item gsl_cdf_negative_binomial_Q($k, $p, $n)
These functions compute the cumulative distribution functions P(k), Q(k) for
the negative binomial distribution with parameters $p and $n.
=item gsl_cdf_pascal_P($k, $p, $n)
=item gsl_cdf_pascal_Q($k, $p, $n)
These functions compute the cumulative distribution functions P(k), Q(k) for
the Pascal distribution with parameters $p and $n.
=item gsl_cdf_hypergeometric_P($k, $n1, $n2, $t)
=item gsl_cdf_hypergeometric_Q($k, $n1, $n2, $t)
These functions compute the cumulative distribution functions P(k), Q(k) for
the hypergeometric distribution with parameters $n1, $n2 and $t.
=back
To import specific functions, list them in the use line. To import
all function exportable by Math::GSL::CDF do
use Math::GSL::CDF qw/:all/
This is the list of available import tags:
=over
=item geometric
=item tdist
=item ugaussian
=item rayleigh
=item pascal
=item exponential
=item gumbel2
=item gumbel1
=item exppow
=item logistic
=item weibull
=item gaussian
=item poisson
=item beta
=item binomial
=item laplace
=item lognormal
=item cauchy
=item fdist
=item chisq
=item gamma
=item hypergeometric
=item negative
=item pareto
=item flat
=back
For example the beta tag contains theses functions : gsl_cdf_beta_P,
gsl_cdf_beta_Q, gsl_cdf_beta_Pinv, gsl_cdf_beta_Qinv .
For more information on the functions, we refer you to the GSL official documentation:
L<http://www.gnu.org/software/gsl/manual/html_node/>
=head1 AUTHORS
Jonathan "Duke" Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com>
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2008-2024 Jonathan "Duke" Leto and Thierry Moisan
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
=cut
%}
|