Has any work been done on generalizing statistical computations to arbitrary structures? I was wondering what would be necessary for them to be meaningful. For example, the mean of a set is the "sum" of the set (probably a commutative monoid, since finite multisets are "free commutative monoids"?) but then how would one deal with the division by the size of the set?


I apologize if this isn't a very well-formed idea, but I've been playing with generalizations of common "real number" things to see what kinds of structures they'd need.


I tagged this with group theory even though I'm not sure groups would be involved (except maybe the division aspect of the sum, but that's division by a natural?) because I wasn't able to find a general "algebra" tag.



Statistical calculations over algebraic structures
There is a whole research area called Algebraic Statistics, although its boundaries are pretty blurry in my opinion. But you could do worse than to start with Seth Sullivant's web page for some idea of what it is all about: 


<http://www4.ncsu.edu/~smsulli2/Pubs/publications.html>


Titles like "Algebraic factor analysis: tetrads, pentads, and beyond" and "Algebraic statistical models" suggest to me that this may be what you are looking for.


