Yes, check this out:

http://www.differencebetween.net/science/difference-between-average-and-mean/

And despite the fact that Microsoft selected to name the LINQ method “Average”, the calculation is indeed the mean.

]]>I don’t know if you noticed my post in the MS forums regarding the mode, but it is worth noting that a set of numbers can have more than one mode, so in the other style of LINQ:

Dim numbers() As Integer = {4, 4, 4, 4, 3, 2, 2, 2, 1, 1, 1, 1}

Dim modes = From a In _

(From n In numbers _

Group n By n Into g = Count() _

Select g, n) _

Where a.g = _

(From n In numbers _

Group n By n Into g = Count() Select g).Max _

Select a.n

‘ gives 4 and 1

Regards,

Andrew

]]>