* Nom du fichier: conf.kumac * * KUMAC pour expliquer un test a la compatibilite de deux echantillons * MP 1/95 * Histogrammes pour la presentation his/cre/1d 500 'Distribution echantillon R1 ' 20 0. 20. max 500 45. his/cre/1d 501 'Distribution echantillon R2 ' 20 0. 20. max 501 45. * Echantillon R1 et R2 sigma r1=rndm(array(100)) sigma r2=rndm(array(100)) * variance esperance * v v sigma g1=sin(2.*pi*r1)*sqrt(-2.*log(r2))*1.0 + 10. sigma g2=cos(2.*pi*r1)*sqrt(-2.*log(r2))*1.1 + 10.9 vec/hfill g1 500 vec/hfill g2 501 * Presentation for/file 20 'conf0.eps' meta 20 -113 zone 2 2 opt stat set stat 1111 his/plot 500 his/plot 501 close 20 wait * Comparaison avec une gaussienne N(,sigma_i) for/file 20 'conf1.eps' meta 20 -113 zone 2 2 his/plot 500 fun/plot ($hinfo(500,'entries')/sqrt(2.*3.14159)/$hinfo(500,'rms'))*exp(-(x-$hinfo(500,'mean'))**2/(2.*$hinfo(500,'rms')**2)) 0. 20. 's' his/plot 501 fun/plot ($hinfo(501,'entries')/sqrt(2.*3.14159)/$hinfo(501,'rms'))*exp(-(x-$hinfo(501,'mean'))**2/(2.*$hinfo(501,'rms')**2)) 0. 20. 's' sigma a1 = $hinfo(500,'mean') sigma a2 = $hinfo(501,'mean') sigma s1 = $hinfo(500,'rms')/sqrt($hinfo(500,'entries')) sigma s2 = $hinfo(501,'rms')/sqrt($hinfo(501,'entries')) sigma dr = abs(a1-a2)/sqrt(s1**2+s2**2) sigma pp = 2*freq(-dr) sigma print pp * Comparaison avec une gaussienne N(10,1) his/plot 500 fun/plot (100./sqrt(3.14159*2.0))*exp(-(x-10)**2/2.) 0. 20. 's' sigma dr = abs(a1-10)/s1 sigma pp = 2*freq(-dr) sigma print pp his/plot 501 fun/plot (100./sqrt(3.14159*2.0))*exp(-(x-10)**2/2.) 0. 20. 's' sigma dr = abs(a2-10)/s2 sigma pp = 2*freq(-dr) sigma print pp for/close 20