Gregory Lypny wrote:
> Hello everyone,
>
> If I use functions, such as Mean, StandardDeviation, or Total, that
> operate on lists, they work the way I expect when applied to a single
> list. So, for example, the mean of data[[2]] below is 5.25.
> However, when I apply Mean to the entire 3 x 4 matrix, which I
> understand to be three lists, I expect to get three means. Instead I
> get four because Mean is operating on the columns and not the rows,
> that is, the four corresponding elements of each of the three lists.
>
> Why is that?
That's just how these functions handle lists of lists, which at least for
Mean is stated clearly in the helpbrowser. You can either use Map as you
have done or:
Mean[Transpose[data]]
to achieve the result you want.
hth,
Albert