卡方檢定
「這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.