This tool is a statistical calculator that measures the strength and direction of the association between two ordinal variables. Ordinal variables are categories that have a natural order or ranking, such as “low, medium, high” or “agree, neutral, disagree.” You use this calculator to determine if there is a pattern in how the rankings of the two variables relate to each other. For instance, you could use it to see if a higher level of education is associated with a higher income bracket. The calculator produces a value called the Gamma coefficient, which ranges from -1 to +1. This single number tells you whether the relationship is positive (as one variable increases, the other tends to increase) or negative (as one variable increases, the other tends to decrease), and how strong that relationship is.
formula
1. Main Formula
The primary formula for calculating the Gamma coefficient (G) is based on the number of concordant and discordant pairs in your data.
Main Formula
Gamma = (Number of Concordant Pairs – Number of Discordant Pairs) / (Number of Concordant Pairs + Number of Discordant Pairs)
Simplified Symbolic Formula
G = (C – D) / (C + D)
2. Supporting Calculations
To use the primary formula, you must first determine the number of concordant and discordant pairs from your dataset. These calculations are performed by comparing every possible pair of observations in the dataset.
Assume you have a set of observations, where each observation has a value for Variable X and Variable Y.
a) How to Identify a Concordant Pair
A pair of observations is concordant if one observation ranks higher on both variables compared to the other observation.
Condition for Concordance:
(X value of observation 1 > X value of observation 2) AND (Y value of observation 1 > Y value of observation 2)
OR
(X value of observation 1 < X value of observation 2) AND (Y value of observation 1 < Y value of observation 2)
Calculation:
The “Number of Concordant Pairs” (C) is the total count of all pairs that meet this condition.
b) How to Identify a Discordant Pair
A pair of observations is discordant if one observation ranks higher on one variable but lower on the second variable compared to the other observation.
Condition for Discordance:
(X value of observation 1 > X value of observation 2) AND (Y value of observation 1 < Y value of observation 2)
OR
(X value of observation 1 < X value of observation 2) AND (Y value of observation 1 > Y value of observation 2)
Calculation:
The “Number of Discordant Pairs” (D) is the total count of all pairs that meet this condition.
Interpreting the Gamma Coefficient
The value of the Gamma coefficient always falls between -1 and +1. This table helps you understand what the different values mean in terms of the strength and direction of the association between your two variables.
Gamma Value Range | Interpretation of Association |
+0.60 to +1.00 | Strong Positive Association |
+0.30 to +0.59 | Moderate Positive Association |
+0.01 to +0.29 | Weak Positive Association |
0.00 | No Association |
-0.01 to -0.29 | Weak Negative Association |
-0.30 to -0.59 | Moderate Negative Association |
-0.60 to -1.00 | Strong Negative Association |
Example
Let’s calculate the Gamma coefficient for a small dataset. Suppose we survey four people and ask for their level of education and their job satisfaction, both ranked on a scale of 1 to 3 (where 1 is low and 3 is high).
Our data:
- Person A: Education = 1, Satisfaction = 1
- Person B: Education = 2, Satisfaction = 2
- Person C: Education = 3, Satisfaction = 3
- Person D: Education = 2, Satisfaction = 1
First, we must list all possible pairs of people: (A,B), (A,C), (A,D), (B,C), (B,D), (C,D).
Next, we check each pair to see if it is concordant or discordant.
- Pair (A,B): Education B (2) > A (1) and Satisfaction B (2) > A (1). This is a Concordant pair.
- Pair (A,C): Education C (3) > A (1) and Satisfaction C (3) > A (1). This is a Concordant pair.
- Pair (A,D): Education D (2) > A (1) and Satisfaction D (1) = A (1). This is a tied pair, so we ignore it.
- Pair (B,C): Education C (3) > B (2) and Satisfaction C (3) > B (2). This is a Concordant pair.
- Pair (B,D): Education B (2) = D (2). This is a tied pair, so we ignore it.
- Pair (C,D): Education C (3) > D (2) and Satisfaction C (3) > D (1). This is a Concordant pair.
Wait, let’s re-evaluate Pair (C,D).
- Pair (C,D): Education C (3) > D (2) but Satisfaction C (3) > D(1). Let’s re-evaluate all pairs.
Let’s try a clearer example.
Data:
- Person A: Education = 1, Satisfaction = 1
- Person B: Education = 2, Satisfaction = 2
- Person C: Education = 3, Satisfaction = 1
Pairs: (A,B), (A,C), (B,C)
- Pair (A,B): Education B (2) > A (1) and Satisfaction B (2) > A (1). This is Concordant.
- Pair (A,C): Education C (3) > A (1) and Satisfaction C (1) = A (1). This is a tie on satisfaction, so we ignore it.
- Pair (B,C): Education C (3) > B (2) but Satisfaction C (1) < B (2). This is Discordant.
Let’s restart the example with clearer data to avoid ties for simplicity.
Scenario Data:
We ask 4 people about their ranking of a new product (Variable X) and their likelihood to recommend it (Variable Y), both on a scale of 1 to 10.
- Person 1: X=2, Y=3
- Person 2: X=5, Y=6
- Person 3: X=4, Y=2
- Person 4: X=8, Y=7
Calculation Steps:
- Identify all possible pairs of observations (6 pairs total):
(1,2), (1,3), (1,4), (2,3), (2,4), (3,4) - Count Concordant Pairs (C):
- Pair (1,2): X2 > X1 (5>2) and Y2 > Y1 (6>3). This is Concordant.
- Pair (1,4): X4 > X1 (8>2) and Y4 > Y1 (7>3). This is Concordant.
- Pair (2,4): X4 > X2 (8>5) and Y4 > Y2 (7>6). This is Concordant.
- Pair (3,4): X4 > X3 (8>4) and Y4 > Y3 (7>2). This is Concordant.
- Total Concordant Pairs (C) = 4
- Count Discordant Pairs (D):
- Pair (1,3): X3 > X1 (4>2) but Y3 < Y1 (2<3). This is Discordant.
- Pair (2,3): X2 > X3 (5>4) but Y2 > Y3 (6>2). This is Concordant. Mistake in manual check. Let’s re-check.
- Pair (2,3): X2 > X3 (5>4) and Y2 > Y3 (6>2). This is Concordant.
Let me restart the count carefully. - (1,2): X: 2 vs 5 (up), Y: 3 vs 6 (up). Concordant.
- (1,3): X: 2 vs 4 (up), Y: 3 vs 2 (down). Discordant.
- (1,4): X: 2 vs 8 (up), Y: 3 vs 7 (up). Concordant.
- (2,3): X: 5 vs 4 (down), Y: 6 vs 2 (down). Concordant.
- (2,4): X: 5 vs 8 (up), Y: 6 vs 7 (up). Concordant.
- (3,4): X: 4 vs 8 (up), Y: 2 vs 7 (up). Concordant.
- Total Concordant Pairs (C) = 5
- Total Discordant Pairs (D) = 1
- Apply the Gamma Formula:
- G = (C – D) / (C + D)
- G = (5 – 1) / (5 + 1)
- G = 4 / 6
- G = 0.667
Therefore, the Gamma coefficient is 0.667. Based on the interpretation table, this indicates a strong positive association between ranking the product highly and being likely to recommend it.
Most Common FAQs
A tied pair occurs when two observations have the exact same rank for one or both of the variables you are comparing. For example, if two people both rate their job satisfaction as “medium,” they are tied on that variable. The formula for Goodman and Kruskal’s Gamma is specifically designed to ignore these ties. It only considers pairs where one observation is clearly ranked higher than the other. This focus on only concordant and discordant pairs makes Gamma particularly useful for data that might have many ties.
Gamma is different from other common correlation measures, like the Pearson correlation coefficient, primarily in the type of data it is used for. You use Gamma for ordinal data, which is data that can be ranked in a logical order but where the distance between the ranks is not necessarily equal. In contrast, you use the Pearson coefficient for continuous data, where the values can be any number and the intervals between them are equal (like height or temperature). Gamma is therefore the appropriate choice when you are working with ranked categories.
A Gamma coefficient of 0 means there is no association between the two ordinal variables. This happens when the number of concordant pairs is exactly equal to the number of discordant pairs (C = D). In this situation, the positive and negative associations in your data cancel each other out completely. A result of 0 indicates that knowing the rank of an observation on one variable gives you no help in predicting its rank on the other variable.