Describe the bug
For n=3, the effect size calculation of Cohen's d or Hedge's g fail with a ValueError "The divisor is zero, indicating no variability in the data.". When running the analysis with the same data on estimationstats.com, everything works fine.
To Reproduce
Steps to reproduce the behavior:
- Use input dataframe with N=3 for control and test
import numpy as np
import pandas as pd
import dabest
df = pd.DataFrame()
df['control'] = np.random.normal(0, 1, 3)
df['test'] = np.random.normal(0, 1, 3)
- Run dabest
two_groups = dabest.load(df, idx=(('control', 'test')))
print(two_groups.cohens_d)
Expected behavior
Calculation of effect size as on the homepage.
Your package version (please complete the following information):
- python 3.12.12
- dabest: 2025.10.20
- pandas: 2.2.3
- numpy: 2.1.3
- scipy: 1.15.3
Describe the bug
For n=3, the effect size calculation of Cohen's d or Hedge's g fail with a ValueError "The divisor is zero, indicating no variability in the data.". When running the analysis with the same data on estimationstats.com, everything works fine.
To Reproduce
Steps to reproduce the behavior:
import numpy as np
import pandas as pd
import dabest
df = pd.DataFrame()
df['control'] = np.random.normal(0, 1, 3)
df['test'] = np.random.normal(0, 1, 3)
two_groups = dabest.load(df, idx=(('control', 'test')))
print(two_groups.cohens_d)
Expected behavior
Calculation of effect size as on the homepage.
Your package version (please complete the following information):