Statistics for Stability for Inference with Persistent Homology Rank Functions