Added epd() method that does  O(1) calculation of epd and its variance