1988issue C041-2
Constructing chi-square tests for two-way price counts
Two-outcome records such as rise versus decline are scored with a Yates-adjusted chi-square test whose expected counts come from the full sample mix rather than from an even split.
- Two-outcome records such as rise versus decline can be scored with a chi-square test that applies a half-unit Yates adjustment to each observed-minus-expected gap.
- Because the full sample rose on 52.1% of days and declined on 47.9%, weekday expected counts are taken from that mix rather than from an even split.
- The construction maps chi-square values above 3.84, 6.64, and 10.83 to 95%, 99%, and 99.9% confidence that the split is not only chance.
- When the baseline is treated as even money, the statistic simplifies to the square of one less than the absolute count difference, divided by the total number of trials.
Start from the sample mix
Two-outcome records such as rise versus decline can be scored with a chi-square test that applies a half-unit Yates adjustment to each observed-minus-expected gap. The chi-square-test turns those observed versus expected frequencies into one statistic used to judge whether a directional split is hard to attribute to chance.
Construction writes an expected-count for each outcome first. That baseline frequency is assigned from the overall sample mix, not from an automatic even-money split. Because the full sample rose on 52.1% of days and declined on 47.9%, weekday expected counts are taken from that mix rather than from an even split.
Apply the Yates-correction
The next step applies a Yates-correction: a half-unit reduction to each absolute observed-minus-expected gap before that gap is squared and scaled by the expected count.
The construction maps chi-square values above 3.84, 6.64, and 10.83 to 95%, 99%, and 99.9% confidence that the split is not only chance. That mapping is a conventional confidence-level: it relates the size of the statistic to how rarely an equally large departure would appear under the stated baseline.
A Monday illustration
A Monday illustration compares observed counts of 669 and 865 with expected counts of 799 and 735, a 130-count departure on each side. After the half-unit adjustment, that Monday illustration produces a chi-square of 43.8, which exceeds the 10.83 threshold tied to 99.9% confidence.
The even-money-simplification
When the baseline is treated as even money, the statistic simplifies to the square of one less than the absolute count difference, divided by the total number of trials. That even-money-simplification is a reduced two-outcome formula used only when the two results are treated as equally likely.
All readings on this track · 17 readings
- 1987Testing price-volume agreement after percent reversal filters
- 1988Constructing chi-square tests for two-way price counts
- 1988Building consensus indicators with correlation and the chi-square test
- 1988Test edges against chance, not story
- 1988Constructing an advance-decline divergence oscillator
- 1989Evaluate a contrary put-call premium ratio at a stated horizon
- 1990A weekly resistance-index from hourly volume-per-point
- 1990Testing breadth above moving averages by horizon
- 1990Evaluating member versus odd-lot breadth
- 1990A chi-square test of split frequency histograms across price aggregations
- 1990Evaluating smoothed secondary counts with a chi-square test
- 1991Treat session high and low times as codes, then require a chi-square check
- 1991A signed hourly swing catalog as a next-session chi-square check
- 1992Constructing a chi-square test as a gate for two-way market records
- 1992Percent filters, log point-and-figure, and breadth residuals
- 1997Build a chi-square stationarity screen before you forecast
- 1998Timed breakout rules after a nested-bar contraction