Degree distribution
In the study of graphs and networks, the degree of a node in a network is the number of connections it has to other nodes and the degree distribution is the probability distribution of these degrees over the whole network. Definition. The degree of a node in a network (sometimes referred to incorrectly as the connectivity) is the number of connections or edges the node has to other nodes. If a network is directed, meaning that edges point in one direction from one node to another node, then nodes have two different degrees, the in-degree, which is  the number of incoming edges, and the out-degree, which is the number of outgoing edges. The degree distribution "P"("k") of a network is then defined to be the fraction of nodes in the network with degree "k". Thus if there are "n" nodes in total in a network and "n" of them have degree "k", we have formula_1. The same information is also sometimes presented in the form of a "cumulative degree distribution", the fraction of nodes with degree smaller than "k", or even the "complementary cumulative degree distribution", the fraction of nodes with degree greater than or equal  to "k" (1 - "C") if one considers "C" as the "cumulative degree distribution"; i.e. the complement of "C". Observed degree distributions. The degree distribution is very important in studying both real networks, such as the Internet and social networks, and theoretical networks. The simplest network model, for example, the (Erdős–Rényi model) random graph, in which each of "n" nodes is independently connected (or not) with probability "p" (or 1 − "p"), has a binomial distribution of degrees "k": (or Poisson in the limit of large "n", if the average degree formula_3 is held fixed). Most networks in the real  world, however, have degree distributions very different from this. Most are highly right-skewed, meaning that a large majority of nodes have low degree but a small number, known as "hubs", have high degree. Some networks, notably the Internet, the World Wide Web, and some social networks were argued to have degree distributions that approximately follow a power law: formula_4, where "γ" is a constant. Such networks are called scale-free networks and have attracted particular attention for their structural and dynamical properties. However, a survey of a wide range of real world networks suggests that scale-free networks are  rare when assessed using statistically rigorous measures. Some researchers have disputed these findings arguing that the definitions used in the study are inappropriately strict, while others have argued that the precise functional form of the degree distribution is less important than knowing whether the degree distribution is fat-tailed or not. The over-interpretation of specific forms of the degree distribution has also been criticised for failing to consider how networks may evolve over time. Excess degree distribution. Excess degree distribution is the probability distribution, for a node reached by following an edge, of the number of other edges attached  to that node. In other words, it is the distribution of outgoing links from a node reached by following a link. Suppose a network has a degree distribution formula_5, by selecting one node (randomly or not) and going to one of its neighbors (assuming to have one neighbor at least), then the probability of that node to have formula_6 neighbors is not given by formula_5. The reason is that, whenever some node is selected in a heterogeneous network, it is more probable to reach the hubs by following one of the existing neighbors of that node. The true probability of  such nodes to have degree formula_6 is formula_9 which is called the "excess degree" of that node. In the configuration model, which correlations between the nodes have been ignored and every node is assumed to be connected to any other nodes in the network with the same probability, the excess degree distribution can be found as: formula_10 where formula_11 is the mean-degree (average degree) of the model. It follows to that fact that the average degree of the neighbor of any node is greater than the average degree of that node. In social networks, it mean that your friends , on average, have more friends than you. This is famous as the friendship paradox. It can be shown that a network can have a giant component, if its average excess degree is larger than one: formula_12 Bear in mind that the last two equations are just for the configuration model and to derive the excess degree distribution of a real-word network, we should also add degree correlations into account. The Generating Functions Method. Generating functions can be used to calculate different properties of random networks. Given the degree distribution and the excess degree distribution of some network, formula_5 and  formula_9 respectively, it is possible to write two power series in the following forms: formula_15 and formula_16 formula_17 can also be obtained from derivatives of formula_18: formula_19 If we know the generating function for a probability distribution formula_5 then we can recover the values of formula_5 by differentiating: formula_22 Some properties, e.g. the moments, can be easily calculated from formula_23 and its derivatives: And in general: For Poisson-distributed random networks, such as the ER graph, formula_27, that is the reason why the theory of random networks of this type is especially simple. The probability distributions for the 1st and  2nd-nearest neighbors are generated by the functions formula_23 and formula_29. By extension, the distribution of formula_30-th neighbors is generated by: formula_31, with formula_32 iterations of the function formula_33 acting on itself. The average number of 1st neighbors, formula_34, is formula_35 and the average number of 2nd neighbors is: formula_36 Degree distribution for directed networks. In a directed network, each node has some in-degree formula_37 and some out-degree formula_38 which are the number of links which have run into and out of that node respectfully. If formula_39 is the probability that a randomly chosen node has in -degree formula_37 and out-degree formula_38 then the generating function assigned to this joint probability distribution can be written with two valuables formula_42 and formula_43 as: formula_44 Since every link in a directed network must leave some node and enter another, the net average number of links entering a node is zero. Therefore, formula_45, which implies that, the generation function must satisfy: formula_46 where formula_47 is the mean degree (both in and out) of the nodes in the network; formula_48 Using the function formula_49, we can again find the generation function for the in/out-degree distribution and in/out -excess degree distribution, as before. formula_50 can be defined as generating functions for the number of arriving links at a randomly chosen node, and formula_51can be defined as the number of arriving links at a node reached by following a randomly chosen link. We can also define generating functions formula_52 and formula_53 for the number leaving such a node: Here, the average number of 1st neighbors, formula_58, or as previously introduced as formula_34, is formula_60 and the average number of 2nd neighbors reachable from a randomly chosen node is given by: formula_61. These are also the numbers of 1st and  2nd neighbors from which a random node can be reached, since these equations are manifestly symmetric in formula_42 and formula_63. Degree distribution for signed networks. In a signed network, each node has a positive-degree formula_64 and a negative degree formula_65 which are the positive number of links and negative number of links connected to that node respectfully. So formula_66 and formula_67 denote negative degree distribution and positive degree distribution of the signed network.<ref name="10.1038/s41598-021-81767-7"></ref><ref name="10.1016/j.physa.2014.11.062"></ref>