mirror of
https://github.com/boostorg/math.git
synced 2026-01-29 19:52:08 +00:00
120 lines
4.6 KiB
Plaintext
120 lines
4.6 KiB
Plaintext
[section:dist_ref Statistical Distributions Reference]
|
|
|
|
[def __cdf [link math.dist.cdf Cumulative Distribution Function]]
|
|
[def __pdf [link math.dist.pdf Probability Density Function]]
|
|
[def __ccdf [link math.dist.ccdf Complement of the Cumulative Distribution Function]]
|
|
[def __quantile [link math.dist.quantile Quantile]]
|
|
[def __quantile_c [link math.dist.quantile_c Quantile from the complement of the probability]]
|
|
[def __mean [link math.dist.mean mean]]
|
|
[def __mode [link math.dist.mode mode]]
|
|
[def __skewness [link math.dist.skewness skewness]]
|
|
[def __kurtosis [link math.dist.kurtosis kurtosis]]
|
|
[def __kurtosis_excess [link math.dist.kurtosis_excess kurtosis_excess]]
|
|
[def __variance [link math.dist.variance variance]]
|
|
[def __sd [link math.dist.sd standard deviation]]
|
|
[def __hazard [link math.dist.hazard Hazard Function]]
|
|
[def __chf [link math.dist.chf Cumulative Hazard Function]]
|
|
|
|
[/ def names end in distrib to avoid clashes]
|
|
[def __binomial_distrib [link math_toolkit.dist.dist_ref.dists.binomial_dist Binomial Distribution]]
|
|
[def __chi_squared_distrib [link math_toolkit.dist.dist_ref.dists.chi_squared_dist Chi Squared Distribution]]
|
|
[def __normal_distrib [link math_toolkit.dist.dist_ref.dists.normal_dist Normal Distribution]]
|
|
[def __F_distrib [link math_toolkit.dist.dist_ref.dists.f_dist Fisher F Distribution]]
|
|
[def __students_t_distrib [link math_toolkit.dist.dist_ref.dists.students_t_dist Students t Distribution]]
|
|
|
|
[def __usual_accessors __cdf, __pdf, __quantile, __hazard,
|
|
__chf, __mean, __mode, __variance, __sd, __skewness, __kurtosis and __kurtosis_excess]
|
|
|
|
|
|
[include distributions/non_members.qbk]
|
|
|
|
[section:dists Distributions]
|
|
|
|
[include distributions/binomial.qbk]
|
|
[include distributions/cauchy.qbk]
|
|
[include distributions/chi_squared.qbk]
|
|
[include distributions/exponential.qbk]
|
|
[include distributions/extreme_value.qbk]
|
|
[include distributions/fisher.qbk]
|
|
[include distributions/normal.qbk]
|
|
[include distributions/students_t.qbk]
|
|
|
|
[endsect][/section:dists Distributions]
|
|
|
|
[endsect][/section:dist_ref Statistical Distributions and Functions Reference]
|
|
|
|
[section:future Extras/Future Directions]
|
|
|
|
I'm not anticipating any of the following being present in the initial
|
|
release: we've got enough to do figuring out the math !
|
|
|
|
[h4 Adding Additional Location and Scale Parameters]
|
|
|
|
In some modelling applications we require a distribution with a specific
|
|
location and scale:
|
|
often this equates to a specific mean and standard deviation, although for many
|
|
distributions the relationship between these properties and the location and
|
|
scale parameters are non-trivial.
|
|
See [@http://www.itl.nist.gov/div898/handbook/eda/section3/eda364.htm http://www.itl.nist.gov/div898/handbook/eda/section3/eda364.htm] for more
|
|
information.
|
|
|
|
The obvious way to handle this is via an adapter template:
|
|
|
|
template <class Dist>
|
|
class scaled_distribution
|
|
{
|
|
scaled_distribution(
|
|
const Dist dist,
|
|
typename Dist::value_type location,
|
|
typename Dist::value_type scale = 0);
|
|
};
|
|
|
|
Which would then have its own set of overloads for the non-member accessor functions.
|
|
|
|
[h4 Higher Level Hypothesis Tests]
|
|
|
|
Higher-level tests roughly corresponding to the
|
|
[@http://documents.wolfram.com/mathematica/Add-onsLinks/StandardPackages/Statistics/HypothesisTests.html Mathematica Hypothesis Tests]
|
|
package could be added reasonably easily, for example:
|
|
|
|
template <class InputIterator>
|
|
typename std::iterator_traits<InputIterator>::value_type
|
|
test_equal_mean(
|
|
InputIterator a,
|
|
InputIterator b,
|
|
typename std::iterator_traits<InputIterator>::value_type expected_mean);
|
|
|
|
Returns the probability that the data in the sequence [a,b) has the mean
|
|
/expected_mean/.
|
|
|
|
[h4 Integration With Statistical Accumulators]
|
|
|
|
[@http://boost-sandbox.sourceforge.net/libs/accumulators/doc/html/index.html
|
|
Eric Niebler's accumulator framework] - also work in progress - provides the means
|
|
to calculate various statistical properties from experimental data. There is an
|
|
opportunity to integrate the statistical tests with this framework at some later date:
|
|
|
|
// define an accumulator, all required statistics to calculate the test
|
|
// are calculated automatically:
|
|
accumulator_set<double, features<tag::test_expected_mean> > acc(expected_mean=4);
|
|
// pass our data to the accumulator:
|
|
acc = std::for_each(mydata.begin(), mydata.end(), acc);
|
|
// extract the result:
|
|
double p = probability(acc);
|
|
|
|
[endsect][/section:future Extras Future Directions]
|
|
|
|
[/ dist_reference.qbk
|
|
Copyright 2006 John Maddock and Paul A. Bristow.
|
|
Distributed under the Boost Software License, Version 1.0.
|
|
(See accompanying file LICENSE_1_0.txt or copy at
|
|
http://www.boost.org/LICENSE_1_0.txt).
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|