Calculate geometric mean in Excel
Posted
by
Libby
on Super User
See other posts from Super User
or by Libby
Published on 2012-11-28T18:34:12Z
Indexed on
2012/11/29
17:08 UTC
Read the original article
Hit count: 334
microsoft-excel
|worksheet-function
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?
© Super User or respective owner