Calculate density estimate