Article View: chile.comp.misc
Article #35406Re: Distribucion exponencial en C
From: Gaston Bravo
Date: Mon, 06 Apr 1998 00:00
Date: Mon, 06 Apr 1998 00:00
27 lines
1635 bytes
1635 bytes
Gerardo Buhler Cortes (gbuhler@accessnova.cl.SPAM) wrote:
: Y sin embargo, hay un metodo que no utiliza aproximaciones, sino que realiza
: el calculo a partir de una distribucion bidimensional, por lo que se puede
: construir un numero alatorio de N(0,1) a partir de dos numeros aleatorios
: u1->U(0,1) y u2->U(0,1), independientes!!. Si se cumple lo anterior,
: entonces z1 y z2 tales que:
: (ASCII ART :-))
: z1=(-2* ln(u1))^(1/2) sen(2*pi*u2)
: z2=(-2* ln(u2))^(1/2) cos(2*pi*u2)
: ...entonces z1 y z2 soon V.A. con distribucion normal estandarizada (N(0,1))
: e independientes.
Te falto el toque final, podrias haberlo dado.
El ultimo paso es pasar una normal (0,1) a una normal(mu,sigma^2)
Z(mu,sigma^2)=mu+sigma*z1 (con z1 calculado como lo dijo gerardo)
Con esto esta lista tu tarea y de paso hacemos un refresh a la teoria
--
Gaston Bravo Hurtado
gbravo@dii.uchile.cl Est. Ing. Civ. Industrial
gbravo@dcc.uchile.cl U. de Chile
Technical Details
Message-ID:
<6gbfr8$1vl@dcc.uchile.cl>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6g9l5e$ikk$1@antonia.webhost.cl> <6g9m7r$j4a$1@antonia.webhost.cl> <6g9md0$jmi@antonia.webhost.cl> <6g9mj9$j4a$3@antonia.webhost.cl> <6gaqsf$99v@dcc.uchile.cl> <6gaskv$b8j$1@ict.uchile.cl>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII-7-bit X-Google-Thread: 107d6b,dab859bce1b8fd5d X-Google-Attributes: gid107d6b,public From: gbravo@anakena.dcc.uchile.cl (Gaston Bravo) Subject: Re: Distribucion exponencial en C Date: 1998/04/06 Message-ID: <6gbfr8$1vl@dcc.uchile.cl> X-Deja-AN: 341641918 References: <6g9l5e$ikk$1@antonia.webhost.cl> <6g9m7r$j4a$1@antonia.webhost.cl> <6g9md0$jmi@antonia.webhost.cl> <6g9mj9$j4a$3@antonia.webhost.cl> <6gaqsf$99v@dcc.uchile.cl> <6gaskv$b8j$1@ict.uchile.cl> Organization: Universidad de Chile, Depto. de Ciencias de la Computacion Newsgroups: chile.comp.misc