## 2 Goodness-of-Fit  
We cannot test edge-independence on a single graph. While i.i.d. sample is common in statistical inference, in case of graphs the sample generally means a copy of a graph. Perhaps the number one question in statistical inference is the following. Let  
\[p_{1},\ldots,p_{n} \tag{6}\]  
be an arbitrary given sequence of probabilities, and  
\[\varepsilon_{1},\ldots,\varepsilon_{n} \tag{7}\]  
be independent \(0-1\) variables such that \(P(\varepsilon_{i}=1)=p_{i}\). Can we test the model? A randomized answer is the following. Let  
\[u_{1},\ldots,u_{n} \tag{8}\]  
be independent and uniformly distributed in \((0,1)\). Then  
\[x_{i}=p_{i}u_{i}\varepsilon_{i}+(1-\varepsilon_{i})(p_{i}+(1-p_{i})u_{i}), \quad i=1,\ldots,n \tag{9}\]  
are independent and uniformly distributed in \((0,1)\), which we can test. Another more practical solution is ordering the pairs \((p_{i},\varepsilon_{i})\) according to the \(p_{i}\)-s in increasing order and compare their partial sums. Or we can clump them into blocks of small number and compare again the sums. All these possibilities hold for graphs with estimated edge probabilities. Let us partition the edges of the complete graph according to the blocks formed with respect to the edge probabilities. In each portion the edge probabilities are close to each other whence the \(\varepsilon_{i,j}\)-s corresponding to that portion behave like a pure random graph, which we again can test, e.g., by their sums on subsets of vertices.  
[PERSON] with coworkers [9,33] propose for testing the beta model the following general procedure. Let us choose any graph statistic and determine it on our graph. Let us generate as many graphs as we can with the same degree sequence that the investigated graph has according to the uniform distribution, and let us calculate the chosen statistics. If the value of the sample graph is inside the generated numbers, we accept the beta model, otherwise reject it. One can ask, are there any effect of the choice on the power of the test?  
We have found by computer simulations that graphs generated by beta model have only one eigenvalue proportional with \(n\), and all the others are of order \(\sqrt{n}\). We think that it is a characteristic property of beta graphs. One wonders that  
* if beta model covers all possible degree sequences
* the conditional distribution is uniform over graphs sharing the same degree sequence  
then how is it possible that graph behaves differently from typical graphs generated by beta model? Of course there are graphs having many large eigenvalues. But where are they coming from once beta model can generate all the graphs? A possible solution of the catch is the following.  
Let us generate a meta-graph from graphs sharing the same degree sequence. Let us say that neighborhood in this meta-graph is given by one single swap. If we have four vertices A, B, C, D in agraph such that AC and BD are edges but AD and BC are not, then changing existence into non-existence among these edges we form a new graph with the same degree sequence. The degree of a graph in this meta-graph goes parallel with the second largest eigenvalue: typical beta model graphs have minimal degree and any increase in their degree results in a more complicated eigenvalue structure. Perhaps the degree in the meta-graph is the most characteristic statistic for beta model.