PROGRAM BT4_8 PARAMETER (NMAX=100,MMAX=12) DIMENSION X(NMAX,MMAX),Y(NMAX,MMAX) REAL MUY1,MUY2,XICMA, ALFA,U,UALFA INTEGER NX,NY,M,I,J CHARACTER*15 H0,H1,ANSWER1,ANSWER2 ! XICMA: DO LECH CHUAN CUA X ! ALFA: XAC SUAT PHAM SAI LAM LOAI I DATA XICMA,ALFA /0.4,0.05/ DATA H0,H1 /'CHAP NHAN H0','BAC BO H0'/ OPEN(1,FILE='C:\MASTER\G_TR\BAITAP~1\NEW\BANG11-B.TXT') READ(1,*) READ(1,*) READ(1,*) NX,M DO I=1,NX READ(1,*) TMP, (X(I,J),J=1,M) ENDDO OPEN(1,FILE='C:\MASTER\G_TR\BAITAP~1\NEW\BANG11-C.TXT') READ(1,*) READ(1,*) READ(1,*) NY,M DO I=1,NY READ(1,*) TMP, (Y(I,J),J=1,M) ENDDO ! TINH TRUNG BINH SO HOC MUY1=0.0 DO I=1,NX DO J=1,M MUY1=MUY1+X(I,J) ENDDO ENDDO MUY1=MUY1/REAL(NX*M) MUY2=0.0 DO I=1,NY DO J=1,M MUY2=MUY2+Y(I,J) ENDDO ENDDO MUY2=MUY2/REAL(NY*M) ! TINH U VA UALFA U=(MUY1-MUY2)/(XICMA*SQRT(1.0/REAL(NX)+1.0/REAL(NY))) UALFA=ANINV(1.0-ALFA/2.0,0.0,1.0) IF (ABS(U).LT.UALFA) THEN ANSWER1=H0 ELSE ANSWER1=H1 ENDIF WRITE(*,*)' KET QUA KIEM NGHIEM U - H0: MUY1=MUY2' WRITE(*,'(" MUY1 = ",F10.3)') MUY1 WRITE(*,'(" MUY2 = ",F10.3)') MUY2 WRITE(*,'(" N1 = ",I10)') NX WRITE(*,'(" N2 = ",I10)') NY WRITE(*,'(" U = ",F10.3)') U WRITE(*,'(" ALFA = ",F10.3)') ALFA WRITE(*,'(" UALFA = ",F10.3)') UALFA WRITE(*,'(" KET LUAN: ",A15)') ANSWER1 END FUNCTION ANORMD(AMUY,XICMA,A,B) ! HAM NAY TINH XAC SUAT DE BIEN NGAU NHIEN PHAN BO CHUAN ! NHAN GIA TRI TRONG KHOANG (A,B): P(A