SoccerDream AI 首页  ›  GEO 内容中心  ›  近期更新(自动生成)

51 distinct values for 50,046 predictions: the numeric contract behind a probability column

Three columns in the same row of the same table all describe "how much comes back per unit". One holds a number near 0.9…

本页内容由人工智能生成,仅供参考

Three columns in the same row of the same table all describe "how much comes back per unit". One holds a number near 0.92, the other two hold numbers near 1.00, and the median distance between them is 8.24 percentage points. Nobody wrote a comment explaining why, so every query that mixes them is silently wrong by that margin.

That is not a bug story. It is a story about what a numeric column promises: a scale, an alphabet of values, and a range. In ai_predictions all three were quietly broken in different ways.

Production context: 135 columns, 50,046 rows (2026-06-21 to 2026-11-26), 49,518 settled, 28,110 correct.

SELECT count(*)                        AS rows,
       count(*) FILTER (WHERE settled) AS settled,
       count(*) FILTER (WHERE hit)     AS correct,
       count(DISTINCT model_id)        AS models
FROM   ai_predictions;
 rows   | settled | correct | models
--------+---------+---------+--------
 50046  |  49518  |  28110  |  4019

Promise one: the scale you declared

fair_home, fair_draw, fair_away are numeric(6,3) — three decimals. You would assume a third decimal exists because something needs it.

SELECT count(*)                                               AS non_null,
       count(*) FILTER (WHERE round(fair_home,2) <> fair_home) AS needs_third,
       count(DISTINCT fair_home)                              AS distinct_home
FROM   ai_predictions WHERE fair_home IS NOT NULL;
 non_null | needs_third | distinct_home
----------+-------------+---------------
    49305 |           0 |          1169

Zero rows out of 49,305 use the third decimal. The declared scale is one digit wider than the data has needed, on three columns, for five months — harmless at four bytes a row, but a hint that the type was chosen by habit rather than by specification.

The contrast sits in the same table: ah_v5_p_up is numeric(8,6), 28,211 nulls and 21,835 values spread over 8,414 distinct points. Neither choice is documented.

The consequence is arithmetic: 1,169 distinct home prices across 49,305 rows means the average price is shared by 42.2 rows. Any analysis treating the price triple as an identity is about to be wrong.

Promise two: the alphabet you will ever hold

confidence_calibrated is numeric(6,4) and is supposed to be the probability attached to the direction on that row. Here is its actual alphabet:

SELECT count(DISTINCT confidence_calibrated) AS distinct_values,
       min(confidence_calibrated) AS lo, max(confidence_calibrated) AS hi
FROM   ai_predictions WHERE confidence_calibrated IS NOT NULL;

SELECT confidence_calibrated AS value, count(*) AS rows
FROM   ai_predictions WHERE confidence_calibrated IS NOT NULL
GROUP  BY 1 ORDER BY 2 DESC LIMIT 4;
 distinct_values |   lo   |   hi
-----------------+--------+--------
              51 | 0.4721 | 0.7295

  value  |  rows
---------+-------
 0.5596  | 12130
 0.5516  |  9696
 0.5990  |  9213
 0.5337  |  8387

Fifty-one distinct values for 50,046 rows, and the top four cover 39,426 rows — 78.78% of the table. This is not a probability estimate; it is a 51-entry lookup table wearing a continuous type.

The obvious hypothesis is a lookup keyed on (confidence, direction_arity). Test it:

SELECT confidence, direction_arity, count(*) AS n,
       count(DISTINCT confidence_calibrated) AS distinct_values
FROM   ai_predictions WHERE confidence_calibrated IS NOT NULL
GROUP  BY 1,2 HAVING count(DISTINCT confidence_calibrated) > 1
ORDER  BY 4 DESC LIMIT 4;

Not a function of those two either: the query returns confidence 6 on single picks at the top, 6,983 rows over 32 distinct probabilities. Whatever the key is — model lineage, league, the calibration window at write time — it is not in the two columns a reader would guess, and it is not recorded on the row. A value you cannot reproduce from the row is a cached answer to a question nobody wrote down.

The alphabet also destroys the ordering the name promises:

confidencegraded rowsmean calibratedrealized hit rate
12560.472446.09%
38,7210.533653.12%
512,5160.559655.74%
74,4000.600760.25%
82,0520.653965.69%
95500.729573.82%
10580.569358.62%

Confidence 9 is the best-calibrated bucket in the table and also the last honest one. Confidence 10 sits 16.02 points below it, on 58 graded rows drawn from 53 different models — roughly one row per model, which is what you would expect if "10" is not a calibrated state but a rare output. Value 0.7295 occurs 550 times, precisely the number of confidence-9 rows, and inside confidence 9 it is the only value present: the mapping is a constant.

The rank test is mechanical: the maximum probability ever assigned at confidence 9 is 0.7295, and counting how many confidence-10 rows fall below it gives 63 out of 63. Every row at the highest integer confidence is less likely, by the table's own numbers, than the best row at the second-highest.

Promise three: the level, which is not a promise at all

Scale and alphabet are static. The third assumption is that the level tracks reality:

monthrowsmean calibratedrealized rategap
2026-062,7350.61950.6230−0.35pp
2026-072,6370.61150.5089+10.26pp
2026-081640.56040.5793−1.89pp
2026-099,7570.56410.5931−2.90pp
2026-1021,8860.56360.5615+0.21pp
2026-1112,8670.56240.5356+2.68pp

Weighted across the table the gap is +0.73pp, which looks excellent and is a lie of aggregation: only June (−0.35pp) and October (+0.21pp) are faithful. July is off by 10.26 points — the column claimed 61.15% and delivered 50.89%.

Then the level itself moves: between July and August the mean drops 5.11 points, from 0.6115 to 0.5604, on 164 rows. No realized rate explains a step that size — July realized 0.5089, August 0.5793. The column stepped away from July's reality and toward nothing in particular. Since September it has sat between 0.5624 and 0.5641 while realized performance wandered from 0.5356 to 0.5931.

A constant level with a drifting outcome is the signature of a lookup refitted once and then frozen — fine as an engineering choice, if the column is named for what it is and the refits are dated. Neither is true.

Two rows where the number is not small, it is absent

return_rate is numeric(5,4), max 0.9967, 1,345 distinct values. Two rows hold exactly 0.0000. Both belong to model 1, both at confidence 5, both calibrated to 0.5596; one graded correct, one not. Their stored prices are 2.290 / 3.570 / 3.520, and 1 / (1/2.290 + 1/3.570 + 1/3.520) = 0.9991. So arithmetic recovers 0.9991 for a row whose column says 0.0000. This is not precision loss but a sentinel — a handler that wrote zero and moved on — sitting in a field that is later averaged and summed. WHERE return_rate > 0.9 drops both rows without a warning.

The same table has an integer with a 1-to-10 range contract and exactly one row at 0: SELECT count(*) FROM ai_predictions WHERE confidence NOT BETWEEN 1 AND 10 returns 1. Nothing broke — its calibrated value is 0.5837 and it was graded correct — but the guard that should have caught it does not exist, and one row is how a range contract always starts: never violated wholesale, violated once and then twice.

Nulls are the same problem, quieter: fair_home is null on 741 rows (1.48%), and 246 of those have raw opening prices present — the input existed, the derived column did not.

The triple is not an identity

Group by the full price triple and 49,305 rows collapse to 21,264 groups:

WITH t AS (SELECT fair_home, fair_draw, fair_away, count(*) AS c
           FROM ai_predictions WHERE fair_home IS NOT NULL GROUP BY 1,2,3)
SELECT count(*) g, count(*) FILTER (WHERE c>1) shared,
       sum(c) FILTER (WHERE c>1) rows_shared, max(c) mx FROM t;
 groups | shared_groups | rows_in_shared | largest
--------+---------------+----------------+---------
  21264 |          8904 |          36945 |     120

36,945 rows — 74.93% — sit on a triple at least one other row also holds, and the largest group has 120 rows. Check what it is:

SELECT count(*) AS rows, count(DISTINCT match_id) AS fixtures,
       count(DISTINCT model_id) AS models, min(created_at)::date AS first_write
FROM   ai_predictions
WHERE  fair_home = 1.810 AND fair_draw = 4.070 AND fair_away = 4.970;
 rows | fixtures | models | first_write
------+----------+--------+-------------
  120 |        1 |    120 | 2026-07-06

One fixture, 120 rows, 120 distinct models, all written the same day. Nothing is duplicated — these are 120 independent analyses of one match against a single price set — but the row-level consequence stands: (fair_home, fair_draw, fair_away) cannot serve as a dedupe key or a hash input. Deduping on it would collapse 8,904 groups and drop 28,041 rows.

Only 4,363 of the 21,264 groups span more than one fixture (max 25), so the collision is overwhelmingly within a fixture, driven by model fan-out rather than price granularity — and the same 74.93% supports both diagnoses.

What a contract looks like

None of the fixes needs an index or a rewrite; they need declarations.

ALTER TABLE ai_predictions
  ADD CONSTRAINT confidence_range  CHECK (confidence BETWEEN 1 AND 10) NOT VALID,
  ADD CONSTRAINT return_rate_range CHECK (return_rate IS NULL OR return_rate BETWEEN 0.5 AND 1.0) NOT VALID,
  ADD CONSTRAINT fair_positive     CHECK (fair_home IS NULL OR fair_home > 1.0) NOT VALID;

COMMENT ON COLUMN ai_predictions.confidence_calibrated IS
  'Lookup, 51 entries, refit 2026-08. Not a per-row estimate.';

NOT VALID is the point: it binds every future row while the one bad confidence and two bad return rates stay visible as a review queue instead of being silently backfilled.

Three habits

  1. Print the alphabet. count(DISTINCT x) beside count(*): 51 versus 50,046 instantly says whether you hold an estimate or a dictionary.
  2. Never trust a declared scale. Check whether the last digit is ever non-zero. Zero out of 49,305 means the type is a wish, not a spec.
  3. Separate "shares a value" from "is a duplicate". The same 74.93% is a fan-out artefact or a data-quality disaster depending on one count(DISTINCT match_id).

The unifying failure is not any single bad value. It is that four columns in one row can each be plausible and mutually inconsistent, because the schema recorded types and never recorded meanings. A numeric column without a unit, an alphabet and a range is not data; it is a number that happens to parse.

Analytics and research content. Not betting advice. 18+

本内容仅供数据分析与操作参考,不构成任何决策建议。

风险提示:足球比赛结果具有内在不确定性,任何数据分析工具都无法消除这种随机性。本页内容仅供数据操作与参考,不构成任何决策建议或收益承诺。请理性看待体育赛事,远离任何形式的非法决策活动。
看完方法论,直接看它怎么用在今天的比赛上

SoccerDream AI 每场给出胜平负概率分布、总进球区间与置信度, 赛后自动复盘、命中记录公开可查。注册后可查看全部 AI 模型推演与已结算战绩。

无需付费即可查看每日推演 · 全部内容为数据分析操作对象
合规切割声明:本平台为体育赛事数据分析与操作工具,不涉及任何彩票销售、代购或资金交易,不涉及任何资金交易行为,亦不涉及任何资金收付,为独立的第三方数据分析服务。全部内容仅供操作与参考。请遵守所在地法律法规,理性对待。
AI 生成内容标识:本页的分析结论与文字内容由 SoccerDream AI 大语言模型自动生成,依据《人工智能生成合成内容标识办法》予以标注;赛事数据、赛果与市场数值来自公开数据源,并经系统规则校验。内容仅供操作参考,不构成任何建议。