|
|
|
|
![]() |
Daily Speculations The Web Site of Victor Niederhoffer & Laurel Kenner Dedicated to the scientific method, free markets, deflating ballyhoo, creating value, and laughter; a forum for us to use our meager abilities to make the world of specinvestments a better place. |
Write to us at:
(address is not clickable)
integer ivec(6000)c select 'nattack' persons without replacement from 'npop'
npop=6000
nattack=41
nth=20
monte=10000
nsig=0
call RSEED(23,1554,9001)
call SMP0INI(npop,ivec)
do 1000 i=1,monte
call SMPL3(npop,nattack,ivec,ier)c check whether each person having attack is in group 1, 2 or 3
itot1=0
itot2=0
itot3=0
do 50 k=1,nattack50 continue
ipers=ivec(k)
if (ipers.ge.1 .and. ipers.le.2000) itot1=itot1+1
if (ipers.ge.2001 .and. ipers.le.4000) itot2=itot2+1
if (ipers.ge.4001 .and. ipers.le.6000) itot3=itot3+1
if (ipers.gt.npop) stop
isaw=01000 continue
if (itot1.ge.nth .or. itot2.ge.nth .or. itot3.ge.nth) isaw=1
if (isaw.gt.0) nsig=nsig+1
write(6,1010) nsig,monte1010 format(i6,' cases found in ',i6,' random trials')
end