Inverse Gaussian transform

//Inverse cumulative Gaussian transform.
// This routine takes a proportion p and returns the corresponding
// x-value of a cumulative Gaussian of zero mean and unit standard deviation.
// Odeh, R. E. & Evans, J. O. (1974) Algorithm AS 70: Percentage points
// of the normal distribution. Applied Statistics, 23, 96-97. Described in
// Kennedy, W. J. & Gentle, J. E. (1980) Statistical Computing, New York:
// Dekker, pp. 95-96.


double Random::NormalRandom(float avr, float deviation)
{
const double p0 = -0.322232431088;
const double p1 = -1;
const double p2 = -0.342242088547;
const double p3 = -0.0204231210245;
const double p4 = -0.0000453642210148;
const double q0 = 0.099348462606;
const double q1 = 0.588581570495;
const double q2 = 0.531103462366;
const double q3 = 0.10353775285;
const double q4 = 0.0038560700634;

double y, x, p, R = Random.NextFloat(0.0f, 1.0f);
p = R > 0.5 ? 1.0 - R : R;
y = sqrt (-log (p * p));
x = y + ((((y * p4 + p3) * y + p2) * y + p1) * y + p0) / ((((y * q4 + q3) * y + q2) * y + q1) * y + q0);
if (R < 0.5) x = -x;

return deviation * x + avr;
}

==============================
함수 내용 자체는, 정규 분포를 가지는 랜덤 함수라고는 알겠는데...
이게 어떻게 이렇게 되는지 설명좀 해주실 수 있는분?

... 이라고 해도 OTL

( 2 + 2 * 2 = 8 ? ... 조낸 적절한 짤방)

by 클랴 | 2008/05/13 20:38 | 트랙백 | 덧글(3)

트랙백 주소 : http://cloudree.egloos.com/tb/3741744
☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]
Commented by 쌍부라 at 2008/05/13 20:47
확통은 제대로 들은 적이 없고 랜덤프로세스 같은 과목도 들은 적이 없다보니 (..)
Commented by 랑쿨 at 2008/05/13 22:28
이럴때는 덧글을 안다는게 승리하는 법! (그러나 이미 달고 있..)
Commented by StudioEgo at 2008/05/16 01:48
지금 배우는 확률 및 통계 과목에서 저런 내용이 나오긴 한데 저도 이해를 잘못해서 ㅠㅠ
랜덤프로세스과정이 머리 터지더군요 OTL

:         :

:

비공개 덧글

◀ 이전 페이지 다음 페이지 ▶