# Tutorial: Actions

How to tell a program to take a behavior.## Compare Means Pairwise

The CompareMeansPairwise Class in Quorum implements multiple post-hoc analysis tests to check which group or groups failed (had a significance) in the first statistical tests that were run. These are intended to be used after running the Compare Groups tests with N groups.

Below are some functions that can be used to specify which tests you are going to run. For example, call the AssumeEqualVariances() function for unequal variances in the Games-Howell Test.

Custom Functions | Purpose |
---|---|

UseConservativeCorrection() | Set the useConservativeCorrection boolean to false in N-sample pairwise tests. Default is true. |

UseLiberalCorrection() | Set the useLiberalCorrection boolean to true in N-sample pairwise tests. Default is false. |

CorrectContinuityError() | Set the correctContinuityError boolean to false in N-sample pairwise tests. Default is true. |

AssumeEqualVariances() | Set the assumeEqualVariances boolean to true to assume variances are equal. Default is false. |

### Find Differences Across Groups

#### Technical Test Name: Bonferroni Correction

The Bonferroni Procedure is a series of t-tests performed on each group of pairs. It adjusts p-values of those t-tests so that we can compare any differences or significants in our groups. It is useful as a follow up test to ANOVA tests.

This test basically makes sure that we don't make too many mistakes when we are comparing a lot of things. For example, suppose we have different snacks and we want to see if there are any differences in how much people like them. We would compare the ratings for each snack, but if we compare too many snacks then we might think there is a difference when there really isn't.

The Bonferroni Correction helps us make sure that we don't get too excited about any small differences by making it harder for us to say there is actually a difference. It needs a really strong difference to say that there is a real genuine difference.

To do this test in Quorum, refer to the example below.

### Find Differences Across Groups with Equal Variances/Sample Sizes

#### Technical Test Name: Tukey's HSD Multiple Comparison Test

A Tukey's HSD Multiple Comparison Test is used to find which groups are different for equal sample sizes and assumes equal variances. It compares each mean with every other mean in a group. This test shows if there are any differences between groups of data and is mostly used as a followup to ANOVAs.

For example, if you have four groups (A, B, C, and D) and you conducted an ANOVA test. The results do not tell you which groups are different from the other groups. This is where a Tukey's HSD Multiple Comparison Test would be good to use. It would then compare the mean of A to the mean of B, C and D and then compare the mean of B to the mean of C and D and so on.

Below is an example of the test in Quorum.

### Find Differences Across Groups with Equal Variances and Different Sample Sizes

#### Technical Test Name: Tukey-Kramer HSD Multiple Comparison Test

For different sample sizes, a Tukey-Kramer HSD Multiple Comparison Test is used. It is the same as the Tukey's HSD Multiple Comparison Test mentioned above where every mean is compared with every other mean in a group. The only difference is that they have different sample sizes. It is a way to see if there are differences between groups of data.

Let's say we have four different teams A, B, C, D in a sports league. We want to see if there are any differences in their performances. We would then use this test to compare the mean score of Team A to the mean scores of Team B, C, D. Then we would compare the score of Team B to the mean scores of Teams C and D and so on.

To do this test in Quorum, refer to the example below.

### Find Differences Across Groups with Unequal Variances/Sample Sizes

#### Technical Test Name: Games-Howell Multiple Comparison Test

We use a Games-Howell Multiple Comparison Test to compare each mean with every other mean in a group. However, this test does not assume equal variances or equal sample sizes so there are a bunch of different groups in the data. It is used as a followup test for a Welch's ANOVA.

One example would be if you have three different classes A, B, C in school and want to see if there are any differences in scores on a test. Games-Howell would then compare the mean score of Class A to the mean scores of B and Class C. Then it would compare the mean scores of Class B to the mean score of Class C.

To do this test in Quorum, refer to the example below.

## Next Tutorial

In the next tutorial, we will discuss Correlate, which describes how to correlate variables.