Calculate geometric mean in Excel
- by Libby
I have some email network data in Excel as a edgelist meaning I have columns Vertex1, Vertex2, and then N columns of properties of that edge like how many emails were sent from one person to another. For each row in the data, Vertex1 is the source of a message, and Vertex2 is the target, so edges are directed. Here's some sample data
Vertex1 Vertex2 nMessages
Bob Cindy 12
Cindy Bob 3
Bob Mike 11
Cindy Mike 1
I'm trying to calculate a geometric mean of the form
gm = sqrt[(# of edges ij)*(# of edges ji)]
So gm for Bob and Cindy is gm = sqrt[(messages from Bob to Cindy)*(messages from Cindy to Bob)] or sqrt(12*3) = 6. Is there a way to make that a formula in Excel?