Homophily in a network according to scalar characteristics (connectivity degree, age, income, ...) or enumerative characteristics (race, gender, ...) can be measured easily in Mathematica 9.
A friendship network at a high school with vertices color-coded by race.
In[1]:=
Highly social students are friends with other highly social students.
In[2]:=
X
Out[2]=
Measure the tendency for students to associate with others of the same race.