calculate standard deviation using math formula?

Hi I’m new to KNIME (switching over from 2 decades of SPSS & SAS).

I’m trying to create a new variable that is equal to the standard deviation across a range of columns. I notice that I can use the math formula node to do this for average and other measures. But I can’t find standard deviation. Note that this is NOT a group-by situation as I want to create a new column in the dataset.

How do I do this??

Thanks so much,
Lee

Hi Lee,

the Statistics node and the Data Explorer (JavaScript) node creates a new table with some statistics, including the standard deviation for all numerical columns. With a column filter node and a row filter node you can extract the information you are interested in.

If you want to add a new constant column with the standard deviation to the original table you can use the column appender node and control the constant value with a flow variable.

For an introduction to flow variables in KNIME I can recommend the chapter 7 of the free KNIME E-Learning course https://www.knime.com/knime-introductory-course/chapter7/section1

In addition we have a free From SAS to KNIME book which might be helpful for you as well:
https://www.knime.com/knimepress/from-sas-to-knime

Best,
Kathrin

Thank you Kathrin.

I don’t think that will work. I believe your response speaks of calculating standard deviation within a column. I need to calculate within each row across a range of columns.

I’m working with online survey data and I need to eliminate respondents that clicked through an entire bank of questions giving the same answer for each question. The way to do that is to calculate the standard deviation for each respondent (row) across a selection of columns. Then filter out those with sd = 0.

Hoping you can help :slight_smile:

I feel I need to ask the obvious question… why isn’t this feature simply in the most obvious place - the math formula node - along with it’s peers like “average”? It seems odd that it isn’t there.

I think I just found it in the column aggregator node :smile:

1 Like

Hi Lee,

perfect, well done! :slight_smile:

Cheers,
Kathrin