Among all groups $G$ of order $n$ which one will maximum the value: $\frac 1n\sum_{g \in G}O(g)$ ? (Where $o(g)$ is the order of $g$).

As quid has stated the maximum attained for $\mathbb{Z}_n$. The problem goes back to 1991. See Americam Mathematical Monthly 1991, page 970. 


The maximum is attained for the cycylic group of order $n$, and only for this this group. See Sums of element orders in finite groups Commincations in Algebra, Vol 37, 2009, which considers this problem (except for not dividing by $n$, which however changes nothing, since in the question the order of the group is fixed). (The link is to the Zentralblatt MATH review and should work without subscription.) 

