"Alejandro perez" <[EMAIL PROTECTED]> writes: > Hi I would like to know how can I generate random numbers according to a > chi(not chi squared).I know how to do it for a chi squared so perhaps there > is a simple transformation of these numbers. > Thank you all
Y is chi^2 with n degrees of freedom and can be generated from a bunch of normal random numbers by Y = X_1^2+X_2^2+...+X_n^2 where the X_k come from a common normal distribution N(mu,s2) when mu is 0, we have a central chi^2, when it is non-zero it gives a non-central chi-square. The chi is just the square-root of the chi^2. So Z would be chi and can be created by Z = sqrt(X_1^2+X_2^2+...+X_n^2) with the same stuff about X_k as above. The central and non-central chi with 2 degrees of freedom are sometimes called Rayleigh and Rice distributions respectively. Hope this helps. -- Johan KULLSTAM <[EMAIL PROTECTED]> sysengr . . ================================================================= Instructions for joining and leaving this list, remarks about the problem of INAPPROPRIATE MESSAGES, and archives are available at: . http://jse.stat.ncsu.edu/ . =================================================================
