Calculate cohen’s d for 2 independent samples. See Using_cohens_d.ipynb for a notebook of given examples.
Syntax
d = cD.cohensd_2ind(inarg1, inarg2)
Description
A
d = cD.cohensd_2ind(group1, group2) returns cohen’s d for 2 independent samples. example
Examples
Example 1
Generate some random data and find cohen’s d.
import numpy as np
group1 = np.random.normal(0, 1, (100,))
group2 = np.random.normal(1, 1, (150,))
cD.cohensd_2ind(group1, group2)
d = 1.035420225827119
group1
Data vector for group 1.
Vector of data to calculate cohen’s d for 2 independent samples.
Data Types: (numeric, vector)
group2
Data vector for group 2.
Vector of data to calculate cohen’s d for 2 independent samples.
Data Types: (numeric, vector)
Output
d
Effect size.
Cohen’s d effect size for 2 independent samples.
Data Types: (scalar, float, numeric)
More About
Lecture
I refrained from outputting size of effect (e.g., ‘small’, ‘medium’, ‘large’) because these are arbitrary and should be thought of as such.
Tips
Issues and Discussion
Issues and Discussion.
If you don’t know how to use github (or don’t want to), just send me an email.