Statistics for H-closed spaces and almost realcompact spaces