Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Hypothesis Tesing in Alteryx

huynv96
9 - Comet

Hi every one,

What is the right way to do a Hypothesis testing for Mean value in Alteryx.

Do you have a sample flow, previous post or a guide?

Thanks.

9 REPLIES 9
neilgallen
12 - Quasar

@huynv96 @You might want to look into the rest of means tool that’s a part of the predictive tools install. 

RolandSchubert
16 - Nebula
16 - Nebula

Hi @huynv96 ,

 

if you want to use Test of Means tool to check, if the Mean of group 1 shows a significant difference to the mean of group 2, you simply have to provide detail observation data to the Test of Means tool. You need the field to identify the group and a "measure" field (must be numeric). Welch's t-test is performed to test, if the groups have identical means. I've added a very simple sample workflow, configuration is really straightforward. Do this help in any way?

 

Best,

 

Roland

huynv96
9 - Comet

Hi @RolandSchubert 

Thank you for your respond.

I have issue about version so i can not open your workflow you attach.

I create a simple workflow and config as you guide, this is the result.

Capture.PNG

Can you explain more about T-test value? T-test for what exactly hypothesis in this case?

I see p_value very small, so can it means that we reject null hypothesis (Mean male = mean female) and conclusion is mean male and female is difference?

 

Thanks

RolandSchubert
16 - Nebula
16 - Nebula

Hi @huynv96 ,

 

in T-test, the null hypothesis is that the means of the two group are equal (alternative hypothesis for the test is that the difference of the means is not equal to zero).

If the t-value calculated by the T-test is negative, mean of group 1 is less than mean of group 2.

The p-value is the probability of wrongly rejecting the null hypothesis. If the p-value is lower than or equal to 0.05 (significance level 95%), we can reject the null hypothesis and accept the alternative hypothesis. In other words, we can conclude that the mean values of group 1 and 2 are significantly different. For your results, a very low p-value is calculated, so you can reject the null hypothesis (mean male = mean female) and conclude, that means for male and female employees are different.

 

I hope that clarifies things a bit.

 

Best,

 

Roland

huynv96
9 - Comet

Thanks @RolandSchubert ,

I have some question, hope you help:

You said "If the t-value calculated by the T-test is negative, mean of group 1 is less than mean of group 2.", Folow above image, male mean should be less than female mean, but i see it's not true, you can see.

f.PNGm.PNG

How can you know these info? Or where I can read these info about Test of Mean tool officially?

This tool is only hypothesis test 2 means? How about others hypothesis testing? Are there others tools relate to hypothesis test?

 

Thanks.

 

 

RolandSchubert
16 - Nebula
16 - Nebula

A short explanation of Welch's T-Test: https://www.statisticshowto.datasciencecentral.com/welchs-test-for-unequal-variances/ 

 

More comprehensive, including sample calculation using R: https://www.datanovia.com/en/lessons/types-of-t-test/unpaired-t-test/welch-t-test/ 

 

The formula to calculate T is:

12-01-_2020_16-45-49.png

As the denominator will always be positive, I think t can only be negative, if mean group 1 (A) is less than mean group 2 (B) resulting in the numerator beeing negative. Works fine in my example, maybe you can provide your date and workflow, would be easier to check then.

 

For other hypothesis tests, you could have a look at AB Testing tools, maybe they fit your needs.

 

huynv96
9 - Comet

Thanks @RolandSchubert ,

Last one, yes, can you check my workflow for above issue. Thanks

RolandSchubert
16 - Nebula
16 - Nebula

Your workflow is completely ok, there seems to be an output issue in the Test of Means tool. I've calculated t step-by-step (added calculation to your workflow) resulting in the expected value (t > 0). So there seems to be a problem with the sign for t in the results table (absolute values seem to be ok).

huynv96
9 - Comet

Many thanks @RolandSchubert 

Best helping!

Labels