I am working with the data where some samples follow normal distribution while some do not. How to compute the cohen's d if the data is not normal? As some of data is normal and some is not which effect measure should be used that can cover both scenarios. I am computing the median difference instead of mean difference for non normal data. Is this correct way.
For normal data I am using this equation:
if p_value < 0.05:
d = (np.mean(final_values) - np.mean(initial_values)) / np.sqrt((np.var(final_values) + np.var(initial_values)) / 2)
For non-normal data the formula is below:
if p_value < 0.05:
d = (np.median(final_values) - np.median(initial_values)) / np.sqrt((np.var(final_values) + np.var(initial_values)) / 2)
where d is cohen's d.