	SUBROUTINE SUB(IN,N,YLD,EM,YK)
	DIMENSION YLD(1810)
	S=0
	DO 2 I=IN+1,N
	S=S+YLD(I)
2	CONTINUE
	EM=S/(N-IN)
	SS=0
	DO 4 I=IN+1,N
	SS=SS+((EM-YLD(I))**2)
4	CONTINUE
	SD=SQRT(SS/(N-IN-1))
	WRITE(4,5)EM,SD
10	WRITE(5,5)EM,SD
5	FORMAT(1X,' THE MEAN=',F15.6,3X,'THE STANDARD DEVIATION=',F15.6)
	YLDMAX=YLD(IN+1)
	YLDMIN=YLD(IN+1)
	DO 7 I=IN+1,N
	IF(YLDMAX.GE.YLD(I))GOTO 6
	YLDMAX=YLD(I)
6	CONTINUE
	IF(YLDMIN.LE.YLD(I))GOTO 7
	YLDMIN=YLD(I)
7	CONTINUE
	WRITE(4,8)YLDMAX,YLDMIN
11	WRITE(5,8)YLDMAX,YLDMIN
8	FORMAT(1X,' MAX=',F9.3,5X,' MIN=',F9.3,/)
	WRITE(4,88)
	WRITE(5,88)
88	FORMAT(1X,5X,'STATISTICS FOR T TEST OF THE MEAN OF YI
     CELD VALUES')
	X=N-IN
	T=((EM-YK)/SD)*SQRT(X)
	WRITE(4,89)T,(N-IN-1)
	WRITE(5,89)T,(N-IN-1)
89	FORMAT(1X,5X,'T=',F15.7,4X,'FOR',I6,'  DEGREES OF FREEDOM')
	JM=0
	BY=EM+(2*10.7)
	BZ=EM-(2*10.7)
	DO 93 JS=IN+1,N
	IF(YLD(JS).GT.BY)JM=JM+1
	IF(YLD(JS).LT.BZ)JM=JM+1
93	CONTINUE
	AB=(JM*100.)/(N-IN)
	WRITE(4,95)AB
	WRITE(5,95)AB
95	FORMAT(1X,4X,/,'THE PERCENT OF POINTS OUTSIDE TWO SIGMA BOUNDS=
     C  ',F15.7)
	RETURN
	END
