Can we compute the Gaussian tail quickly with decent precision? (Former "Is this logistic approximation to the Gaussian integral valid?")
Imported on
The forum classified this question as unanswered when collected. This does not certify an open research problem; check the answers and revision history at the source.
Read the question with its definitions and background below. The source provides the full formulation and further discussion; the glossary and Wikipedia links offer additional reading aids.
Problem statement
The original text is below. I suggest the following edit and reopening:
In some practical applications there is a need to evaluate the antiderivative for the Gaussian function on the line quickly while super-duper precision is not required. What is the quickest algorithm you can suggest for that purpose that would work for any value of the argument and give some decent accuracy?
The following code snippet can be used to compute the Gaussian tail , where
Erf(x)=\frac 2{\sqrt{\pi}}\int_0^x e^{-t^2}\,dt $$ is the standard error function, on $[0,+\infty)$ so that the relative error for the proposed $g(x)\approx G(x)$ is under 1% on the entire positive semi-axis. You still need to reflect to get the values for negative $x$ after that, which can be viewed as a slight drawback. The snippet uses 1 exponentiation, 11 multiplications/divisions, and 6 additions/subtraction for the main routine. ```text real q=1/2/pi, qq=1-q, r=(pi^2-1)/(2*pi)/sqrt(pi), s=sqrt(pi), t=3/pi; real g(real x) { real y=x*x, w=exp(y/3), ww=w*w, www=w*ww; return 1/(qq-r*x+1.3*(ww-1/www-t*y)+(s*x+q)*www); } ``` Can one do better in terms of speed, accuracy, or both? I believe that reaching the accuracy of 0.1% on the entire (semi-)axis without sacrificing the speed significantly may be quite challenging, but I'll be happy to be proved wrong. If you find this reformulation interesting enough, please, vote to reopen. If you can improve it even further, don't hesitate to edit. Fedja The original text: I have worked on an empirical approximation of the primitive of the Gaussian function using the logistic function framework. I noticed that the graph of the Gaussian integral (i.e., the cumulative distribution function of the standard normal distribution) has a shape similar to a logistic sigmoid. Based on this, I hypothesized that it might be possible to approximate the Gaussian primitive using a logistic-type function of the form:F(x) \approx \frac{\sqrt{\pi}}{1 + e^{-r(x)}}
r(x) \approx \frac{\sqrt{\pi}}{3} x^3 - \frac{4}{\sqrt{\pi}} x
F(x) \approx \frac{\sqrt{\pi}}{1 + e^{- \left( \frac{\sqrt{\pi}}{3} x^3 - \frac{4}{\sqrt{\pi}} x \right)}}
\int_{-\infty}^{x} e^{-t^2} dt
\Phi_L(x) = \frac{1}{1 + e^{- \left( \frac{\sqrt{\pi}}{6\sqrt{2}} x^3 - \frac{4}{\sqrt{2\pi}} x \right)}}
\text{erf}_L(x) = 2\Phi_L(x) - 1
This approximation was obtained using tables of the standard normal distribution and a change of variable, followed by empirical regression of the function $r(x)$. The regression gave $R^2 = 1$, suggesting a strong fit. My questions are: - Is this type of approximation known in the literature? - Is there a theoretical justification for why the Gaussian primitive resembles a logistic sigmoid? - Are there limitations I should be aware of (e.g., outside of $x \in [-3, 3]$)? I would be grateful for any mathematical feedback, criticism, or suggestions for improvement. Thank you! — Binyegui Meyanga Amos HermannStatement and context adapted from MathOverflow · Hermann
CC BY-SA 4.0 · Formatting adapted; mathematical formulas preserved · Source history
A few useful definitions
- Graph
- A set of vertices connected by edges. A vertex’s degree counts the incident edges; the statement specifies whether directions or multiple edges are allowed.
Sources and original status
- MathOverflow Status in source : unanswered at collection
Last activity on the question :
Coverage, sources and method
This count measures imported entries, including distinct variants. It is not a count of all open mathematical questions worldwide. One entry may belong to several fields and sources.
This directory is neither exhaustive nor updated in real time. “Reported open” describes the source classification observed at import; imported entries have not each undergone independent mathematical verification. The 32 explained entries were reviewed separately.
Formal Conjectures: only “research open” statements with no reported formal proof are retained; their tag is checked in a pinned repository revision. Variants remain distinct. A “sorry” placeholder is not sufficient to establish open status.
Erdős: solved or independent problems and entries with a Lean solution are excluded, including “open (Lean)”. Exact matches to the main Formal Conjectures statements are merged.
Open Problem Garden: the open index is checked against the solved index; spam, identified clones and some outdated statuses are excluded. Statements and definition context are attributed to their original pages; formulas are preserved and the content remains under the GFDL. Recognized duplicates across sources are merged; this does not resolve every mathematical equivalence.
OEIS: direct extraction of conjectural comments and formulas, one entry per sequence, excluding mentioned resolutions. MathOverflow and Math Stack Exchange: questions classified as unanswered by their API, excluding closed posts and non-research categories. They remain distinct from problems reported open. This is a partial, dated collection; every entry credits its authors and license.
Documented exclusions account for recent announcements and conflicting statuses. A stronger variant or a special case can remain open after a different statement is settled.
Attribution: The Formal Conjectures Authors; teorth/erdosproblems and contributors; Open Problem Garden and contributors. Each source retains its license.
- Formal Conjectures · 1,924 · Apache-2.0 / CC-BY-4.0
- Erdős Problems (teorth) · 622 · Apache-2.0
- Open Problem Garden · 404 · GFDL (source content); only title/category/link metadata imported
- OEIS · 18,857 · CC BY-SA 4.0
- MathOverflow · 19,035 · CC BY-SA (version on each entry)
- Mathematics Stack Exchange · 35 · CC BY-SA (version on each entry)