Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

T-test for comparing test and control means for several experiments

Trey1
7 - Meteor

Hi,

 

I am trying to test the difference in means for several experiments in the same Alteryx flow. Each experiment has a test and control group indicated by a dummy variable. If Population and Value are summed to the experiment and testing group level, the data look something like:

 

ExperimentGroupPopulationMean_Value
1

Test

15100
1Control17199
2Test75164
2Control36356
3Test52853
3Control46235

 

The 'Test of Means" tool will give the t-score, etc for a the test vs control, but it doesn't have any way to group on experiment. I need to know the p-value for if the test value is significantly different than the control value for each experiment. 

 

The only way I have figured out to do this would be to separate the data be experiment, use the Test Means tool to give the p-value, and rejoin the data. That is really cumbersome and not dynamic as I add new experiments to the bottom of the data.  

 

Any help would be greatly appreciated! If only the Test of Mean tool had a "groupby" function. 

 

Thanks,

Trey

3 REPLIES 3
T_Willins
14 - Magnetar
14 - Magnetar

Hi @Trey1,

 

A batch macro will give you the group by you are looking for and will allow for additional experiments to be added to the data.

 

Test of Means Macro.JPG

 

Test of Means.JPG

 

Trey1
7 - Meteor

Thank you for the super fast response with a macro!

 

I'm updating my Alteryx to use it, but it will take some time.

 

Will this macro automatically do the test for every experiment or do I have to create a new filter for each one? 

T_Willins
14 - Magnetar
14 - Magnetar

Hi @Trey1,

 

This batch macro will filter each data set to one experiment number at a time and process that data through the Test of Means, then repeat for the next experiment number and union the output of each separate experiment number's result.  I added a Formula tool to label each row in the Macro output.  As long as each experiment is labeled with a unique number, you can keep adding data and this macro should run.

Labels