Python Inverse Error Function
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn python math erf more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users scipy erfinv Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping module 'scipy' has no attribute 'special' each other. Join them; it only takes a minute: Sign up command for inverse ERF function in python [closed] up vote 7 down vote favorite What is the command to calculate Inverse Error function (erf) of a function numpy erfc in a python and which module is needed to import? python python-2.7 python-3.x numpy share|improve this question asked Jul 7 '15 at 10:37 Naitik Mathur 442 closed as unclear what you're asking by jonrsharpe, ekad, cel, HaveNoDisplayName, Soner Gönül Jul 7 '15 at 14:50 Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask
Complementary Error Function
page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question. add a comment| 2 Answers 2 active oldest votes up vote 10 down vote For the inverse error function, scipy.special has erfinv: http://docs.scipy.org/doc/scipy/reference/generated/scipy.special.erfinv.html#scipy.special.erfinv In [4]: from scipy.special import erfinv In [5]: erfinv(1) Out[5]: inf In [6]: erfinv(0.4) Out[6]: 0.37080715859355784 share|improve this answer answered Jul 7 '15 at 10:41 xnx 11.1k31541 add a comment| up vote 0 down vote I suggest to use scipy, a library that uses numpy. the module you need to import to use is erfinv: from scipy.special import erfinv Scipy is a key player for numerical software in Python. But it might be a little challenging getting started with it. share|improve this answer edited Jul 7 '15 at 10:46 answered Jul 7 '15 at 10:40 DJanssens 1,8143826 add a comment| Not the answer you're looking for? Browse other questions tagged python python-2.7 python-3.x numpy or ask your own question. asked 1 year ago viewed 1664 times active 1 year ago Blog Stack Overflow Podcast #92 - The Guerilla Guide to Interviewing Visit Chat Related 1146How can I represent an 'Enum' in Python?2320Calling an external command in Python5543What does the “yield” keyword do?3use of // in python1How can I change the default version on Python on linux in order to install and u
scipy.special.erfcinv © Copyright 2008-2014, The Scipy community. Last updated on Jan 18, 2015. Created using Sphinx 1.2.2.
that occurs in probability, statistics, and partial differential equations describing diffusion. It is defined as:[1][2] erf ( x ) = 1 π ∫ − x x e − https://en.wikipedia.org/wiki/Error_function t 2 d t = 2 π ∫ 0 x e − http://mathworld.wolfram.com/InverseErf.html t 2 d t . {\displaystyle {\begin − 6\operatorname − 5 (x)&={\frac − 4{\sqrt {\pi }}}\int _{-x}^ − 3e^{-t^ − 2}\,\mathrm − 1 t\\&={\frac − 0{\sqrt {\pi }}}\int _ 9^ 8e^{-t^ 7}\,\mathrm 6 t.\end 5}} The complementary error function, denoted erfc, is defined as erfc error function ( x ) = 1 − erf ( x ) = 2 π ∫ x ∞ e − t 2 d t = e − x 2 erfcx ( x ) , {\displaystyle {\begin 2\operatorname 1 (x)&=1-\operatorname 0 (x)\\&={\frac Φ 9{\sqrt {\pi }}}\int _ Φ 8^{\infty }e^{-t^ Φ 7}\,\mathrm Φ 6 t\\&=e^{-x^ Φ 5}\operatorname Φ 4 (x),\end python inverse error Φ 3}} which also defines erfcx, the scaled complementary error function[3] (which can be used instead of erfc to avoid arithmetic underflow[3][4]). Another form of erfc ( x ) {\displaystyle \operatorname 2 (x)} for non-negative x {\displaystyle x} is known as Craig's formula:[5] erfc ( x | x ≥ 0 ) = 2 π ∫ 0 π / 2 exp ( − x 2 sin 2 θ ) d θ . {\displaystyle \operatorname 0 (x|x\geq 0)={\frac Φ 9{\pi }}\int _ Φ 8^{\pi /2}\exp \left(-{\frac Φ 7}{\sin ^ Φ 6\theta }}\right)d\theta \,.} The imaginary error function, denoted erfi, is defined as erfi ( x ) = − i erf ( i x ) = 2 π ∫ 0 x e t 2 d t = 2 π e x 2 D ( x ) , {\displaystyle {\begin Φ 0\operatorname − 9 (x)&=-i\operatorname − 8 (ix)\\&={\frac − 7{\sqrt {\pi }}}\int _ − 6^ − 5e^ − 4}\,\mathrm − 3 t\\&={\frac − 2{\sqrt {\pi }}}e^ − 1}D(x),\end − 0}} where D(x) is the Dawson function (which can be used instead of erf
Random Entry New in MathWorld MathWorld Classroom About MathWorld Contribute to MathWorld Send a Message to the Team MathWorld Book Wolfram Web Resources» 13,594 entries Last updated: Wed Oct 19 2016 Created, developed, and nurturedbyEricWeisstein at WolframResearch Calculus and Analysis>Special Functions>Erf> Calculus and Analysis>Calculus>Integrals>Definite Integrals> History and Terminology>Wolfram Language Commands> Inverse Erf The inverse erf function is the inverse function of the erf function such that (1) (2) with the first identity holding for and the second for . It is implemented in the Wolfram Language as InverseErf[x]. It is an odd function since (3) It has the special values (4) (5) (6) It is apparently not known if (7) (OEIS A069286) can be written in closed form. It satisfies the equation (8) where is the inverse erfc function. It has the derivative (9) and its integral is (10) (which follows from the method of Parker 1955). Definite integrals are given by (11) (12) (13) (14) (OEIS A087197 and A114864), where is the Euler-Mascheroni constant and is the natural logarithm of 2. The Maclaurin series of is given by (15) (OEIS A002067 and A007019). Written in simplified form so that the coefficient of is 1, (16) (OEIS A092676 and A092677). The th coefficient of this series can be computed as (17) where is given by the recurrence equation (18) with initial condition . SEE ALSO: Confidence Interval, Erf, Inverse Erfc, Probable Error RELATED WOLFRAM SITES: http://functions.wolfram.com/GammaBetaErf/InverseErf/, http://functions.wolfram.com/GammaBetaErf/InverseErf2/ REFERENCES: Bergeron, F.; Labelle, G.; and Leroux, P. Ch.5 in Combinatorial Species and Tree-Like Structures. Cambridge, England: Cambridge University Press, 1998. Carlitz, L. "The Inverse of the Error Function." Pacific J. Math. 13, 459-470, 1963. Parker, F.D. "Integrals of Inverse Functions." Amer. Math. Monthly 62, 439-440, 1955. Sloane, N.J.A. Sequences A002067/M4458, A007019/M3126, A069286, A087197, A092676, A092677, A114859, A114860, and A114864 in "The On-Line Encyclopedia of Integer Seq