0

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.

  • Your second equation doesn't make a lot of sense. If you don't want to use the mean as a measure of central tendency, then the SD (which involves the mean) doesn't make much sense as a measure of spread. – Peter Flom Sep 04 '23 at 10:50
  • @PeterFlom what other effect size measure you suggest for non normal data? –  Sep 04 '23 at 11:01
  • Please go look at the duplicate question, which has an answer. In my comment, I was just showing one reason why what you are proposing isn't good. If that other answer doesn't meet your needs, you can comment there or write a new question. – Peter Flom Sep 04 '23 at 11:07
  • I am dealing with mix data, some patients follow normal distribution while others do not. The duplicate answer is just giving ideas about non normal, what to do if the some patients follow normal distributions too and we have to use only one effect size measure. –  Sep 04 '23 at 11:29
  • Use the one for non-normal data for all the patients. – Peter Flom Sep 04 '23 at 11:32

0 Answers0