Statistical analysis of a hierarchical clustering algorithm with outliers