networks in economics · lecture 2 - graph theory networks in economics and finance. outline •...
TRANSCRIPT
Lecture 2 - Graph TheoryNetworks in economics
and finance
Outline
• Types of networks
• Graphs - notation and terminology
• Properties of graphs
• Basic random graph model
• Why your friends have more friends than you do
What are networks and why study them?
• A network is a set of items (nodes) connected by edges or links.
• Networks are also found in biological (genetic and metabolic networks) and ecological systems (food webs).
• Questions we can address with networks: How does structure effect performance and fragility? Are there systemic risks (bank failures, spread of disease, etc)?
Units (nodes) Interaction
Individuals Friendship
Firms Trade
Banks Credit flow
Airports Transportation
Websites Web links
The history of the study of networks
• Graph theory ~ begins with Euler’s 1735 solution to the Koenigsberg Bridge problem.
• Networks in sociology ~ Focus on structure and interaction in small networks that were constructed from survey data. Typical question “Which node in this network would prove most crucial to the network's [property] if it were removed?”
• More recently ~ lots of data (networks with 1000‘s of nodes) is available and handled by computers. Statistical tools have been deployed to investigate these networks. Now the question is “What percentage of nodes need to be removed to substantially affect network [property]?”
• Modern theory ~ (i) statistical tools to characterize real networks, (ii) build models of networks and make predictions.
Graph theory
• A graph consists of a set of nodes (vertices) and edges describing which pair of vertices are connected, .
• Graph may be weighted or not .
• Graph is undirected if .
• Adjacency matrix where .
G = (V,E) V = {1, . . . , N}E = {(i, j) | i, j ! V }
[(i, j) ! R] [(i, j) ! {0, 1}]
(i, j) = (j, i)
A ! {0, 1}N!N Aij = 1! (i, j) " E
Walks, Paths and Cycles - 1
• Walk ~ sequence of edges: (i,c),(c,k),(k,j),(j,p).
• Path ~ walk between two specific nodes (i and j, for example): (i,c),(c,k),(k,j).
• Cycle ~ path starting and ending at the same node: (i,c),(c,k),(k,j),(j,i).
• Geodesic ~ shortest path between two nodes: (i,j).
• A path’s (walk’s) length is the number of edges involved.
Walks, Paths and Cycles - 2
• Using the adjacency matrix, gives us all the cycles of length 3 in the graph.
• gives all paths of length 2 between nodes i and j.
A3 =!
i
!
j,k
Aij Ajk Aki
(A! A)ij
Components
• An undirected graph is connected if every two nodes in the network are joined together in a path.
• A component in a graph is a connected subgraph, i.e.,
• A directed graph is strongly connected if there is a directed path in between every pair of nodes, i.e., i -> j and j -> i.
G! = (V !, E!), s.t. V ! ! V, E! ! E.
" i, j # V ! $ a path contains in E!
Types of graphs
Maximal independent set
• Given an undirected graph an independent set is a subset such that .
• An independent set is maximal if no new node can be added to the set without violating independence.
G = (V,E) U ! V! i, j " U, (i, j) /" E
Neighborhood and degree of a node
• The neighborhood of a node i is the set of other node that i is adjacent with, .
• For an undirected graph, the degree of node i is the cardinality of it’s neighborhood, .
• For an undirected graph:
Ni = {j | (i, j) ! E}
di = |Ni|
In degree : d ini =
!
j
Aij
Out degree : d outi =
!
j
Aji
Properties of networks
• Small networks are easy to visualize. But once we increase the number of nodes, we need to resort to other descriptive summary statistics.
• Examples of such measures: (i) Average path length, (ii) Clustering, (iii) Centrality and (iv) Degree distribution.
Diameter and average path length
• Define G(i,j) as the geodesic (shortest) path length between nodes i and j in an undirected graph. The diameter is the largest geodesic path, i.e.,
• The average path length is the average distance between any two nodes in the graph.
• The average path length is bounded above by the diameter.
• If a graph is not connected, take the diameter of the largest component.
diameter = maxi,j
G(i, j)
average path length =!
i<j G(i, j)N(N!1)
2
Clustering
• Measure for how tightly linked nodes are by counting the number of triangles.
• Ratio of the number of triangles in the graph over the number of triples (subgraphs of 3 nodes with either 2 or 3 edges between themselves).
• The clustering coefficient is bounded above and below by 1 and 0, respectively.
CI =3 ! number of triangles in network
number of connected triples of vertices
Clustering
• One can also measure the clustering of individual nodes. For an undirected graph:
• The average clustering coefficient:
CIi =!
j,k Aij Ajk Aki
di(di!1)2
CI Avg =1N
!
i
CIi
Centrality
• A measure of how important a particular node is in the network. Examples include:
degree centrality :di
(N ! 1)
closeness centrality :N ! 1!
j !=i G(i, j)
eigenvector centrality : x =1!
Ax
Degree distribution
• P(d) ~ frequency of different nodes having degree = d. For a given graph, P(d) is a histogram of fraction of nodes with degree d.
• For random graphs, P(d) is a well defined probability distribution. Examples of degree distributions include:
P (d) = c e!! d, c > 0, ! > 0
P (d) = c d!" , c > 0, " > 0
Assortativity
• A measure for how different nodes prefer to attach themselves to each other.
• Case 1: High degree nodes typically attach themselves to other high degree nodes. This tendency is referred to as assortativity.
• Case 2: The opposing case where High degree nodes are typically linked to low degree nodes is referred to as dissortativity.
• Define as the fraction of edges connecting nodes of degree i with nodes of degree j.
eij
!
ij
eij = 1,!
j
eij = ai,!
i
eij = bj .
r =!
i eii!
i ai bi
1!!
i ai bi.
Basic random graph model
• Erdos Renyi Random graph ~ N nodes; Link between two nodes occurs with probability p.
• Average degree per node?
• Degree distribution?
• Clustering coefficient?
• Diameter?
• Largest Component?
Why your friends have more friends than you
• Paper by S. Feld published in the American Journal of Sociology in 1991.
• Viewing friendship as a way of evaluating ones self, how do people determine what is an adequate number of friends?
• “If people look at the number of friends their friends have, it is likely they will feel relatively inadequate.”
• Specifically: “The mean number of friends’ friends is always greater than the mean number of friends of an individual.”
Why your friends have more friends than you
Full network consisted of 146 girls.
Why your friends have more friends than you
Why your friends have more friends than you
Why your friends have more friends than you
Network structure matters ~ Assortativity influences the mean