Statistical foundations for evolving networks