




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、The University of Texas at Austin, CS 395T, Spring 2008, Prof. William H. Press1Computational Statistics withApplication to Bioinformatics Prof. William H. PressSpring Term, 2008The University of Texas at AustinUnit 9: Working with Multivariate Normal DistributionsThe University of Texas at Austin,
2、CS 395T, Spring 2008, Prof. William H. Press2The multivariate normal distributioncompletely defined by its mean (vector) and covariance (matrix)therefore, trivial to “fit” to a bunch of sample pointsalso easy (e.g. in Matlab) to sample fromBrief digression on spliceosomesexplain the weird exon lengt
3、h distribution that weve previously seenRelation of fitted covariance matrix to linear correlation matrixstatistical significance of a correlationbut, note, uses CLTHow to generate multivariate normal deviatesCholesky position of the covariance matrixA related Cholesky trick: draw error ellipses cor
4、responding to a given covariance matrixCan there be a significant correlation that is not a “real association”no, there cant beif CLT appliesor, if CLT doesnt apply, if you compute significance correctlye.g., by permutation testUnit 9: Working with Multivariate Normal Distributions (Summary)The Univ
5、ersity of Texas at Austin, CS 395T, Spring 2008, Prof. William H. Press3New topic: the Multivariate Normal DistributionGeneralizes Normal (Gaussian) to M-dimensionsLike 1-d Gaussian, completely defined by its mean and (co-)varianceMean is a M-vector, covariance is a M x M matrixBecause mean and cova
6、riance are easy to estimate from a data set, it is easy perhaps too easy to fit a multivariate normal distribution to data.=h(x)(x)i=hxig = readgenestats(genestats.dat);ggg = g(g.ne2,:);which = randsample(size(ggg,1),1000);iilen = ronlen(which);i1len = zeros(size(which);i2len = zeros(size(whi
7、ch);for j=1:numel(i1len), i1llen(j) = log10(iilenj(1); end;for j=1:numel(i2len), i2llen(j) = log10(iilenj(2); end;plot(i1llen,i2llen,+)hold onSample the sizes of 1st and 2nd introns for 1000 genes:The University of Texas at Austin, CS 395T, Spring 2008, Prof. William H. Press4notice the biology!This
8、 is kind of fun, because its not just the usual featureless scatter plotIs there a significant correlation here? (Yes, well see.)(Do you think the correlation could be only from the biological censoring of low values, and not be a “real association”?)The University of Texas at Austin, CS 395T, Sprin
9、g 2008, Prof. William H. Press5credit: Alberts et al.Molecular Biology of the CellBiological digression:The hard lower bounds on intron length are because the intron has to fit around the “big” spliceosome machinery!Its all carefully arranged to allow exons of any length, even quite small.Why? Could
10、 the spliceosome have evolved to require a minimum exon length, too? Are we seeing chance early history, or selection?The University of Texas at Austin, CS 395T, Spring 2008, Prof. William H. Press6mu = mean(i1llen; i2llen,2)sig = cov(i1llen,i2llen)mu = 3.2844 3.2483sig = 0.6125 0.2476 0.2476 0.5458
11、rsamp = mvnrnd(mu,sig,1000);plot(rsamp(:,1),rsamp(:,2),or)hold offWe can easily sample from the fitted multivariate Gaussian:By the way, if renormalized, the covariance matrix is the linear correlation matrix:r = sig ./ sqrt(diag(sig) * diag(sig)tval = sqrt(numel(iilen)*rr = 1.0000 0.3843 0.3843 1.0
12、000tval = 31.6228 12.1511 12.1511 31.6228rr p = corrcoef(i1llen,i2llen)rr = 1.0000 0.3843 0.3843 1.0000p = 1.0000 0.0000 0.0000 1.0000statistical significance of the correlation in standard deviations (but note: uses CLT)Matlab has built-insThe University of Texas at Austin, CS 395T, Spring 2008, Pr
13、of. William H. Press7How to generate multivariate normal deviates:So, just take:and you get a multivariate normal deviate!The University of Texas at Austin, CS 395T, Spring 2008, Prof. William H. Press8A related, useful, Cholesky trick is to draw error ellipses (ellipsoids, )So, locus of points at 1
14、 standard deviation isIf z is on the unit circle (sphere, ) thenfunction x y = errorellipse(mu,sigma,stdev,n)L = chol(sigma,lower);circle = cos(2*pi*(0:n)/n); sin(2*pi*(0:n)/n).*stdev;ellipse = L*circle + repmat(mu,1,n+1);x = ellipse(1,:);y = ellipse(2,:);plot(i1llen,i2llen,+b);hold onxx yy = errore
15、llipse(mu,sig,1,100);plot(xx,yy,-r);xx yy = errorellipse(mu,sig,2,100);plot(xx,yy,-r)The University of Texas at Austin, CS 395T, Spring 2008, Prof. William H. Press9plot(i1llen,i2llen,+b)hold onplot(i1llen(randperm(numel(i1llen),i2llen,+r);The theorem that r is normal (around zero) for independent d
16、istributions is a CLT and doesnt depend on the individual distributions (as long as they have suitably convergent moments and the number of data points is large)Its clear for our example data if you plot even one random permutation:In case of any lingering doubt, you could use brute force: do the permutation test and plot the histogram of r va
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 廣告安裝委托合同7篇
- 過戶車輛轉讓協(xié)議與運動員參賽合同8篇
- 2025年南昌貨運從業(yè)資格證模擬考試試題題庫答案
- 項目啟動會議紀要與決策記錄
- 中秋福利采購合同
- 委托代理進口合同協(xié)議書
- 2025年天津貨運上崗證考試考哪些科目
- 2025年蚌埠駕校考試貨運從業(yè)資格證考試題庫
- f2025二手商鋪買賣合同8篇
- 《2.2分子結構與物質的性質》說課稿
- 2024-2025學年新教材高中化學 第三章 鐵 金屬材料 2.1 合金說課稿 新人教版必修1
- 浙江省杭州市2023-2024學年七年級上學期期末考試數(shù)學試題(含答案)
- 品牌全球化體育營銷趨勢洞察報告 2024
- 安徽省蕪湖市普通高中2025屆高考全國統(tǒng)考預測密卷物理試卷含解析
- 第2課++生涯規(guī)劃+筑夢未來(課時2)【中職專用】中職思想政治《心理健康與職業(yè)生涯》高效課堂 (高教版基礎模塊)
- 臨床診療指南(急診醫(yī)學)
- 人教PEP英語五年級下冊全冊教案(表格教學設計)
- DZ∕T 0219-2006 滑坡防治工程設計與施工技術規(guī)范(正式版)
- 密目網覆蓋施工方案
- 家族族譜資料收集表
- 放射科護士講課
評論
0/150
提交評論