In Figure REF  (left panel) the global risk predicted from the cavity equation (REF ) is plotted for an Erdös-Rényi (ER) graph with mean degree \({{\langle }k {\rangle }}=5\)  and shown to be in excellent agreement with results from simulations [1]}, [2]}, [3]} of the stochastic SIR model on networks with \(N=3000\)  nodes.
We note that the wide error bars, showing the standard deviation of the risk across different initial sites of infection, indicate that there is large variation in the risk of individual nodes in a given ER network. The impact of degree correlations is shown on the right panel of Figure REF , where results from the cavity equations are
shown for networks with the same average connectivity and Poissonian degree distribution, but assortative and disassortative degree mixing, respectively. To compute the degree correlation function \(\mathrm {W}(k,k^{\prime })\)  for assortative and disassortative Poissonian graphs we followed the methods described in [4]}. These results are consistent with results for the size of the giant component in networks with degree correlations [5]}. In Figure REF  we plot the global risk as a function of the fraction \(1-p\)  of vaccinated population in ER graphs with average connectivity \({{\langle }k {\rangle }}=5\) . In the left panel we see that predictions from the cavity equations () are in agreement with results from simulations on networks of size \(N=1000\) . The right panel shows that the herd immunity threshold is lowest in Poissonian graphs with disassortative correlations, and highest for ER graphs with assortative correlations.
<FIGURE>