Rounding, truncating
From Stanford Wong's BJ21
Posted by Pete Moss on 17 Nov 1997, at 9:43 p.m.
Rounding, truncating, et cetera...
I've been avoiding asking about this for a couple of years, because I understand it has been the source of some animosity. It was not immediately apparent to me why "truncating" should ever be called for when using index tables. I finally just sat down tonight and tried to figure it out myself. Please let me know if I got it wrong.
There are two ways to generate integer-valued tables of indices:
Method 1. Indices are calculated by analyzing categories, frequently by means of simulation. Each time a deck composition is analysed, its true count is rounded to the closest integer, and the result of the analysis of that composition is incorporated with that of other deck compositions with true counts that round to the same integer. You calculate which of the two decisions in question gives the better expected return (or whatever score you might use) over all situations in that category. [Notice that when generating indices by a method of this type, it would not be a good choice to truncate the true counts to form the categories. The category corresponding to a truncated count of zero would then comprise twice as big a true count span as any other.]
Method 2. Indices are calculated by some algebraic or other method that yields a non-integer result. For example, I have a routine that gives an index of 1.38 for insurance using Hi-Lo at single deck. An exhaustive weighted average of all possible one-deck compositions has shown the number to be perfect; All true counts of greater than 1.38 yield an advantage for taking insurance, while all true counts of less than 1.38 yield a disadvantage. (There are no deck compositions with a true count of exactly 1.38.) If we have calculated such "exact" indices for playing decisions, then when we tabulate our playing indices for memorization, we will probably choose to round the indices to an integer to make the table easier to remember.
Using Method 1:
It is always correct to round your true count to the nearest integer, assuming the categories were formed by that method. When you calculate your true count at the table, which category best represents your situation? Certainly it is the category into which this true count situation was tabulated when calculating the indices. Typically, the tables are written so it is correct to take the high-count decision if the rounded true count is equal to or greater than the index in the table.
Using Method 2:
How you should round your true count depends on how the tables are written. It could be right to round down to the next lower integer, to round up to the next higher integer, or to truncate the true count, discarding the fractional part. It depends on how the exact indices were rounded to form the integer-valued indices that go into the table, and which of the two actions being considered is associated with the number in the table. There are a lot of scenarios. Wong's _PBJ_ has apparently used first one, then another in the second edition.
Scenario A: (Round down when playing) The index that goes into the table is the exact index rounded to the closest integer. Instructions call for making the high-count decision if your rounded index is greater than or equal to the index in the table. In this scenario, it is correct to round your true count down to the next lower integer. A true count of +1.9 rounds to +1. A true count of -1.1 rounds to -2. The operation of rounding down is called "floor".
Scenario B: (Truncate when playing) Instructions call for truncating your true count, and making the high-count decision if the truncated true count is greater than or equal to the index in the table. A true count of +1.9 rounds to +1. A true count of -1.9 rounds to -1. The operation is called "trunc". With those instructions for using the table, the numbers in the table should be the same as in scenario A if they are positive, but all negative indices in the scenario A table must be increased by 1. In other words, the index in the table is the exact index rounded to the nearest integer if that integer is non-negative, one more than that otherwise. (Trunc(tc) is the same as floor(tc) for positive tc's, but floor(tc) = trunc(tc)-1 for negative, non-integral tc's.)
Notice that the two scenarios will call for different decisions for negative tc's of precisely the integral index. Those situations will be rare or impossible, and the decision in that case is a toss-up anyway.
Corrections to the above comments will be welcomed.
Pete
[Added later: Please see Pete Moss's response to Halver in the thread that follows for further comments concerning the viability of "truncating". ]Responses
- Getting "Exact" Indeces trhough Simulation - MathProf -- 20 Nov 1997, at 4:33 a.m.
- Re: Getting "Exact" Indeces trhough Simulation - Pete Moss -- 21 Nov 1997, at 1:32 p.m.
- Re: Getting "Exact" Indices trhough Simulation - Pete Moss -- 21 Nov 1997, at 3:10 p.m.
- Re: Getting "Exact" Indices though Simulation - MathProf -- 21 Nov 1997, at 6:23 p.m.
- Re: Rounding, truncating - Halver -- 20 Nov 1997, at 8:27 p.m.
- Re: Rounding, truncating - Pete Moss -- 21 Nov 1997, at 12:37 p.m.