gives the mean clustering coefficient of the graph g.
MeanClusteringCoefficient[{vw,…}]
uses rules vw to specify the graph g.
MeanClusteringCoefficient
gives the mean clustering coefficient of the graph g.
MeanClusteringCoefficient[{vw,…}]
uses rules vw to specify the graph g.
Details
- MeanClusteringCoefficient is also known as the average or overall clustering coefficient.
- The mean clustering coefficient of g is the mean over all local clustering coefficients of vertices of g.
- MeanClusteringCoefficient works with undirected graphs, directed graphs, and multigraphs.
Examples
open all close allBasic Examples (2)
Find the mean clustering coefficient of a graph:
MeanClusteringCoefficient[[image]]Mean clustering coefficient in the Watts–Strogatz model as a function of rewiring probability:
Plot[MeanClusteringCoefficient[RandomGraph[WattsStrogatzGraphDistribution[10 ^ 3, p, 5]]], {p, 0, 1}, MaxRecursion -> 0]Scope (5)
MeanClusteringCoefficient works with undirected graphs:
MeanClusteringCoefficient[[image]]MeanClusteringCoefficient[[image]]MeanClusteringCoefficient[[image]]Use rules to specify the graph:
MeanClusteringCoefficient[{1 -> 2, 1 -> 3, 2 -> 3, 2 -> 4, 3 -> 1, 3 -> 2, 3 -> 4}]MeanClusteringCoefficient works with large graphs:
g = CirculantGraph[10000, Range[20]];MeanClusteringCoefficient[g]//TimingApplications (2)
Mean clustering coefficient of a power grid network:
g = ExampleData[{"NetworkGraph", "PowerGrid"}];N[MeanClusteringCoefficient[g]]Compare to uniform random graphs:
𝒟 = GraphPropertyDistribution[MeanClusteringCoefficient[h], hUniformGraphDistribution[VertexCount[g], EdgeCount[g]]];N[Mean[RandomVariate[𝒟, 1000]]]Collaboration networks tend to have high mean clustering coefficients:
g = ExampleData[{"NetworkGraph", "HighEnergyTheoryCollaborations"}];N[MeanClusteringCoefficient[g]]Compare to uniform random graphs:
𝒟 = GraphPropertyDistribution[MeanClusteringCoefficient[h], hUniformGraphDistribution[VertexCount[g], EdgeCount[g]]];N[Mean[RandomVariate[𝒟, 1000]]]Properties & Relations (7)
MeanClusteringCoefficient is the mean over all local clustering coefficients of vertices:
Graph[{12, 13, 23, 24, 34}]{MeanClusteringCoefficient[%], Mean[LocalClusteringCoefficient[%]]}The mean clustering coefficient is between 0 and 1:
RandomGraph[UniformGraphDistribution[20, 50]]N[MeanClusteringCoefficient[%]]For a graph with no vertices of degree greater than 1, the mean clustering coefficient is 0:
Graph[{12, 34}]MeanClusteringCoefficient[%]The mean clustering coefficient of a complete graph with at least three vertices is 1:
CompleteGraph[5]MeanClusteringCoefficient[%]Distribution of mean clustering coefficient in BernoulliGraphDistribution:
𝒟 = GraphPropertyDistribution[MeanClusteringCoefficient[g], gBernoulliGraphDistribution[8, 0.6]];Histogram[RandomVariate[𝒟, 1000]]NExpectation[x, x𝒟]Distribution of mean clustering coefficient in WattsStrogatzGraphDistribution:
𝒟[n_, p_, k_] := GraphPropertyDistribution[MeanClusteringCoefficient[g], gWattsStrogatzGraphDistribution[n, p, k]];Histogram[RandomVariate[𝒟[50, 0.05, 3], 1000]]With low rewiring probability and high mean vertex degree, the expected value is near
:
NExpectation[x, x𝒟[100, 0.01, 20]]With high rewiring probability, the expected value is near 0:
NExpectation[x, x𝒟[100, 0.99, 2]]Distribution of mean clustering coefficient in BarabasiAlbertGraphDistribution:
𝒢 = BarabasiAlbertGraphDistribution[100, 10];data = RandomVariate[GraphPropertyDistribution[MeanClusteringCoefficient[g], g𝒢], 1000];Histogram[data]Compare with GlobalClusteringCoefficient:
data2 = RandomVariate[GraphPropertyDistribution[GlobalClusteringCoefficient[g], g𝒢], 1000];Histogram[{data, data2}]Related Guides
Text
Wolfram Research (2012), MeanClusteringCoefficient, Wolfram Language function, https://reference.wolfram.com/language/ref/MeanClusteringCoefficient.html (updated 2015).
CMS
Wolfram Language. 2012. "MeanClusteringCoefficient." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/MeanClusteringCoefficient.html.
APA
Wolfram Language. (2012). MeanClusteringCoefficient. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MeanClusteringCoefficient.html
BibTeX
@misc{reference.wolfram_2026_meanclusteringcoefficient, author="Wolfram Research", title="{MeanClusteringCoefficient}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/MeanClusteringCoefficient.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_meanclusteringcoefficient, organization={Wolfram Research}, title={MeanClusteringCoefficient}, year={2015}, url={https://reference.wolfram.com/language/ref/MeanClusteringCoefficient.html}, note=[Accessed: 13-June-2026]}