Home>

I refer to this site.
https://catindog.hatenablog.com/entry/2018/07/29/172210
In the above URL, the standardized rank is passed to the erfinv function within the range of (-0.5, 0.5), and the returned value is shaped like a normal distribution.

Rank Gauss is a technique used to approximate a normal distribution to a biased graph
After ranking the magnitude of the continuous value, standardize the rank to fit within a specific range
After that, it seems to pass x to the inverse error function called erfinv
I don't know how the inverse error function here is getting closer to the normal distribution.

First, I looked at the error function. The error function seems to return the probability that the error will fall within a certain range when the normal distribution is assumed.
The erfinv function seems to be the inverse function.
The inverse function seems to hold the relationship erfinv (erf (x)) = x.

I'd be happy if you could just provide a hint or link to the page.

  • Answer # 1

    Some comments may be inaccurate, but I will comment.

    First, in order to understand the inverse error function, it is necessary to know the error function.
    Roughly speaking, the error function is a function that returns the cumulative sum p of probability densities in a random variable x for a normal distribution. Strictly speaking, the cumulative sum of probability density is calculated by the cumulative distribution function, but since both are in a linear relationship, the error function seems to be a function that outputs the cumulative distribution.

    Since the inverse error function is the inverse of the input and output, it is a function that returns a random variable x whose cumulative density is p for a normal distribution.

    This inverse error function outputs a value with non-equal intervals according to a specified normal distribution when a value with 0 to 1 equally divided is input. By using this characteristic, it is possible to convert random values ​​that follow a uniform distribution into random values ​​that follow a normal distribution.