卡方檢驗
檢驗「呢37個數係咪似公平轉輪會出嘅結果?」嘅標準方法。

χ² = Σ(觀察值 − 期望值)² / 期望值,37格全部加埋。再同自由度36嘅卡方分佈比,就得出 p 值。
點樣計
每個格設備格轉子上面37個有號碼嘅格之一。又叫 slot、cup。睇全文 →嘅期望次數係n/37。每一格,將觀察值同期望值嘅差平方,再除以期望值;然後將37項加埋。公平轉輪計出嚟平均大約係36(即係自由度實驗室自由度一個統計量入面互相獨立嘅數值個數。對37個格做卡方檢驗就係36,因為啲計數加埋一定要等於總數。睇全文 →),標準差數學標準差方差嘅平方根;一個結果通常離期望值有幾遠。睇全文 →大約8.5。高過51.0就喺5%水平顯著;高過58.6就喺1%水平顯著。「輪盤轉輪偏差分析器」會計呢個統計量,再用正則化不完全伽瑪函數計出準確嘅p 值實驗室p 值如果個轉輪係公平嘅,會見到至少同而家咁大偏離嘅概率。睇全文 →。
| 轉數n | 每格期望值 | 每格嘅 σ | +2σ 嗰格 | +3σ 嗰格 |
|---|---|---|---|---|
| 370 | 10 | 3.1 | 16 | 19 |
| 1,000 | 27 | 5.1 | 37 | 42 |
| 3,700 | 100 | 9.9 | 120 | 130 |
| 10,000 | 270 | 16.2 | 303 | 319 |
| 37,000 | 1,000 | 31.2 | 1,062 | 1,094 |
計一次例子
Consider a hypothetical sample of 1,000 independent spins數學獨立嘅轉無論之前開過乜,每一轉嘅概率都一樣。本站每一個計算都係建基喺呢度。睇全文 →. Each pocket has an expected count of 1,000/37 ≈ 27.03. If pocket 8 appears 41 times, its contribution to the statistic is about 7.22. Suppose the total statistic is approximately 45.2. On 36 degrees of freedom, the approximate p-value is 0.14: under the fair-wheel model, a statistic at least this large has a probability數學概率一個結果出現嘅機會,由0到1或者0%到100%。一個號碼:1/37 = 2.70%。睇全文 → of about 14%. This is not significant at the 5% level, and it does not prove the wheel is fair. A pocket selected after examining these counts needs independent confirmation; another 1,000 spins is not guaranteed to resolve a small departure.
前提假設
The usual approximation assumes independent observations and adequate expected counts. The common five-per-cell rule gives n ≥ 185 for 37 equal pockets; it is a guideline for the approximation, not a hard boundary for all possible tests. Pooling wheels changes the population being tested. Dependence may invalidate the reference distribution without necessarily increasing the statistic.
Pearson同蒙地卡羅
Karl Pearson喺1900年發表呢個檢驗,佢最早計嘅例子之一,就係26,306轉有紀錄嘅蒙地卡羅輪盤結果,佢發現啲結果唔均勻到冇可能係巧合,仲宣佈「蒙地卡羅輪盤……唔係一個靠運氣嘅遊戲」。後來嘅作者認為,幫報紙記錄結果嘅記者作咗好多出嚟,呢樣本身就係關於數據來源嘅一課。

一個真實檢驗:拉斯維加斯嘅自動轉輪
A published analysis of specific automatic wheels is evidence about those recorded samples, not all automatic roulette. A non-significant uniformity test cannot prove the absence of steering, and combining several wheels does not identify the behavior of each one. Check the original study’s data and design before drawing that conclusion.
卡方以外
如果只係懷疑一格,二項檢驗嘅功效高啲。如果懷疑一段弧,就用「分區分析」嗰頁嘅區轉輪區轉輪上面一段連續嘅格,唔同投注枱面上面嘅一組號碼。睇全文 → z檢驗。卡方係綜合檢驗:佢話你知有嘢唔妥,但唔講係乜。先用佢,再睇清楚。
公式
問題
37個數加埋一定係n,所以只有36個可以自由變。
一個轉輪如果喺10,000轉入面有一格以25分之1中,淨係嗰格一項就大約60;χ²大約100,p實際上等於零。
技術上可以,每格期望值係5.4。但除非有一格畀人黐死咗,否則佢乜都偵測唔到。
漫畫小插曲

For 36 degrees of freedom, the approximate 5% upper-tail cutoff is 51.0.
來源
- Pearson, K. “On the criterion that a given system of deviations from the probable…”
- Feller, W. An Introduction to Probability Theory and Its Applications, Vol. 1.