JOVANA
Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
Back to the library
數學 1913

以《葉甫蓋尼·奧涅金》文本為例,關於鏈中樣本之關聯的一項統計考察

安德烈·安德烈耶維奇·馬可夫

即便是環環相扣、彼此牽連的事件,長遠來看也會歸於一種穩定的格局——這就是第一條馬可夫鏈。

Choose your version
In depth · the introduction

為了在一場關於機率的爭論裡取勝,一位俄國數學家數了一首心愛長詩裡的母音和子音——卻由此發明了現代科學中最有用的思想之一。

把這個想法拆開看

經典機率論是為獨立事件而建的——比如擲硬幣,每一擲都「忘掉」上一擲。馬可夫問的是:如果事件彼此相連,下一步要倚仗剛剛發生的事,那會怎樣?他把這樣的序列叫作「鏈」,只有一條規則:未來只取決於當前的狀態,而不取決於整段歷史。

他得出的結論出人意料:即便各步如此糾纏在一起,長遠來看仍是井然有序的。鏈在每個狀態上停留的時間比例,會穩定到一組固定的數值——平穩分佈——無論你從哪裡出發。相依,並不意味著混亂。

它從哪裡來

1900 年代初,馬可夫與同行數學家帕維爾·涅克拉索夫陷入一場論戰。涅克拉索夫堅稱,那條著名的大數定律——平均值之所以可靠的原因——只在事件相互獨立時才成立,甚至暗示這與自由意志有某種關係。馬可夫決意證明他錯了。

他需要一個相依事件的真實例子,於是伸手抓向了文學:普希金《葉甫蓋尼·奧涅金》開頭的兩萬個字母。他把每個字母只分作兩類——母音或子音——再數一數每一類後面跟著另一類的頻率。母音很少跟著母音;子音後面則常常是母音。這些字母顯然是相依的——可母音的總體比例卻完美地穩定,恰如他的理論所預言。

它為何重要

馬可夫證明了:統計的規律性,並不需要獨立性。這把機率論解放出來,去描述真實世界——在那裡,幾乎沒有什麼是真正獨立的:天氣接著天氣,詞接著詞,今天的股價倚著昨天的。他為贏一場爭論而造出的那條鏈,結果竟成了應對驚人之廣的各類問題的正確工具,並以他的名字流傳至今。

一個能在腦中描畫的比方

把天氣想成晴、雨兩個狀態,明天倚著今天:晴天後面往往又是晴天,下雨則常常打斷連晴。跟蹤它一整年,會浮現出一種奇特的秩序——晴天所佔的比例,會穩定到一個固定的百分比,它只取決於那些「後接」的機率,而與這一年恰好是不是從晴天開始無關。那個穩定下來的百分比,就是平穩分佈。在下方,用母音與子音親手試試。

一張可互動的圖,顯示沿文本前進時當前字母是母音的機率。兩條曲線從兩個極端出發——一條從全母音,一條從全子音——都穩定到同一條約 0.43 的虛線上。兩個滑桿讓你改變母音後接母音的頻率、以及子音後接母音的頻率;那條穩定線會隨之移動。

它在知識譜系裡的位置

馬可夫鏈讓機率論有了處理相連事件的辦法,接續了大數定律(貝氏與伯努利家族的遺產,見 bayes-1763)止步之處。一代人之後,它成了資訊理論的骨幹——夏農把語言本身建模為一條馬可夫鏈(見 shannon-1948)——而今天,從 Google 最初的搜尋排序,到預測你下一個詞的 AI(見 transformer-2017),其中都住著它。

The original document
Original source text
A. A. Markov · read to the Imperial Academy of Sciences, St. Petersburg, 23 January 1913
The data
Markov took the first 20,000 letters of Pushkin's novel-in-verse Eugene Onegin — the whole of Chapter One and sixteen stanzas of Chapter Two — and classified every letter into just two states: vowel or consonant. He counted 8,638 vowels and 11,362 consonants, so the chance that a letter is a vowel is about 0.43, and a consonant about 0.57.
The dependence
He then asked the new question: does the kind of letter depend on the one before it? Tallying the pairs, he found that a vowel is followed by a vowel only about 0.13 of the time, but a consonant is followed by a vowel about 0.66 of the time. The letters are clearly not independent — vowels and consonants tend to alternate.
Yet, Markov showed, such a dependent sequence still obeys a law of large numbers: the long-run frequency settles down to a definite value (here, the 0.43 vowel rate), and that value is fixed by the transition probabilities — the stationary distribution of the chain. Run the widget below to watch it converge.
[ … ]
The paper develops this with the second-chapter counts as a check and derives the variance of the vowel frequency for dependent samples — extending the classical theory, built for independent trials, to chains of linked events. The full text is at the source below.
St. Petersburg · 1913