斜正态分布中的随机数(等价于NORMINV()))

时间:2022-04-20 01:02:14

I'm trying to create a skewed random number generator using a skew normal distribution, but I don't know how to turn my formula (which uses NORMDIST()) into a NORMINV()-based formula that can generate the numbers I want. This is my formula:

我正在尝试使用倾斜正态分布创建一个倾斜随机数生成器,但是我不知道如何将我的公式(使用NORMDIST())转换成一个基于NORMINV()的公式来生成我想要的数字。这是我的公式:

=2/s * NORMDIST((x-m)/s, 0, 1, 0) * NORMSDIST(k*(x-m)/s)

Where "x" is the number, "s" is the scale, "m" is the location, and "k" is the shape. I admit I found the formula online, but it seems to do what I want to do, except the wrong way around.

x是数字,s是比例,m是位置,k是形状。我承认我在网上找到了这个公式,但它似乎做了我想做的事,只是方法不对。

How can I do this?

我该怎么做呢?

1 个解决方案

#1


2  

Adelchi Azzalini has a page on how to generate pseudo-random numbers with skew-normal (SN) distribution. Here from the page:

Adelchi Azzalini有一个关于如何生成倾斜正态(SN)分布的伪随机数的页面。这里从页面:

斜正态分布中的随机数(等价于NORMINV()))

The N(0,1) variates u0 and v in step 1. can be calculated in Excel as NORMINV(RAND(),0,1). And δ expressed in terms of shape parameter α is δ = α/SQRT(1+α*α).

N(0,1)在步骤1中使u0和v发生变化。可以在Excel中计算为NORMINV(RAND(),0,1)。和δ表示的形状参数αδ=α/√(1 +α*α)。

Note: Python's SciPy is in the process of getting a skew-normal random variable (scipy.stats.skewnorm), see here in SciPy 0.18.0rc2 code. The docs reference a paper by Azzalini and Capitanio and the same page I referenced above.

注意:Python的SciPy正在获取一个skew-normal随机变量(scipy.stats.skewnorm),见这里的SciPy 0.18.0rc2代码。文件中引用了阿扎里尼和卡帕尼奥的论文和我上面引用的同一页。

#1


2  

Adelchi Azzalini has a page on how to generate pseudo-random numbers with skew-normal (SN) distribution. Here from the page:

Adelchi Azzalini有一个关于如何生成倾斜正态(SN)分布的伪随机数的页面。这里从页面:

斜正态分布中的随机数(等价于NORMINV()))

The N(0,1) variates u0 and v in step 1. can be calculated in Excel as NORMINV(RAND(),0,1). And δ expressed in terms of shape parameter α is δ = α/SQRT(1+α*α).

N(0,1)在步骤1中使u0和v发生变化。可以在Excel中计算为NORMINV(RAND(),0,1)。和δ表示的形状参数αδ=α/√(1 +α*α)。

Note: Python's SciPy is in the process of getting a skew-normal random variable (scipy.stats.skewnorm), see here in SciPy 0.18.0rc2 code. The docs reference a paper by Azzalini and Capitanio and the same page I referenced above.

注意:Python的SciPy正在获取一个skew-normal随机变量(scipy.stats.skewnorm),见这里的SciPy 0.18.0rc2代码。文件中引用了阿扎里尼和卡帕尼奥的论文和我上面引用的同一页。