Optional sampling of submartingales with scanned index sets