given a graph, we sometimes notice a pattern of connectivity, a signal of something, and we desire to know whether "it is more extreme then we might expect by chance". this is a 1-sample testing question, which means we need to define:
the simplest null is ER. almost always in real applications ER is too simple, because nearly every test statistic from nearly every measured graph will substantially deviate from the expected test stat from any ER distribution. rather than conditioning on the expected # of edges (which ER basically does), one could condition on the actual number of edges. this is basically equivalent and similarly too simple.
one of the next simplest nulls is to condition on the degree sequence. for a directed graph, this could mean in-degree, out-degree, or both. assuming it is either in-degree or out-degree, conducting a permutation test is reasonably straightforward. for each row (or column) of the adjacency matrix, we simply uniformly permute the entries. this gives us a uniform sample from the null, which we can use to obtain an empirical estimate of the null distribution of any test statistic.
however, if one desires that the null distribution is conditioned on both the in-degree and out-degree, or the graph is undirected, a problem arises. in particular, that strategy will, in general, not yield a uniform sample from the null distribution of a given fixed degree sequence [proof or citation required here]. therefore, we have a few options:
a related but different strategy is a parametric bootstrap. in particular, we can estimate a degree corrected stochasitic block model to the data (somehow choosing d and k). then, given that estimate, we can sample from that distribuition nmc times, compute the test statistic, and then, get the critical region for any significance level. this has the conceptual advantage that we believe that the graphs we estimate tend to include noise, so we do not quite believe the degree sequence precisely. also, if the graph is nearly a DC-SBM, then we expect this approach to have higher power. however, if the graph does not look like a DC-SBM, then this approach will have worse power.
a numerical experiment of interest is to compute the power of the parametric bootstrap vs a version of the permutation test, for both data generated from the null and not, and see what happens as n increases.
there are, of course, a large number of possible test statistics. often, people are interested in determining whether the high-degree nodes are more connected than we would expect by chance. a few natural test statistics for this:
all of these are fine. if you know already the number of clusters of interest, and the data look like a DC-SBM, i suspect 2 will be more effective. however, for other generative models, or if there is no obvious clustering of the data, the other test statistics might be more effective.
for the permutation test, and the bootstrap, it is nice to know whether we have generated enough samples such that our estimators have converged. thus, having some tool that enables us to assess that would be helpful. possibly we can use a simple generative model and test statistic for which we know what the null distribution is, an therefore, we can look at our estimates as a function of sample size.
in connectomics, people have argued for the existence of a "rich club", meaning a set of nodes that are more connected than one would expect "by chance". they tend to mean "under a fixed degree sequence". however, they have not yet quite tested that exactly. thus, we can check the power of different null distributions using their test statistic, to see which one we recommend in practice.
we now understand the various possible tests one could use for 1-sample graph testing. we have compared different ways of generating the null distribution, and different test statistics. we have determined that rich clubs do (not) exist with p-value X.XX in the brain networks that we have observed.
to determine whether there is more clustering of the "high degree