One sample t test

Good evening,

I am trying to create a workflow that could be used in my data. Let’s say I have 3 columns: Type, Measured value and Theoretical value. I would like to group the first column “Type” and apply one sample t-test. In the “single sample t-test” as a test value I would like to have every theoretical value and for distribution I would like to include measured value. At the end, I need a table where I could have an additional two columns with p-value and t-value as an outcome.
Is there anyone who could help me out with this issue? I have enclosed a provisional workflow :slight_smile:

Penalty calculation.knwf (17.7 KB)

Hi @Amanda252 ,

thanks for the provisional workflow, this helps a lot to help :slight_smile:

I think this is already very close to what you wanted - basically only the inner loop over the theoretical values was missing (and there where some whitespaces in the group column in the “Table Creator” which I removed with a String Manipulation node):

This would be the result:


which you can clean up with a column filter or table manipulator node.

Which KNIME Version are you on? Judging from the Joiner, which shows as deprecated for me, its a rather old version - do you have the possibility to upgrade? I hope the workflow I created works for you then:

Best Regards,
Lukas

1 Like

Hello Lukas,
Thank you for your response. I am working in the older KNIME version as per requirement of my supervisor :slight_smile: Anyway, your workflow helped me a lot. Thank you!

1 Like

Hello Lukas,
I’ve just realized that I didn’t phrase my question correctly. In the “single sample t-test” as a test value I would like to have every theoretical value that belongs to the same type. At the moment, the workflow calculates with every theoretical values in the table. How can I quickly change that?
Thank you in advance.

1 Like

Hey Amanda,

your very welcome :slight_smile:

Using only the theoretical values of one group is quite quickly changed indeed - just reconnect the inner loop directly to the outer one:
image
You then don’t even need the dummy connection anymore.

Cheers!

1 Like

Thank you very much Lukas!

1 Like

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