貝氏思維: 事前機63841;(prior)8226; 資63934;或事件(data)8226; 事後機63841;

来源: marketreflections 2009-03-05 11:27:51 [] [博客] [旧帖] [给我悄悄话] 本文已被阅读: 次 (22139 bytes)
回答: Prieur du Plessis: fundementalmarketreflections2009-05-03 16:37:45
從相關到因果63789;談貝氏思維蔡蓉青師大63849;學系
--------------------------------------------------------------------------------
Page 2
高中所學的線性迴歸
--------------------------------------------------------------------------------
Page 3
63925;子: 廣告支出與營業額8231;廣告支出與營業額間似乎存在著線性關係,因此簡單線性迴歸分析應是適合用63789;分析廣告支出與營業額間的關係。
--------------------------------------------------------------------------------
Page 4
News!CNN的報導May 13, 1999Night-light may lead to nearsightedness!!!In a study, the odds for nearsightedness increased 30 percent for children who slept with a night-light on. (University of Pennsylvania Medical Center, 479 children) 所以小baby晚上要關燈睡覺?!55Room light in bedroom34Night-light in bedroom10Slept in darknessPercent 近視 between age 2 and 16Exposure to light before age 2
--------------------------------------------------------------------------------
Page 5
Really?8226; NIGHT LIGHTS DON'T LEAD TO NEARSIGHTEDNESS, STUDY SUGGESTS(Ohio State University, 1220 children)所以小baby又可以開燈睡覺63930;嗎?22Room light in bedroom (45)17Night-light in bedroom (758)20Slept in darkness (417)%近視 between age 2 and 16Exposure to light before age 2
--------------------------------------------------------------------------------
Page 6
相關(correlation, association)8226; What goes with, is associated with, or connected to what?8226; 63925;子:– 小時候開燈睡覺的人長大後比較容63968;近視眼– 有人觀察世界各國平均每人電腦63849;及人民預期壽命,發現有很多電腦的國家,人民預期壽命較長– 經常玩電動遊63764;器的兒童,得血癌的機會高60%– 穿著鞋子睡覺的人,睡醒時較63968;頭痛
--------------------------------------------------------------------------------
Page 7
因果(causal relation) 8226; There exists a directional relationship between one event (called cause) and another event (called effect) which is the consequence (result) of the first8226; 63925;子:– 因為化糞池滲63822;地下水源,所以國小學童集體感染桿菌性63973;疾– 因為有萬有引63882;,所以熟蘋果會從樹上掉下63789;打到牛頓的頭– 小明的爸爸長得很高,所以小明也長得高
--------------------------------------------------------------------------------
Page 8
相關 vs. 因果8226; 因果 implies 相關8226; 相關 does not imply 因果8226; Empirically observed covariation is a necessary but not sufficient condition for causality8226; Correlation is not causation but it sure is a hint.
--------------------------------------------------------------------------------
Page 9
相關乎? 因果乎?8226; 許多研究都顯示,素食者比較長壽。– 美國加州大學柏克萊分校的學者Gladys Block和她的同事重新檢視從198063886;以後發表的200篇研究,食用大63870;的新鲜蔬菜水果,可以64009;低63974;患各種癌症的危險。大63870;食用蔬菜的人63974;患癌症的危險,只有63847;常食用的人的一半。– 素食有免疫優勢。德國癌症研究中心(German Cancer Research Center)發表的研究结果發現,男性素食者的白血球對抗腫瘤細胞的63882;63870;,比男性肉食者强63864;倍。…
--------------------------------------------------------------------------------
Page 10
相關乎? 因果乎?8226; 許多研究都顯示,抽煙者63974;患肺癌的危險較高。– 198063886;代,世界上有四個很大型的前瞻性研究,探討吸菸與肺癌發生的關係,他們的結63809;有二點(1)吸菸63870;愈多,肺癌的發生比63841;愈高(2)吸菸對男性的影響要比63873;性為高。– 崔克波63826;斯(Trichopoulos)在希63782;雅典用個案對照法研究本身63847;抽煙得肺癌的40個婦63873;。所採用的對照組是因骨科疾病住院的婦人。結果發現先生抽煙的,太太得肺癌的比63841;是先生63847;抽煙者的2.4倍。如果先生每天抽一包以上,這個危險63841;就上升到3.4倍。
--------------------------------------------------------------------------------
Page 11
取得資63934;的二大方法:觀測研究 vs.實驗8226; 觀測研究(observational study)只做觀察,但63847;試圖影響回應;民意調查屬於此63952;,因為只問受訪者的意64010;而63847;會對他做任何事情。8226; 實驗(experimental study)刻意加上某些做法,並觀察反應。實驗的目的是要研究是否特定做法會使反應改變。
--------------------------------------------------------------------------------
Page 12
何時觀測?何時實驗?先63789;看二者的主要差別在哪63976;。8226; 觀測只是被動觀察;8226; 實驗要主動介入,做某些安排,以63845;得到有用的63849;據。8226; 63860;想做出「因果關係」的結63809;,應該要做實驗。問題是有時候要做實驗並63847;容63968;。
--------------------------------------------------------------------------------
Page 13
觀測研究63925;子8226; 63864;歲前開燈睡和長大近視的關係之研究–479 children, questionnaire8226; 民調 (e.g.,有多少比63925;之民眾曾接過詐騙電話)8226; 調查進入師大之入學方式與就學後表現是否有關係
--------------------------------------------------------------------------------
Page 14
實驗研究63925;子8226; 經常運動能63847;能減低心臟病發作的風險– 找4000位40歲以上的男性,他們都沒有發作過心臟病,也都願意63851;與這項研究。讓一半的人63851;加63930;一項有人監督的定時運動計畫,另外一半的人照原63789;習慣63847;做改變。研究者觀察63864;組人長達563886;的時間。The idea of 隨機化實驗 (randomized experimental design)
--------------------------------------------------------------------------------
Page 15
從相關到因果8226; 相關研究讓我們看到變63849;間存在有關63895;性8226; 63745;進一步的63930;解需要63745;precise的實驗。63925;如做隨機化比較實驗。8226; 如果只做觀察即使看到很強的關63895;性,並63847;表示一件事直接「導致」另一件事。
--------------------------------------------------------------------------------
Page 16
腦63882;激盪題Q: 63860;要研究經常運動能63847;能減低心臟病發作的風險,應該或可以怎樣做?– 觀測研究 and/or 實驗研究?Q: 63860;要證明,吸煙會導致肺癌,應該或可以怎樣做?
--------------------------------------------------------------------------------
Page 17
63884;史回顧: 抽煙與肺癌8226;Ernst Wynder (1923-1999, MD)的堅持8226; 同事及上司的抗拒8226; 統計專家Fisher(費雪)等人的反駁8226; 香菸公司的介入 (驚爆內幕 The Insider)8226; retrospective (追溯性) and prospective (追蹤性) studies and experimental results8226; Finally …
--------------------------------------------------------------------------------
Page 18
怎知吸煙會導致肺癌?Q: 當我們63847;能做實驗時,能夠確63991;因果關係的標準在哪63976;?8226; 關63895;性很強。吸菸和肺癌之間的關63895;很強。8226; 關63895;有一致性。在許多國家對63847;同的人所做的多項研究,都把吸菸和肺癌63898;結起63789;。這就64009;低63930;用只和某群人或某研究有關的潛在變63849;63789;解釋關63895;性的可能。
--------------------------------------------------------------------------------
Page 19
8226; 較高劑63870;和較強反應相63895;。每天吸菸較多的人或者吸菸63884;史較久的人63745;常得肺癌,而戒菸的人風險就64009;低。8226; 被懷疑的原因在時間上超前結果。肺癌是在吸菸多63886;後顯現的。死於肺癌的男性人63849;在吸菸者人口普遍之後上升,時間的差距約有3063886;。在63873;性開始吸菸之前,很少有63873;性得肺癌。63873;性肺癌患者的人63849;也隨著吸菸人口的增加而增加,中間的差距也是3063886;。8226; 被懷疑的原因是可信的。小63796;鼠氣管黏膜經燃燒香菸所產生煙霧64006;63800;及63999;激,會產生63986;63994;上皮化生,基底細胞增生等變化,最後會導致63986;63994;上皮癌的產生。動物實驗的結果顯示,吸菸產生的焦油的確會致癌。
--------------------------------------------------------------------------------
Page 20
David Hume (17111776)8226; Empiricism(經驗主義63809;): science of human nature is an empirical inquiry, rooted in experience and observation.8226; Scepticism(懷疑63809;):– possibility of any hypothesis or system that attempts to go beyond experience and observation– recognition of our limitations and proneness of cognitive errors (fallibilism 無法獲得絕對明確之知63996;的63972;63809;)
--------------------------------------------------------------------------------
Page 21
Causation (Hume)8226; Causes and effects are discovered, not by reason but through experience8226; It is only experience which teaches us the nature and bounds of cause and effect, and enables us to infer the existence of one object from that of another.8226; Since we all have limited experience, our conclusions should always be tentative, modest, reserved, and cautious. So, I guess Hume is a Bayesian…
--------------------------------------------------------------------------------
Page 22
貝氏思維 (Bayesian Thinking)8226; 高中(貝氏定63972;)8226; 63925;子 :假設某種疾病發生的可能性為1%,如果某種藥劑對於63974;患此種疾病的檢驗可信64001;為99%,也就是99%呈陽性反應,而對於健康的人則有1%可能誤診,也就是1%將呈陽性反應,則隨機檢查結果某個人呈陽性反應,此人真正63974;患疾病的可能性有多大?99%嗎?或是63862;小於99%?)|()()|()()|()()()()()()()|(cccABPAPABPAPABPAPBAPBAPBAPBPBAPBAP+=∩+∩∩=∩=
--------------------------------------------------------------------------------
Page 23
從prior到posterior8226; 事前機63841;(prior probability; e.g., P(A)) 必須建63991;在過去的經驗和知63996;8226; 資63934;或事件機63841; B|A則是我們當前透過研究蒐集到的新資訊8226; 研究的目的就在於瞭解事後機63841;(posterior probability; e.g., P(A|B) )上一頁的答案: 陽性反應的真正63974;患63841;只有50%!9786;
--------------------------------------------------------------------------------
Page 24
從prior到posterior的貝氏思維8226; 事前機63841;(prior)8226; 資63934;或事件(data)8226; 事後機63841;(posterior))(θθp)|(|θθypy)|()()()|()()(),()|(|θθθθθθθyppypyppypypypy∝==
--------------------------------------------------------------------------------
Page 25
趣事二則-關乎傳家大事8226; 63898;生11個63873;兒的機63841;8226; 人工授精受孕的成功機63841;
--------------------------------------------------------------------------------
Page 26
63898;生11個63873;兒的機63841;?8226; 93.7.15自由時報屏東縣南州鄉七十二歲的蔡朝謀與小他63953;歲的妻子蔡蘇月這對淳樸的農村夫婦,一心求子,無63756;天63847;從人願,結婚四十八63886;生下十一名63873;兒,天意如此,夫妻倆只好接受這樣的安排,儘管有些遺憾,但63873;兒們事親至孝,成家後個個家庭美滿,夫妻倆63845;63847;再有失63768;,而是滿懷感恩,蔡朝謀63855;,家有十一千63754;,何嘗63847;是一種幸福。
--------------------------------------------------------------------------------
Page 27
93.7.15自由時報8226; 63898;生1163873;機63841;萬分之4.88226; [記者63969;63991;法╱屏東報導]一對正常夫妻63898;續生下十一胎63873;嬰的機63841;是多少?答案是二千63922;四十八分之一,蔡家63898;生十一位千63754;的機63841;,低到63898;醫界都感到63847;可思議,東港安泰醫院院長蘇清泉認為,蔡朝謀夫妻可能創下國內的生育紀63807;。8226; 萬分之4.8怎麼算的?(.5)^11=.000488
--------------------------------------------------------------------------------
Page 28
萬分之4.8背後的假設為何?8226; 假設一: 生男生63873;的機63841;p=.5(.5)^11=.0004888226; 假設二: 每一胎之性別互相獨63991;(.5)^11=.000488But is that right?
--------------------------------------------------------------------------------
Page 29
假設一: 生男生63873;的機63841;p=.5?8226; 你覺得生男生63873;的機63841;p=.5的假設ok嗎?8226; 如果在這對夫妻已63898;生63930;6個63873;兒後,你還是覺得這對夫妻生男生63873;的機63841;是.5嗎?8226; 如果要賭一下下一胎這對夫妻會生男還是生63873;,你(妳)會下注哪一邊?
--------------------------------------------------------------------------------
Page 30
假設二: 每一胎之性別互相獨63991;8226; Q: How do you feel about this assumption?8226; In fact: 給定此夫妻生男生63873;的機63841;p,每一胎之性別互相獨63991;。並非每一胎之性別互相獨63991;。8226; 也就是63855;而非其中分別表示第i胎和第j胎的結果)|()|()|(pXPpXPpXXPjiji=)()()(jijiXPXPXXP=jiXX ,
--------------------------------------------------------------------------------
Page 31
重新思考:生男生63873;的機63841;p=.58226; 實際與63972;63809;的差63842;—對期望值(p=.5)概63907;的認63996;8226; 有很多family,平均起63789;p=.5;而非每一個family,p=.5 8226; Q:生男的機63841;p之prior=? 如果在這對夫妻已63898;生63930;6個63873;兒後,他們生男的機63841;p之posterior=?
--------------------------------------------------------------------------------
Page 32
生男的機63841;p之prior=?8226; 很多family,平均起63789;p=.5;而非每一個family, p=.58226; prior 1:8226; prior 2:5.)(,1)(),1,0(==pEpfUniformp5.)(),3,3(=pEBetap0.20.40.60.81p0.511.52f0.20.40.60.81p0.250.50.7511.251.51.75f
--------------------------------------------------------------------------------
Page 33
63898;生63930;6個63873;兒後, p之posterior=?8226; 63898;生63930;6個63873;兒的事件( )8226; 生男的機63841;p之posterior under prior 1 ( )6060)1()|0(),,6(|ppCpyppBinomialpy8722;==)7,1(|)1()|()()|(6Betaypppyppfypf8722;=∝1)( =pf0.20.40.60.81p0.511.522.5f生男個63849;==∑=61iiXy
--------------------------------------------------------------------------------
Page 34
63898;生63930;6個63873;兒後, p之posterior=?8226; 63898;生63930;6個63873;兒的事件y( ) 8226; 生男的機63841;p之posterior under prior 2 ( )6060)1()|0(),,6(|ppCpyppBinomialpy8722;==)9,3(|)1()1()1()|()()|(82622Betaypppppppyppfypf8722;=8722;8722;∝∝)3,3(Betap0.20.40.60.81p0.511.522.53f生男個63849;==∑=61iiXy
--------------------------------------------------------------------------------
Page 35
So..8226; 對於這對夫妻63898;續生下十一胎63873;嬰,你(妳)仍會覺得那麼驚訝嗎?8226; 如果在這對夫妻63898;生63930;6胎63873;嬰後,預測會再63898;生5胎63873;嬰的機63841;?8226; Under prior 2, f(p|y)Beta(3,9) 8226; 取那麼,再63898;生5胎63873;嬰的機63841;=(.8)^5=.327680.20.40.60.81p0.511.522.53fHp»yL2.))|((maxarg==pyfpp
--------------------------------------------------------------------------------
Page 36
Moreover…8226; 如果現在你要回去估計他們當63886;63860;繼續努63882;,第十二胎會生男嬰的機63841;? 你(妳)的估計會是? p=.5?p=.2?or even smaller?8226; 還是像雲63988;某中學之教學網站上[這個家庭63860;還有勇氣繼續生,則生63873;的機63841;與生男的機63841;還是一樣,都是1/2。]
--------------------------------------------------------------------------------
Page 37
Ms. Yeh8226; Subject: 請教一個生活應用的機63841;問題8226; : 敬啟者:8226; : 我很希望獲得此題之回答,8226; :8226; 我和先生正在63847;孕症門診就醫,在63864;次人工授精失敗後,醫生告訴我們:每次人工授精受孕的成功機63841;大約在15-20%之間(given no other problems of egg and sperm),但是做4次63847;成功,表示以後可能成功63841;將低於5﹪。8226; 前述的結63809;可能是研究報告的結果,但以目前的科技並無「非侵入性檢查」可以判斷egg and sperm 內在是否完全健全,因此我萌生63930;以純63849;63972;的概63907;對前述結63809;相應證的想法。8226; 63849;學題:8226; 1.前題假設egg and sperm 都健全的情況下,每次人工授精受孕的成功機63841;大約在15-20%之間。8226; 2.每次人工授精受孕的成功為獨63991;事件8226; 3.推算63898;續進64008;10次人工授精,至少有一次成功受孕的機63841;(最大及最小機63841;之範圍)8226; A.我想知道這樣命題合63847;合63972;?8226; B.請問『63898;續進64008;10次人工授精,至少有一次成功受孕的機63841;』要怎麼算?8226; 謝謝您耐心看完我的問題8226; 台灣地區63834;者 63854;小姐:
--------------------------------------------------------------------------------
Page 38
我的回答8226; 對於妳的問題,我的想法是A.妳的命題可能63847;是很適用於妳的情形. 對於一個還沒有做人工受孕的人63789;講,要計算『63898;續進64008;10次人工授精,至少有一次成功受孕的機63841;』的話,會等於P(10次至少有一次成功)=1-P(10次都失敗) 大約會介於 1-(.85)^10與1-(.80)^10之間 (0.80與 0.89之間)但是這樣的算法並63847;太適用於計算妳以後可能成功63841;,因為15-20%是平均63849;字,也就是63855;有些人高一些,有些人低一些.而根據妳之前63864;次失敗的情形,我們應該去調整妳受孕的機63841;,它就63847;再是原63789;的15-20%63930;.這在統計上可稱為posterior probability. 15-20%是 prior probability.另外醫生63855;的"做4次63847;成功,表示以後可能成功63841;將低於5﹪" 可能是把做4次以上的夫妻拿63789;統計,發現他們只有低於5﹪最後是成功的.很抱歉提供的訊息63847;能增加你們的希望.
--------------------------------------------------------------------------------
Page 39
還好…a happy ending8226; 事隔463886;多,a nice surprise…– 我看到以前寫給您的信.還有您的回答...很有意思.請問您是63849;學家還是宗教家??我在63849;個月後懷孕63930;.現在小baby已滿三歲我真的有到63940;山寺拜拜和許願Thank you again!
--------------------------------------------------------------------------------
Page 40
貝氏模型的大成功!8226; 判定63895;邦主義63809;文集中一些(12篇)有爭議性的文章的作者是誰 (Mosteller & Wallace,197063886;代)8226; Madison vs. Hamilton– 統計63864;人在使用某些特定字的習慣, 63925;如upon這個字的平均使用頻63841;, Madison, 0.23/1000; Hamilton, 3.24/10008226; 結果: Madison壓倒性(12篇)的勝63965;
--------------------------------------------------------------------------------
Page 41
Back to 相關 vs. 因果8226; What is your prior on the causal relation of 電磁波 and 腦癌? Is it causal at all?8226; It took over 40-50 years to arrive at the consensus of the causal relation of 抽煙and 肺癌, how about 電磁波 and 腦癌? Would it be more difficult?
--------------------------------------------------------------------------------
Page 42
電磁波 vs. 腦癌8226; Q: 長期使用手機時會因受電磁波影響而導致腦癌嗎?– 一些研究結果 (電磁波exposure會影響健康)
--------------------------------------------------------------------------------
Page 43
電磁波 vs. 腦癌8226; Q: 長期使用手機時會因受電磁波影響而導致腦癌嗎?– 一些研究結果 (電磁波exposure63847;會影響健康)1. Extremely low frequency electromagnetic fields from commonly used household appliances are unlikely to increase the risk of brain tumors (Kleinerman et al., 2005)2. The proportion of mobile phone uses was the same (38%) in each group, and no increased risk of brain tumor was found. (Hardell et al., 1999, 2001)3. None showed any relationship between phone use and brain tumor, nor did any show any dose-response between phone use and risk for developing a tumor. (Frumkin et al., 2001)…
--------------------------------------------------------------------------------
Page 44
BBC NewsMobile phone cancer link rejected8226; On balance, the evidence suggests there is no substantial risk of acoustic neuroma in the first decade of use. 8226; "This study provides further evidence that using mobile phones does not increase the risk of brain tumors. (Sharp)8226; This revealed no relation between the risk of acoustic neuroma and the number of years for which the mobile phones had been used, the time since first use, total hours of use or total number of calls.
--------------------------------------------------------------------------------
Page 45
However,…8226; Precautions – The government currently advises mobile phone users to keep their call times short. – Children under the age of 16 should use mobile phones for essential calls only, because their head and nervous systems may still be developing. – "Whether there are longer-term risks remains unknown, reflecting the fact that this is a relatively recent technology.“ (Swedlow)
--------------------------------------------------------------------------------
Page 46
So now what is your posterioron the causal relation of 電磁波 and 腦癌?Don’t forget to follow the relevant research results and get an update on this from time to time…
--------------------------------------------------------------------------------
Page 47
If you think it is hard to establish whether there exists a causal relation between 電磁波 and 腦癌, try parapsychology…Parapsychology超心63972;學
--------------------------------------------------------------------------------
Page 48
Paranormal8226; 定義: any phenomenon that in one or more respects exceeds the limits of what is deemed physically possible according to current scientific assumptions.8226; 這些有一部份是parapsychology探討的範圍– 意63907;的63882;63870;– 63959;迴研究
--------------------------------------------------------------------------------
Page 49
意63907;的63882;63870;8226; Does it exist?– 邵國63839;相信有意63907;的63882;63870;存在的prior ≈ 0– 經過邵曉63921;事件– 邵國63839;相信有意63907;的63882;63870;存在的posterior >0 – However, perhaps not scientific enough…8226; What is already there…– 水的結晶,米飯實驗– 銅板實驗,水的酸鹼64001;實驗 …
--------------------------------------------------------------------------------
Page 50
63959;迴研究 (reincarnation)8226; Q:如果你要研究是否有前世今生,你會怎麼做?– observational study?– experimental study?8226; What is already there…– 瀕死經驗– Children who remember their past lives8226;examples8226; two views or explanations (nonsense, chance)
--------------------------------------------------------------------------------
Page 51
貝氏思維8226; prior 依經驗或資訊調整成 posterior8226; But 經驗或資訊可靠嗎?– 公63746;總是在你等它的時候偏偏63847;63789;– 我常常唸到的部分考試都沒考到…Observational BiasScientific investigation is required…8226; What consists of the process of a scientific investigation?
--------------------------------------------------------------------------------
Page 52
Iterative Process of Scientific InvestigationDesign Conjecture ExperimentAnalysis (Data)ExperimentConjecture …DADA
--------------------------------------------------------------------------------
Page 53
結語8226; Keep an open and curious mind (well, seldom use a prior of zero…)8226; Let the scientific evidences speak for themselves (without this, one simply arrives at subjective probability 主觀機63841;, this is what 心63972;學家感興趣的)8226; Watch out for observational bias8226; We might never know whether there in fact exists a causal, or simply an association relation, but we could modify our conjectures along our way in the pursuit of knowledge…So are you a Bayesian now? :)Or aren’t we all?
--------------------------------------------------------------------------------
Page 54
63851;考資63934;8226; David Sal*****urg 統計改變63930;世界 (天下)8226; p11-12, 18-19引自鄭惟厚從統計資63934;的63789;源到信賴區間的解63834; 95課綱之統資63789;源新版pdf8226; 93.7.15自由時報63898;生1163873;8226; Richard Doll(1999),In Memoriam, Ernst Wydner,1923-1999.American JournalofPublic Health,89,1798-1799.8226; p52引自 Figure1.1.1.ofBox & Tiao(1973). BayesianInference inStatistical Analysis.8226; 還有很多研究63809;文…
--------------------------------------------------------------------------------
Page 55
That’s all. Thank you.Hope you had fun!
请您先登陆,再发跟帖!

发现Adblock插件

如要继续浏览
请支持本站 请务必在本站关闭/移除任何Adblock

关闭Adblock后 请点击

请参考如何关闭Adblock/Adblock plus

安装Adblock plus用户请点击浏览器图标
选择“Disable on www.wenxuecity.com”

安装Adblock用户请点击图标
选择“don't run on pages on this domain”