# Tutorial: Actions

How to tell a program to take a behavior.

## Compare Variances

The CompareVariances Class in Quorum implements multiple tests to check different properties to see if they vary in a similar way under different conditions. It is how different each value in the data is from the average. Listed below are functions that allow you to customize the statistical tests that you run. For example, the Ranked() function would be called when you want the results to be ranked or the call the RepeatedMeasures() function for tests that use repeated measures.

Custom Functions for the Compare Variances Class
Custom Functions Purpose
UseMedianAsCenter()Set the useMedianAsCenter boolean to false. Default is true.
UseMeanAsCenter()Set the useMeanAsCenter boolean to true. Default is false.
UseTrimmedMeanAsCenter()Set the useTrimmedMeanAsCenter boolean to true. Default is false.
RepeatedMeasures()Set the repeatedMeasures boolean to true in an N-sample test. Default is false.

## Check For Variance Equality - Different Subjects Per Group

The tests listed below are used for two or more independent groups in T-Tests and Anovas.

Custom Functions for the Compare Variances Class
Formal Test Action in CompareVariances Class
Levene's Homogeneity Of Variances TestCompareVariancesUsingMean
Brown-Forsythe Homogeneity Of Variances TestCompareVariances

### Check if Groups Vary Using Mean

#### Technical Test Name: Levene's Homogeneity of Variances Test

We use Levene's Homogeneity of Variances Test to determine if the groups vary in the same way by using the mean.

It checks if the variances of two or more groups are the same or not. Let's say we want to compare the heights of students in two different classes. We measure the heights in the two classes and then calculate the mean. But, the spread of data, variance, for each class might be different like one class could have a wider range of heights than the other class.

Levene's Test checks if the variances are equal and if they are not, then it means one class might have more height differences than the other class.

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

### Check if Groups Vary Using Median

#### Technical Test Name: Brown-Forsythe Homogeneity Of Variances Test

A Brown-Forsythe Homogeneity Of Variances Test is used to determine if the groups vary in the same way by using the median or trimmed mean. It checks whether the variance or spread of two or more groups of data is similar or not.

Let's say you have two groups of students and you want to compare their test scores. Before you do that, you want to make sure that the spread of scores within each group is roughly the same. We can use this statistical test to check it.

Below is an example of the test using the median in Quorum.

## Check For Variance Sphericity - Same Subjects Per Group (Repeated Measurements)

The tests listed below are used for two or more dependent groups in Repeated Measures Anovas.

Tests to Check Varaince Sphericity for the Same Subjects
Formal Test Action in CompareVariances Class
Mauchly's Test Of SphericityCompareRelatedVariances

### Check if Groups Vary With Repeated Measures

#### Technical Test Name: Mauchly's Test of Sphericity

Mauchly's Test of Sphericity determines if the variances of the differences, or sphericity, are equal. Essentially, it checks if several groups vary in a similar way when they are repeated measures or where something is tested more than once.

It checks if a Repeated-Measures ANOVA is right to analyze this type of data. If the variances of differences are not equal, then a Repeated-Measures ANOVA might not be the best to analyze your data. An example of how to conduct this test in Quorum is below.

## Next Tutorial

In the next tutorial, we will discuss Compare Chances, which describes how to compare the chances of your results.