      subroutine stebj0(n,fj,fm,fv,fe) ! bernd berg april 5 1991.
c                                                                     
c calculation of jackknife estimators from  n  jackknife bins  fj(n):
c                                                                     
c - the mean value:   fm,
c - the variance:     fv,
c - the error bar:    fe=sqrt(fv/n), (standard deviation of fm).   
c                                                                     
      include '../../libs/fortran/implicit.sta' 
      include '../../libs/fortran/constants.par' 
      dimension fj(n)
c
      if(n.lt.2) stop 'stebj0: n too small!'
      fm=zero
      fv=zero
c
      do i=1,n
        fm=fm+fj(i)
      end do
      fm=fm/n
c 
      do i=1,n
        fv=fv+(fj(i)-fm)**2
      end do
      fv=fv*(n-1)
      fe=sqrt(fv/(n*one))
      return
      end
