2
$\begingroup$

The $\chi^2$ distribution PDF is $$f_{\chi^2}(x;k) = \frac{1}{2^{k/2}\Gamma(k/2)} x^{k/2 - 1} \mathrm{e}^{-x/2} \mathbf{1}_{x \geq 0}$$

I am trying to find a polynomial approximation to this density function. Power series expansion for the exponential $\mathrm{e}^x$ works fine, but it's an infinite series. I an looking at possibilities to attain a more compact approximation. Approximation using orthogonal polynomials is one option I'm looking at.

Are there better alternatives to power series expansion of $\mathrm{e}^x$ for approximating this pdf?

  • 1
    Do you require a *polynomial* or would other approximations, such as Gaussians, work? (For instance, the cube root of $x$ is approximately Gaussian for modest to large $k$.)2011-11-10
  • 0
    See if [this](http://math.stackexchange.com/questions/71357/approximation-of-e-x/71431#71431) is helpful.2011-11-10
  • 2
    Since $f(x)\to0$ when $x\to\infty$, $|f(x)-P(x)|\to\infty$ when $x\to\infty$ hence $(f-P)$ is unbounded for every polynomial $P$ except $P=0$. You could explain the sense in which $P$ should approximate $f$.2011-11-10
  • 1
    If you're approximating on a bounded interval, you might use Chebyshev series or the Remez algorithm. As Didier noted, polynomials won't give you a good approximation on all of $[0,\infty)$. You could, however, approximate by rational functions.2011-11-11
  • 0
    @RobertIsrael I want to approximate on all of $[0,\inf]$. I can see why approximation with polynomials could be problem as suggested by Didier. What approach is suggested for rational function approx?2011-11-11
  • 0
    @DidierPiau I am thinking about approximating $f(x)$ as a finite sum of orthogonal polynomials $P(x) = \sum a_i p_i(x)$. With suitable choice of $p_i$'s and $a_i$'s, it should be possible to knock down the error as $x \to \inf$. Would this be a good approach?2011-11-11
  • 0
    A finite sum of (orthogonal) polynomials is a polynomial hence my first remark still fully applies.2011-11-11
  • 0
    @DidierPiau Ok. Here is an alternative thought. I could approximate $e^{-x}$ with a reciprocal of a polynomial ( or a rational function). In this approach the reciprocal polynomial would have to be of degree atleast in order of $x^{L-1}$ in the $\chi^2$ distribution above to satisfy $f(x) \to 0$ when $x \to \infty$.2011-11-13
  • 0
    You can always write a distribution function of an arbitrary distribution in terms of some other distribution using generalized Polynomial Chaos, which represents it as an infinite series expansion about orthogonal polynomial basis functions of a random variable of a chosen distribution. In this case, I would choose a distribution that has equal support, like the exponential distribution.2012-08-17

1 Answers 1

2

Cecil Hastings, in his book Approximations for Digital Computers, gives a rational function approximation to $\exp(-x)$ for $0 \leq x < \infty$ that gives results that are good to $\approx 6$ digits:

$$\exp(-x)\approx R(x)=\frac1{(1+c_1 x+c_2 x^2+c_3 x^3+c_4 x^4+c_5 x^5+c_6 x^6)^4}$$

where

$$\begin{align*} c_1&=0.2499986842\\ c_2&=0.0312575832\\ c_3&=0.0025913712\\ c_4&=0.000171562\\ c_5&=5.4302\times 10^{-6}\\ c_6&=6.906\times 10^{-7} \end{align*}$$

Here's a plot of $R(x)-\exp(-x)$:

plot of R(x)-\exp(-x)

Hastings's book gives other, simpler approximations you can use if you have less stringent accuracy requirements. You can now plug this into your $\chi^2$ PDF expression to get the approximation you need.