Calculating the overlap of two normal distributions using monte carlo intergration

Edit this page

Abstract

I read this post over at the blog Cartesian Faith about Probability and Monte Carlo methods. The post describe how to numerically intregate using Monte Carlo methods. I thought the results looked cool so I used the method to calculate the overlap of two normal distributions that are separated by a Cohen’s d of 0.8. You should head over to the original post if you want a more detailed explanation of the method. And I should add that this is not the most efficient way to calculate the overlap of two gaussian distributions, but it is a fun and pretty intuitive way, plus you can make a cool plot of the result. However, I also show how to get the overlap using the cumulative distribution function and using R’s built-in integration function.

Link to resource: http://rpsychologist.com/calculating-the-overlap-of-two-normal-distributions-using-monte-carlo-integration

Type of resources: Reading, Student Guide, Teaching/Learning Strategy, R code

Education level(s): College / Upper Division (Undergraduates), Graduate / Professional

Primary user(s): Student, Teacher

Subject area(s): Math & Statistics

Language(s): English