高斯分布也就是正态分布

Categories: Uncategorized
Tags: , ,
Comments: 1 Comment
Published on: 2008/05/06

电子系的课程向来会把我原本还算感兴趣的课程教到看到它就会胃里一阵阵地不舒服。我现在已经看到高斯分布这个词就会反胃了,看到指数函数和对数函数,还有PDF,CDF之类的也会浑身不舒服。

Title: how to generate pseudo-random number Gaussian

How to produce a statistical distribution subject to the pseudo-random number, this is an eternal topic. In recent years, with Monte Carlo simulation methods and means in scientific research in the increasingly extensive application, how to efficiently get a lot of obedience to the will of the pseudo-random number to ensure that the number of guarantees on the basis of the quality of pseudo-random number (that is generated The pseudo-random number indeed have the necessary "random"), the majority of scientific research personnel are increasingly becoming concerned about the hot research field. Among the many statistical distribution, Gaussian distribution of the special nature of self-evident. So now there have been many excellent pseudo-random number generator method [1]. Nevertheless, there are still a lot of problems waiting for people to research, including:
 how to further enhance the formation of pseudo-random number efficiency » This is essential for large-scale simulation. We can envisage the existing Gaussian random number generator improve the efficiency of an order of magnitude, it is entirely possible for a limited time, through more sample data for a better statistical properties, thereby improving the simulation results. [1] summed up the current commonly used method, and from the efficiency, quality, ease of use, and other aspects of the comparison.
 how efficient the property produce "small probability" events » Simulation of the concerns of many in the so-called "small probability" events, that is, distribution of the "tail probability". Such as radars in the performance assessment of the "false alarm probability" test, it is necessary to study the radar "and the rare" abnormal value of the processing power. The value of these anomalies have often requires a large amount of "waste samples" as the "foreshadowing" (the value of these anomalies probability is very low, generally in the order of 10-10 or even lower). This shows pseudo-random number generator improve the efficiency of necessity, on the other hand, calls for more efficient revolutionary "small probability" method for the formation of the incident there.
 how to design more suited to hardware implementation of the random number generator methods » With the programmable devices, in particular FPGA technology advances, a large number of systems hardware platform began to shift. This method also makes corresponding demand for increasingly urgent transplant. As we all know, based on programmable hardware algorithm and the general realization of the software have more different, based on the simplified operation, avoid the use of non-linear, rational design branch of the cycle are all factors to be considered. [2] [3] in this regard has done some work.
 how to ensure that the premise of improving the efficiency of pseudo-random number selection of quality » Pseudo-random number selection of quality including their distribution and whether a given distribution agreement, samples of the relevant (generally recognized default
To produce the various samples are independent). Efficiency and quality of the existence of contradictions » Whether there can be balanced way » Are worthy of study.
We hope that the students in these select one of several areas as research, design to meet certain requirements, have certain characteristics of the Gaussian random number generator algorithm, and through computer simulation to verify the effectiveness of the approach and, ultimately, to complete the report. The following recommendations for students reference:
1. To make full use of simulation in C / C + + language, do not use MATLAB. The reason is that our problems do not normally involve an enormous amount of Matrix / vector computing, MATLAB advantage was not obvious and in the more simple scalar numerical computing and the cycle of operation Jump, MATLAB in the occupation of resources, such as the efficiency of the weakness rather conspicuous. [1] in the operating environment is Visual Studio 2005, we can work in the same environment, and it Bibi Kan.
2. MATLAB Gaussian random in a number of functions, such as randn, gaussrnd, if we designed the algorithm in both efficiency and quality can exceed them, the how exciting.
3. Gaussian because most of pseudo-random number generator are dependent on the uniform distribution of pseudo-random number generator (in fact most of the pseudo-random number generator are dependent on the uniform distribution), so given the literature [4] for reference. However, the uniform distribution should not be the focus of the study.

以下转载自:http://ylxiong.wordpress.com.cn/cc-tips/gauss-rand.html

以下函数用来生成服从高斯分布的随机数:

#include <stdlib.h>
#include <math.h>

double gaussrand()
{
static double V1, V2, S;
static int phase = 0;
double X;
if ( phase == 0 ) {
do {
double U1 = (double)rand() / RAND_MAX;
double U2 = (double)rand() / RAND_MAX;
V1 = 2 * U1 - 1;
V2 = 2 * U2 - 1;
S = V1 * V1 + V2 * V2;
} while(S >= 1 || S == 0);
X = V1 * sqrt(-2 * log(S) / S);
} else
X = V2 * sqrt(-2 * log(S) / S);
phase = 1 - phase;

return X;
}

1 Comment - Leave a comment
  1. maoz says:

    偶们系也有高斯分布
    不过不是很恶心……哈哈

Leave a comment

Your email address will not be published. Required fields are marked *


Welcome , today is Wednesday, 2018/02/21