# Tutorial: Actions

How to tell a program to take a behavior.

## Correlate Groups

The CorrelateGroups Class in Quorum implements several tests that determine if variables have any relationship to each other. This test provides useful information about the variables that can be helpful in Regression tests.

Listed below are functions that can be used to customize the tests that you run.

Set the ranked boolean to true for ranked samples observations. Default is false.
Custom Function Purpose
Ranked()Set the ranked boolean to true for ranked samples observations. Default is false.

The tests listed below is used for two groups of related data.

Tests for Two Groups
Formal Test Action in CompareGroups Class
Parametric: Pearson Correlation CoefficientCorrelateSelectedColumns
Non-Parametric: Spearman Correlation CoefficientCorrelateSelectedRankedColumns

#### Technical Test Name: Pearson Correlation Coefficient

A Pearson Correlation Coefficient measures the relationship between two related variables or groups. It can tell us how strong the relationship is and what direction it will change. This test tries to see if there is any connection between two things.

If the coefficient is between 0 and 1, then both will change in the same direction. An example of this is baby weight and length since the longer the length or height, the heavier the weight. If the coefficient is between 0 and -1, then they will change in opposite directions. One example of this would be the higher you go in the atmosphere, the less amount of oxygen there is. If it is zero, it means there is no relationship, but the farther away it is from zero means a stronger relationship.

### Measure Strength of Relationships For Unrelated Data

#### Technical Test Name: Spearman Correlation Coefficient

A Spearman Correlation Coefficient measures the relationship between two variables or groups that may not necessarily be related. It tries to see if there is any connection between two things. It will use the rank of the values for the two groups to determine the strength and direction of their relationship. It is much like the Pearson Correlation Coefficient mentioned above.

If the coefficient is between 0 and 1, then both will change in the same direction and there is a strong positive relationship. If the coefficient is between 0 and -1, then they will change in opposite directions and there is a strong negative relationship. If it is zero, there is no correlation or relationship.

For example, let's say we have a big friend group and we want to know if their height and weight are related to each other. We can use this test to see if there is a relationship and how strong that relationship is. If it is close to 1, then that means taller friends usually weigh more. If it is 0 then there is no relationship between height and weight.

## Next Tutorial

In the next tutorial, we will discuss Check Reducibility, which describes how to check the reducibility of your data.