* FDENS PROCEDUR CHLOE 99/03/18 21:15:03 3528 * * * xi la variable * * * * tpar table contenant les parametres de la densite * * SORTIE : * * * fdens valeur de la densite en xi * * *loi rectangulaire numva=tpar . typva; SI (EGA numva loi_uniforme); A=TPAR . A; B=TPAR . B; SI (ET (>EG Xi A) (<EG Xi B)); xDENS= 1./ (B - A); SINON; xDENS=0.; FINSI; FINSI; * * *loi laplace SI (EGA numva loi_de_laplace ) ; xDENS=0.5 * (EXP (0. - (ABS Xi))); FINSI; * * *loi normale standard centree reduite SI (EGA numva loi_normale_standard) ; AUX1=0.5*Xi*Xi; AUX3=(2.*PI)**0.5; xDENS= (EXP (0. - AUX1)) / AUX3; FINSI; * * *loi exponentielle SI (EGA numva loi_exponentielle) ; LBDA=TPAR . LAMBDA; MU= TPAR . MU; SI (>EG Xi MU); xDENS=LBDA*(EXP (LBDA*(MU - Xi))); SINON; xDENS=0.; FINSI; FINSI; * * *loi lognormale SI (EGA numva loi_lognormale ); SI (> XI 0.); MOY = TPAR . MOYENNE ; FSIG= TPAR . ECART_TYPE; MOY2 = MOY * MOY; FSIG2=FSIG * FSIG; *N pour ecarttype et moyenne de la loi normale associe NSIG2=log((MOY2+FSIG2)/MOY2); NSIG = NSIG2 ** 0.5; NMOY = log(moy2/((MOY2+FSIG2)** 0.5)); aux=(2 * Pi)**0.5; xdens = 1 / (aux * NSIG * XI) * (exp (-1 / (2 * NSIG2) * (log xi - NMOY) * (log xi - NMOY))); sinon; xdens = 0d0; finsi; finsi; * * *loi normale SI (EGA numva loi_normale); MOY = TPAR . MOYENNE ; FSIG= TPAR . ECART_TYPE; aux1 = xi - moy ** 2 / -2 / (fsig*fsig); xdens = exp aux1 / ((2*pi)**0.5)/fsig ; finsi; * * *loi weibull min SI (EGA numva loi_weibull_min); TAU= TPAR . TAU; K= TPAR . K; W= TPAR . W; SI (>EG Xi TAU); AUX=(Xi-TAU)/(W-TAU); AUX2=AUX**(K - 1); AUX3=0. - (AUX**K); xDENS=AUX2*K/(W-TAU)*(EXP AUX3); SINON; xDENS = 0.; FINSI; FINSI; * * *loi normale tronquee SI (EGA numva loi_normale_tronquee); MM = TPAR . MOYENNE; SIIGM= TPAR . ECART_TYPE; MMIN= TPAR . MIN; MMAX= TPAR . MAX; SI (OU (<EG Xi MMIN) (>EG Xi MMAX)); xDENS=0.; SINON; AUX=(MMIN-MM)/SIIGM; AUX=(MMAX-MM)/SIIGM; AUX3=(Xi-MM)*(Xi-MM)/(-2.*SIIGM*SIIGM); AUX4=(2.*PI)**0.5*SIIGM; xDENS=(EXP AUX3)/(AUX2 - AUX1)/AUX4; FINSI; FINSI; * * **loi exponentielle tronquee SI (EGA numva loi_exponentielle_tronquee); LBDA=TPAR . LAMBDA; MU= TPAR . MU ; MIN= TPAR . MIN; MAX= TPAR . MAX; SI (OU (<EG Xi M) (>EG Xi MAX)); xDENS=0.; SINON; AUX1=EXP (LBDA*(MU-M)); AUX2=EXP (LBDA*(MU-MAX)); xDENS=LBDA*(EXP (LBDA*(MU-Xi)))/(AUX1 - AUX2); FINSI; FINSI; * * ***loi gumbel max SI (EGA numva loi_gumbel_max); LBDA=TPAR . LAMBDA; MU= TPAR . MU ; AUX=EXP (0. - (LBDA*(Xi - MU))); xDENS=LBDA*(EXP (0. - LBDA*(Xi - MU) - AUX)); FINSI; * * ****loi normale tronquee inf SI (EGA numva loi_normale_tronquee_inf); MM = TPAR . MOYENNE; SSIGM= TPAR . ECART_TYPE; MMIN= TPAR . MIN; SI (< Xi MMIN); xDENS=0.; SINON; AUX = (MMIN - MM)/SSIGM; AUX2=(Xi-MM)*(Xi-MM)/(-2*SSIGM*SSIGM); xDENS=(EXP AUX2)/((2.*PI)**0.5*SSIGM*(1. - AUX1)); FINSI; FINSI; * * ***** Loi de Frechet SI (EGA numva loi_de_frechet); U = TPAR . U; K = TPAR . K; B = TPAR . B; SI (<EG Xi B); xDENS = 0.; SINON; XAUX = ((U - B) / (Xi - B))**K; D1 = EXP (-1. * XAUX); xDENS = D1 * XAUX * K / (Xi - B); FINSI; FINSI; **** **** **** finproc xdens;
© Cast3M 2003 - Tous droits réservés.
Mentions légales