def sampleStats(block,status_col,rm1_col):
        """
        Calculates size, mean and average over a column of data matrix needed to calculate GSZ.

        Inputs:
                block = array of data arrays
                status_col = index of status column; used to filter data
                rm1_col = index of RM1 column; used as score in GSZ

        Outputs:
                sampleSize = size of filtered hitlist
                sampleScoreMean = mean of RM1 in filtered hitlist
                sampleScoreVariance = variance of RM1 in filtered hitlist
        """
        sampleSize=0
        summa=0.0
        sumsq=0.0
        for row in block:
                if row[status_col] == 'False': continue
                sampleSize+=1
                try:
                        rm1=float(row[rm1_col])
                except:
                        rm1=0.0
                summa+=rm1
                sumsq+=rm1*rm1
        # GSZ sample is the whole hitlist
        if sampleSize<1: return(0,0.0,0.0) # can't divide by zero
        sampleScoreMean=summa/sampleSize
        sampleScoreVariance=(sumsq-summa*summa/sampleSize)/sampleSize

        return(sampleSize,sampleScoreMean,sampleScoreVariance)