In hypothesis testing, we often use p-values to determine if there is a statistically significant difference between two groups.

However, while a p-value can tell us whether or not there is a statistically significant difference between two groups, an effect size can tell us *the size* of this difference.

One of the most common ways to measure effect size is to use **Hedges’ g**, which is calculated as follows:

**g = (x _{1} – x_{2}) / √((n_{1}-1)*s_{1}^{2} + (n_{2}-1)*s_{2}^{2}) / (n_{1}+n_{2}-2)**

where:

- x
_{1}, x_{2}: The sample 1 mean and sample 2 mean, respectively - n
_{1}, n_{2}: The sample 1 size and sample 2 size, respectively - s
_{1}^{2}, s_{2}^{2}: The sample 1 variance and sample 2 variance, respectively

The following example shows how to calculate Hedges’ g for two samples.

**Example: Calculating Hedge’s g**

Suppose we have the following two samples:

**Sample 1:**

- x
_{1}: 15.2 - s
_{1}: 4.4 - n
_{1}: 39

**Sample 2:**

- x
_{2}: 14 - s
_{2}: 3.6 - n
_{2}: 34

Here is how to calculate Hedges’ g for these two samples:

- g = (x
_{1}– x_{2}) / √((n_{1}-1)*s_{1}^{2}+ (n_{2}-1)*s_{2}^{2}) / (n_{1}+n_{2}-2) - g = (15.2 – 14) / √((39-1)*4.4
^{2}+ (34-1)*3.6^{2}) / (39+34-2) - g = 1.2 / 4.04788
- g = 0.29851

Hedges’ g turns out to be **0.29851**.

**Bonus:** Use this online calculator to automatically calculate Hedges’ g for any two samples.

**How to Interpret Hedges’ g**

As a rule of thumb, here is how to interpret Hedge’s g:

**0.2**= Small effect size**0.5**= Medium effect size**0.8**= Large effect size

In our example, an effect size of **0.29851** would likely be considered a small effect size. This means that even if the difference between the two group means is statistically significant, the actual difference between the group means is trivial.

**Hedges’ g vs. Cohen’s d**

Another common way to measure effect size is known as Cohen’s d, which uses the following formula:

**d = (x _{1} – x_{2}) / √(s_{1}^{2} + s_{2}^{2}) / 2**

The only difference between Cohen’s d and Hedges’ g is that Hedges’ g takes each sample size into consideration when calculating the overall effect size.

Thus, it’s recommended to use Hedge’s g to calculate effect size when the two sample sizes are not equal.

If the two sample sizes are equal then Hedges’ g and Cohen’s d will be the exact same value.