Arithmetic mean of values from different columns and rows

Hey you all,

I would like to calculate the arithmetic mean and standard deviation from data that is listed in different columns and rows.
For each row there were made 10 measurements.
The data looks like this:

I would like to calculate the mean, but keep the structure of the columns and rows like this.

Thanks in advance for any help!

Hey @fseck

This is a job for the -GroupBy- node.
You can calculate (â€śaggregate byâ€ť in 2nd configuration tab) plenty of different statistics, i.e. the arithmetic mean, in one go by selecting all the columns having the same type.

In your case, you do not need to select any column to group by (in 1st configuration tab). This is allowed as a possible configuration in this node. Leave it blank.

Hope it helps

Best
Ael

3 Likes

What do you mean by second configuration tab?? I do not find that oneâ€¦

1 Like

The configuration menu of the -GroupBy- node has several tabs. The two most important are the first one for selecting the grouping column (no need in this case as mentioned previously) and the 2nd one to configure how to aggregate the column values, in your case using the arithmetic mean. This 2nd configuration tab should do the job.

Alternatively, one might use in your case the 4th configuration tab which allows to select bunches of columns by type, for instance as explained in the node help:

-The â€śType Based Aggregationâ€ť tab allows to select an aggregation method for all columns of a certain data type e.g. to compute the mean for all decimal columns (DoubleCell). Only columns that have not been handled by the other tabs e.g. group, column based and pattern based are considered. The data type list to choose from contains basic types e.g String, Double, etc. and all data types the current input table contains.-

4 Likes

I donâ€™t know if I formulated my problem well enough.
I donâ€™t want the mean of a column or a row, but the mean of ALL values from all rows and columns.
I have trouble solving that with the GroupBy node

I understand now what you mean.
In this case you could implement the following algorithm :

1. Aggregate all columns as a list of values using the -Column Aggregator- node:

Make sure that you have checked the option to remove all the initial colums that where aggregated.

1. Use the -Ungroup- node to ungroup all these values in a single column. Again make sure that you have checked the option to remove the initial colum with aggregated lists.
1. Use now the the -GroupBy- node (as explained in my previous answer) in this single column to calculate the mean of all your individual cell values.

Hope it helps.

Best
Ael

3 Likes

Thank you a lot for your help Ael!
Exactly what I was looking for

Have a good evening and a great new week

1 Like

Glad it worked and happy to help.
Thanks for having validated the solution.
Have a very nice week ahead too !
Best
Ael

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.