  How can researchers test for heterogeneity in the local structure of a
network? In this paper, we present a framework that utilizes random sampling to
give subgraphs which are then used in a goodness of fit test to test for
heterogeneity. We illustrate how to use the goodness of fit test for an
analytically derived distribution as well as an empirical distribution. To
demonstrate our framework, we consider the simple case of testing for edge
probability heterogeneity. We examine the significance level, power and
computation time for this case with appropriate examples. Finally we outline
how to apply our framework to other heterogeneity problems.
