creedofhubris
03-02-2009, 11:11 AM
I'm working on some custom reports and have been picking over the formulas for HEM stats, and I've found a fairly significant error in the way the river call efficiency and net $ stats are calculated, because they use the net amount won as a baseline rather than the pot on the river. It's a big mistake to calculate the efficiency of a river call based on the net rather than the gross. The formulas correctly calculate the value of a losing call, but underestimate the value of a winning call.
Let's say I'm heads up with an opponent, and we each put in $5 preflop. On the river, the opponent bets $5 into a $10 pot. I call, and my hand is the best. I have won a $20 pot, of which $10 came from my opponent, so the formula would credit me with a $10 net win. However, the money we've put in on prior streets is dead and is not relevant to river decisionmaking. Our river call actually makes us $15, because that is the size of the pot before we make the call. If we make that call 3x and lose twice, the efficiency of our river call should be 15/10 = 1.5, not 10/10 = 1.
If I've got my syntax right, this can be mostly fixed by replacing "then ph.NetAmountWon" and "then ph.NetAmountWon + RIVER.CallAmount" with "then pkh.showdownpotsize - River.callamount".
This fix won't handle split pots and winning a side pot while losing the main pot correctly, but this should be a lot closer to reality than the current formulae.
Stat GroupName="River" ColumnName="RiverCallNet$" ValueExpressions="sum(case when ph.riverplayeractiontype_id in (11,66) and ph.NetAmountWOn < 0 then RIVER.CallAmount else 0 end) as CallAmountOnRiver;sum(case when ph.riverplayeractiontype_id in (11,66) and ph.NetAmountWon > 0 then ph.NetAmountWon else 0 end) as WonAmountOnRiverCall" Evaluate="(WonAmountOnRiverCall-CallAmountOnRiver)/100.0" ColumnHeader="River\nCall\nEff $" ColumnFormat="$0.00" ColumnWidth="61" Tooltip="Net $ won or lost making river calls (or check calls) on River. Calculated as (TotalAmountWon-CallAmount) when you won the hand - total CallAmount when you lost the hand"
Stat GroupName="River" ColumnName="RiverCallEff" ValueExpressions="sum(case when ph.riverplayeractiontype_id in (11,66) then RIVER.CallAmount else 0 end) as TotalCallAmountOnRiver;sum(case when ph.riverplayeractiontype_id in (11,66) and ph.NetAmountWon > 0 then ph.NetAmountWon + RIVER.CallAmount else 0 end) as TotalWonAmountOnRiverCall" Evaluate="(TotalWonAmountOnRiverCall/1.0/TotalCallAmountOnRiver)" ColumnHeader="River\nCall\nEfficiency" ColumnFormat="0.00" ColumnWidth="61" Tooltip="Shows average return per 1$ of river calls and check calls."
Let's say I'm heads up with an opponent, and we each put in $5 preflop. On the river, the opponent bets $5 into a $10 pot. I call, and my hand is the best. I have won a $20 pot, of which $10 came from my opponent, so the formula would credit me with a $10 net win. However, the money we've put in on prior streets is dead and is not relevant to river decisionmaking. Our river call actually makes us $15, because that is the size of the pot before we make the call. If we make that call 3x and lose twice, the efficiency of our river call should be 15/10 = 1.5, not 10/10 = 1.
If I've got my syntax right, this can be mostly fixed by replacing "then ph.NetAmountWon" and "then ph.NetAmountWon + RIVER.CallAmount" with "then pkh.showdownpotsize - River.callamount".
This fix won't handle split pots and winning a side pot while losing the main pot correctly, but this should be a lot closer to reality than the current formulae.
Stat GroupName="River" ColumnName="RiverCallNet$" ValueExpressions="sum(case when ph.riverplayeractiontype_id in (11,66) and ph.NetAmountWOn < 0 then RIVER.CallAmount else 0 end) as CallAmountOnRiver;sum(case when ph.riverplayeractiontype_id in (11,66) and ph.NetAmountWon > 0 then ph.NetAmountWon else 0 end) as WonAmountOnRiverCall" Evaluate="(WonAmountOnRiverCall-CallAmountOnRiver)/100.0" ColumnHeader="River\nCall\nEff $" ColumnFormat="$0.00" ColumnWidth="61" Tooltip="Net $ won or lost making river calls (or check calls) on River. Calculated as (TotalAmountWon-CallAmount) when you won the hand - total CallAmount when you lost the hand"
Stat GroupName="River" ColumnName="RiverCallEff" ValueExpressions="sum(case when ph.riverplayeractiontype_id in (11,66) then RIVER.CallAmount else 0 end) as TotalCallAmountOnRiver;sum(case when ph.riverplayeractiontype_id in (11,66) and ph.NetAmountWon > 0 then ph.NetAmountWon + RIVER.CallAmount else 0 end) as TotalWonAmountOnRiverCall" Evaluate="(TotalWonAmountOnRiverCall/1.0/TotalCallAmountOnRiver)" ColumnHeader="River\nCall\nEfficiency" ColumnFormat="0.00" ColumnWidth="61" Tooltip="Shows average return per 1$ of river calls and check calls."