runnerRunnerBackdoorFlushTwoCardProbability
C(s,2)/C(u,2) for two-card runner flush.
runnerRunnerBackdoorFlushTwoCardProbability(suitCardsRemaining: number, unseenCards: number): number
Import
const poker = require('poker-calculations');
ESM (Node):
import { createRequire } from 'module';
const require = createRequire(import.meta.url);
const poker = require('poker-calculations');
When to use
Backdoor flush draws need both remaining cards of the suit. Pass how many cards of that suit remain in the deck and how many unseen cards total (usually 47 on the flop).
How to use
// Two hearts left in deck, 47 unseen on flop
const p = poker.runnerRunnerBackdoorFlushTwoCardProbability(2, 47);
console.log(p); // C(2,2)/C(47,2) = 1/1081 ≈ 0.000925
// Four hearts remain
console.log(poker.runnerRunnerBackdoorFlushTwoCardProbability(4, 47));
See also
flopToRiverAtLeastOneHitProbability · runnerRunnerStraightDrawHitProbability