next up previous index
Next: V103 Random Bits Up: CERNLIB Previous: V101 Fast Random

V102 Pair of Random Numbers in Normal Distribution

Routine ID: V102
Author(s): J. HadbergLibrary: MATHLIB
Submitter: Submitted: 01.03.1968
Language: FortranRevised: 01.07.1979

OBSOLETE

Please note that this routine has been obsoleted in CNL 215. Users are advised not to use it any longer and to replace it in older programs. No maintenance for it will take place and it will eventually disappear.
Suggested replacement: CORSET (V122)

NORMCO generates two Gaussian distributed pseudo random numbers a and b with means ma,mb , standard deviations σab

and correlation coefficient ρ predefined by the user.

Structure:

SUBROUTINE subprogram
User Entry Names: NORMCO
External References: RNDM (V104)

Usage:

    CALL NORMCO(A,B,UA,UB,SIGMAA,SIGMAB,RHO)
A,B
( REAL) The two random numbers a and b.
UA
( REAL) The desired mean ma .
UB
( REAL) The desired mean mb .
SIGMAA
( REAL) The desired standard deviation σa .
SIGMAB
( REAL) The desired standard deviation σb .
RHO
( REAL) The desired correlation coefficient ρ

between A and B.

Method:

The routine generates two normal deviates
a = maa-2lny&sp;( 1-ρ2cos(2πx)+ρsin(2πx) )

b = mbb-2lnysin(2πx)

with each execution. x,y are random numbers, uniformly distributed in the interval (0,1) and obtained from RNDM (V104).

Notes:

For ma,mb=0 , σab=1 , ρ=0 use RANNOR (V100).

References:

  1. B. Jansson, BIT 4 (1964).

V103


Janne Saarela
Mon Apr 3 15:06:23 METDST 1995