private static double[] calculateMeanBoostrapValue( final Phylogeny t ) {
        double b = 0;
        int n = 0;
        long sum = 0;
        double x = 0.0, mean = 0.0;
        final double[] da = new double[ 2 ];
        final Vector<Double> bv = new Vector<Double>();
        PhylogenyNode node = null;
        PreorderTreeIterator i = null;
        i = new PreorderTreeIterator( t );
        // Calculates the mean.
        while ( i.hasNext() ) {
            node = i.next();
            if ( !( ( node.getParent() != null ) && node.getParent().isRoot()
                    && ( PhylogenyMethods.getConfidenceValue( node.getParent().getChildNode1() ) > 0 )
                    && ( PhylogenyMethods.getConfidenceValue( node.getParent().getChildNode2() ) > 0 ) && ( node
                    .getParent().getChildNode2() == node ) ) ) {
                b = PhylogenyMethods.getConfidenceValue( node );
                if ( b > 0 ) {
                    sum += b;
                    bv.addElement( new Double( b ) );
                    n++;
                }
            }
            // i.next();
        }
        if ( n < 2 ) {
            return null;
        }
        mean = ( double ) sum / n;
        // Calculates the standard deviation.
        sum = 0;
        for( int j = 0; j < n; ++j ) {
            b = ( bv.elementAt( j ) ).intValue();
            x = b - mean;
            sum += ( x * x );
        }
        da[ 0 ] = mean;
        da[ 1 ] = java.lang.Math.sqrt( sum / ( n - 1.0 ) );
        return da;
    }