Pātuhitia tēnei: Probabilistic foundations of statistical network analysis