2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-24 18:12:09 +00:00
Files
math/doc/html/math_toolkit/dist_ref/dists/mapairy_dist.html
2025-08-24 14:13:26 +02:00

216 lines
15 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Map-Airy Distribution</title>
<link rel="stylesheet" href="../../../math.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="../../../index.html" title="Math Toolkit 4.2.1">
<link rel="up" href="../dists.html" title="Distributions">
<link rel="prev" href="lognormal_dist.html" title="Log Normal Distribution">
<link rel="next" href="negative_binomial_dist.html" title="Negative Binomial Distribution">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="lognormal_dist.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../dists.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="negative_binomial_dist.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="math_toolkit.dist_ref.dists.mapairy_dist"></a><a class="link" href="mapairy_dist.html" title="Map-Airy Distribution">Map-Airy
Distribution</a>
</h4></div></div></div>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">distributions</span><span class="special">/</span><span class="identifier">mapairy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></pre>
<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RealType</span> <span class="special">=</span> <span class="keyword">double</span><span class="special">,</span>
<span class="keyword">class</span> <a class="link" href="../../../policy.html" title="Chapter 22. Policies: Controlling Precision, Error Handling etc">Policy</a> <span class="special">=</span> <a class="link" href="../../pol_ref/pol_ref_ref.html" title="Policy Class Reference">policies::policy&lt;&gt;</a> <span class="special">&gt;</span>
<span class="keyword">class</span> <span class="identifier">mapairy_distribution</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">mapairy_distribution</span><span class="special">&lt;&gt;</span> <span class="identifier">mapairy</span><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RealType</span><span class="special">,</span> <span class="keyword">class</span> <a class="link" href="../../../policy.html" title="Chapter 22. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&gt;</span>
<span class="keyword">class</span> <span class="identifier">mapairy_distribution</span>
<span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="keyword">typedef</span> <span class="identifier">RealType</span> <span class="identifier">value_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">Policy</span> <span class="identifier">policy_type</span><span class="special">;</span>
<span class="identifier">BOOST_MATH_GPU_ENABLED</span> <span class="identifier">mapairy_distribution</span><span class="special">(</span><span class="identifier">RealType</span> <span class="identifier">location</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span> <span class="identifier">RealType</span> <span class="identifier">scale</span> <span class="special">=</span> <span class="number">1</span><span class="special">);</span>
<span class="identifier">BOOST_MATH_GPU_ENABLED</span> <span class="identifier">RealType</span> <span class="identifier">location</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
<span class="identifier">BOOST_MATH_GPU_ENABLED</span> <span class="identifier">RealType</span> <span class="identifier">scale</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
<span class="special">};</span>
</pre>
<p>
It is special case of a <a href="http://en.wikipedia.org/wiki/Stable_distribution" target="_top">stable
distribution</a> with shape parameter α=3/2, β=1.
</p>
<p>
This distribution is also defined as β = 1, which is inverted about the
x-axis.
</p>
<p>
<a href="http://en.wikipedia.org/wiki/Probability_distribution" target="_top">probability
distribution function PDF</a> given by:
</p>
<div class="blockquote"><blockquote class="blockquote"><p>
<span class="inlinemediaobject"><img src="../../../../equations/mapairy_ref1.svg"></span>
</p></blockquote></div>
<p>
The location parameter μ is the location of the distribution, while the scale
parameter [c] determines the width of the distribution. If the location
is zero, and the scale 1, then the result is a standard map-airy distribution.
</p>
<p>
The distribution describes the probability distribution of the area under
a Brownian excursion over a unit interval.
</p>
<p>
The following graph shows how the distributions moves as the location parameter
changes:
</p>
<div class="blockquote"><blockquote class="blockquote"><p>
<span class="inlinemediaobject"><img src="../../../../graphs/mapairy_pdf1.svg" align="middle"></span>
</p></blockquote></div>
<p>
While the following graph shows how the shape (scale) parameter alters
the distribution:
</p>
<div class="blockquote"><blockquote class="blockquote"><p>
<span class="inlinemediaobject"><img src="../../../../graphs/mapairy_pdf2.svg" align="middle"></span>
</p></blockquote></div>
<h5>
<a name="math_toolkit.dist_ref.dists.mapairy_dist.h0"></a>
<span class="phrase"><a name="math_toolkit.dist_ref.dists.mapairy_dist.member_functions"></a></span><a class="link" href="mapairy_dist.html#math_toolkit.dist_ref.dists.mapairy_dist.member_functions">Member
Functions</a>
</h5>
<pre class="programlisting"><span class="identifier">BOOST_MATH_GPU_ENABLED</span> <span class="identifier">mapairy_distribution</span><span class="special">(</span><span class="identifier">RealType</span> <span class="identifier">location</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span> <span class="identifier">RealType</span> <span class="identifier">scale</span> <span class="special">=</span> <span class="number">1</span><span class="special">);</span>
</pre>
<p>
Constructs a mapairy distribution, with location parameter <span class="emphasis"><em>location</em></span>
and scale parameter <span class="emphasis"><em>scale</em></span>. When these parameters take
their default values (location = 0, scale = 1) then the result is a Standard
map-airy Distribution.
</p>
<p>
Requires scale &gt; 0, otherwise calls <a class="link" href="../../error_handling.html#math_toolkit.error_handling.domain_error">domain_error</a>.
</p>
<pre class="programlisting"><span class="identifier">BOOST_MATH_GPU_ENABLED</span> <span class="identifier">RealType</span> <span class="identifier">location</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
</pre>
<p>
Returns the location parameter of the distribution.
</p>
<pre class="programlisting"><span class="identifier">BOOST_MATH_GPU_ENABLED</span> <span class="identifier">RealType</span> <span class="identifier">scale</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
</pre>
<p>
Returns the scale parameter of the distribution.
</p>
<h5>
<a name="math_toolkit.dist_ref.dists.mapairy_dist.h1"></a>
<span class="phrase"><a name="math_toolkit.dist_ref.dists.mapairy_dist.non_member_accessors"></a></span><a class="link" href="mapairy_dist.html#math_toolkit.dist_ref.dists.mapairy_dist.non_member_accessors">Non-member
Accessors</a>
</h5>
<p>
All the <a class="link" href="../nmp.html" title="Non-Member Properties">usual non-member accessor
functions</a> that are generic to all distributions are supported:
<a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.cdf">Cumulative Distribution Function</a>,
<a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.pdf">Probability Density Function</a>,
<a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.quantile">Quantile</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.hazard">Hazard Function</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.chf">Cumulative Hazard Function</a>,
__logcdf, __logpdf, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.mean">mean</a>,
<a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.median">median</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.mode">mode</a>,
<a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.variance">variance</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.sd">standard deviation</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.skewness">skewness</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.kurtosis">kurtosis</a>,
<a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.kurtosis_excess">kurtosis_excess</a>,
<a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.range">range</a> and <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.support">support</a>. For this distribution
all non-member accessor functions are marked with <code class="computeroutput"><span class="identifier">BOOST_MATH_GPU_ENABLED</span></code>
and can be run on both host and device.
</p>
<p>
Note however that the map-airy distribution does not have a skewness, kurtosis,
etc. See <a class="link" href="../../pol_ref/assert_undefined.html" title="Mathematically Undefined Function Policies">mathematically
undefined function</a> to control whether these should fail to compile
with a BOOST_STATIC_ASSERTION_FAILURE, which is the default.
</p>
<p>
Alternately, the functions <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.skewness">skewness</a>,
<a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.kurtosis">kurtosis</a> and
<a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.kurtosis_excess">kurtosis_excess</a>
will all return a <a class="link" href="../../error_handling.html#math_toolkit.error_handling.domain_error">domain_error</a>
if called.
</p>
<p>
The domain of the random variable is [-[max_value], +[min_value]].
</p>
<h5>
<a name="math_toolkit.dist_ref.dists.mapairy_dist.h2"></a>
<span class="phrase"><a name="math_toolkit.dist_ref.dists.mapairy_dist.accuracy"></a></span><a class="link" href="mapairy_dist.html#math_toolkit.dist_ref.dists.mapairy_dist.accuracy">Accuracy</a>
</h5>
<p>
The error is within 4 epsilon except for the rapidly decaying left tail.
</p>
<p>
Errors in the PDF at 64-bit double precision:
</p>
<p>
<span class="inlinemediaobject"><img src="../../../../graphs/mapairy_pdf_accuracy_64.png"></span>
</p>
<p>
Errors in the CDF at 64-bit double precision:
</p>
<p>
<span class="inlinemediaobject"><img src="../../../../graphs/mapairy_cdf_accuracy_64.png"></span>
</p>
<p>
Errors in the CDF-complement at 64-bit double precision:
</p>
<p>
<span class="inlinemediaobject"><img src="../../../../graphs/mapairy_ccdf_accuracy_64.png"></span>
</p>
<h5>
<a name="math_toolkit.dist_ref.dists.mapairy_dist.h3"></a>
<span class="phrase"><a name="math_toolkit.dist_ref.dists.mapairy_dist.implementation"></a></span><a class="link" href="mapairy_dist.html#math_toolkit.dist_ref.dists.mapairy_dist.implementation">Implementation</a>
</h5>
<p>
See references.
</p>
<h5>
<a name="math_toolkit.dist_ref.dists.mapairy_dist.h4"></a>
<span class="phrase"><a name="math_toolkit.dist_ref.dists.mapairy_dist.references"></a></span><a class="link" href="mapairy_dist.html#math_toolkit.dist_ref.dists.mapairy_dist.references">References</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<a href="https://mathworld.wolfram.com/Map-AiryDistribution.html" target="_top">Wolfram
MathWorld: Map-Airy Distribution</a>
</li>
<li class="listitem">
T. Yoshimura, Numerical Evaluation and High Precision Approximation
Formula for Map-Airy Distribution, DOI: 10.36227/techrxiv.172053942.27675733/v1,
2024.
</li>
</ul></div>
</div>
<div class="copyright-footer">Copyright © 2006-2021 Nikhar Agrawal, Anton Bikineev, Matthew Borland,
Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, Hubert Holin, Bruno
Lalande, John Maddock, Evan Miller, Jeremy Murphy, Matthew Pulver, Johan Råde,
Gautam Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg, Daryle
Walker and Xiaogang Zhang<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="lognormal_dist.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../dists.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="negative_binomial_dist.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>