## 2.8 Degree Distributions

Another tool we have for analyzing a network is the degree distribution or the plotting of the number of nodes having a particular degree. In Figure 1.3, B, E, G, H, and I have a degree of three, A, C, and F have a degree of four, and D has a degree of five.

Figure 1.5 shows a degree distribution reflecting the graph in Figure 1.3. On the vertical axis is the number of nodes that have a degree that is plotted on the horizontal axis. Thus, there are five nodes with degree three plotted corresponding to a degree of three, three nodes of degree four plotted corresponding to degree four, and one node of degree five corresponding to degree five on the horizontal axis.

$\usepackage{pgfplots} \begin{tikzpicture} \begin{axis}[ x tick label style={ /pgf/number format/1 sep=}, ylabel=Number of Nodes, enlargelimits=0.05, legend style={at={(0.5,-0.1)}, anchor=north,legend columns=-1}, ybar interval=0.7, ] \addplot coordinates {(0,0),(1,0),(2,0),(3,5) (4,3) (5,1)}; \legend{Degree} \end{axis} \end{tikzpicture}$

While this is a pretty straight forward process, degree distributions are incredibly important for helping to analyze large networks.

Creating a degree distribution for a directed graph is a more difficult task, as two different distributions need to be created, one for the in-degree distribution and another for the out-degree distribution. Figure 1.7 shows the in-degree and out-degree distributions of the graph in Figure 1.4.

Indegree, 2, 1, 2, 2 Out-degree 0, 3, 4, 0
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "https://bookdown.org/omarlizardo/_main/2-8-degree-distributions.html", "fetch_time": 1718312008000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2024-26/segments/1718198861488.82/warc/CC-MAIN-20240613190234-20240613220234-00637.warc.gz", "warc_record_offset": 128396360, "warc_record_length": 4057, "token_count": 400, "char_count": 1520, "score": 3.515625, "int_score": 4, "crawl": "CC-MAIN-2024-26", "snapshot_type": "latest", "language": "en", "language_score": 0.8569680452346802, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00020-of-00064.parquet"}