协方差的意义

news/2024/11/24 14:14:05/
   

终于明白协方差的意义了

                <div class="article_data_left">2018-03-15<span class="a_username">&nbsp;<a href="http://www.360doc.com/userhome/48898194" id="savernickname" target="_blank" onclick="artStatistics('20-7-1');">Greatguy瑞</a></span><span id="articleinfo"><span id="docsource" class="a_from" style="display: none;">&nbsp;<a href="http://blog.csdn.net/northeastsqure/article/details/50163031" target="_blank" onclick="artStatistics('20-12');">来源</a></span><span id="360doc_Readnum">&nbsp;&nbsp;阅&nbsp;1652&nbsp;</span><span id="360docResaveCount" style="display: none;"><span onclick="ShowSaverUser();artStatistics('20-13');" id="360doc_saverNum" style="cursor: pointer;"></span><span id="360doc_saverUser"><div style="position: absolute; height: 305px; width: 144px; left: 0px; z-index: 2;" id="sameArtOuter"><div onclick="event.cancelBubble=true;" style="overflow-y: auto; height: 300px; overflow-x: hidden; z-index: 100; right: 0px; margin-top: -10px;" id="sameArt"></div></div></span></span></span></div><div id="resavelayer1" class="bdsharebuttonbox article_data_right bdshare-button-style0-16" data-bd-bind="1582275510035"><div class="zcommond"><a class="p2" href="javascript:void(0);" onclick="SaveArt();artStatistics('20-3-1');">转藏到我的图书馆</a><div class="s2 f_right" onclick="setTimeout(function(){$('.article_data_right .sharelist_new').slideToggle(0);},10);"><span onclick="artStatistics('20-8-2');"></span></div><a class="p1" href="javascript:void(0);" onclick="shareWeixin();artStatistics('20-8-5');shareStatic.addStatic();pushUserInterestRedis(4);">微信</a> <span class="s1" onclick="setTimeout(function(){$('.article_data_right .sharelist_new').slideToggle(0);},10);artStatistics('20-8-1');" onmouseover="this.style.color='#0f659c'" onmouseout="this.style.color=''">分享:</span></div><div class="sharelist_new" id="fenxiangLayer"> <a class="slbg1" href="javascript:void(0);" data-cmd="qzone" onclick="artStatistics('20-8-7');shareStatic.addStatic();pushUserInterestRedis(4);">QQ空间</a> <a class="slbg2" href="javascript:void(0);" data-cmd="sqq" onclick="artStatistics('20-8-9');shareStatic.addStatic();pushUserInterestRedis(4);">QQ好友</a> <a class="slbg3" href="javascript:void(0);" data-cmd="tsina" onclick="artStatistics('20-8-11');shareStatic.addStatic();pushUserInterestRedis(4);">新浪微博</a><a class="slbg5" href="javascript:void(0);" onclick="showdivemail1();artStatistics('20-8-15');shareStatic.addStatic();pushUserInterestRedis(4);">推荐给朋友</a> </div><div style="position: absolute;display:none;z-index:1;left:143px;" id="fuzhitishidiv"></div></div></div><div id="articlecontent" class="article_container" onmousedown="newhighlight = true;" onmouseup="NewHighlight(event);"><div class="article_showall"><div><a href="javascript:void(0);" onclick="$('body').removeClass('articleMaxH')" datatype="360doczkqw">展开全文</a></div></div><table style="width: 656px;"><tbody><tr><td id="artContent" style="max-width: 656px"><div style="width: 656px; margin: 0; padding: 0; height: 0;"></div><p>协方差代表了两个变量之间的是否同时偏离均值。</p><p><img src="http://1053.edu.pinggu.com/forum/201410/09/101133h1w1dhc1d7v9db1f.png" alt="3a6f9c262fc67167d50742c3.png" title="3a6f9c262fc67167d50742c3.png"><span>&nbsp;</span><br></p><p>如果正相关,这个计算公式,每个样本对(Xi, Yi), 每个求和项大部分都是正数,即两个同方向偏离各自均值,而不同时偏离的也有,但是少,这样当样本多时,总和结果为正。下面这个图就很直观。下面转载自:http://blog.csdn.net/wuhzossibility/article/details/8087863</p><p></p><p align="center"><span>在概率论中,两个随机变量 X 与 Y 之间相互关系,大致有下列3种情况:</span></p><p align="center"><img src="http://image109.360doc.com/DownloadImg/2018/03/1517/127287968_1_20180315054300878.jpg" alt=""><br></p><p align="center"></p><p><span><span></span>当 X, Y 的联合分布像上图那样时,我们可以看出,大致上有: X 越大 &nbsp;Y 也越大, X 越小 &nbsp;Y 也越小,这种情况,我们称为“<strong><span>正相关</span></strong>”。</span></p><p><span><img src="http://image109.360doc.com/DownloadImg/2018/03/1517/127287968_2_2018031505430135.jpg" alt=""><br></span></p><p><span></span></p><p><span></span>当X, Y 的联合分布像上图那样时,我们可以看出,大致上有:X 越大Y 反而越小,X 越小 Y 反而越大,这种情况,我们称为“<strong><span>负相关</span></strong>”。</p><div><img src="http://image109.360doc.com/DownloadImg/2018/03/1517/127287968_3_20180315054301331.jpg" alt=""></div><div><span></span>当X, Y &nbsp;的联合分布像上图那样时,我们可以看出:既不是X &nbsp;越大Y 也越大,也不是 X 越大 Y 反而越小,这种情况我们称为“<strong><span>不相关</span></strong>”。<br></div><div><p>怎样将这3种相关情况,用一个简单的数字表达出来呢?</p><p><span></span>在图中的区域(1)中,有 X&gt;EX ,Y-EY&gt;0 ,所以(X-EX)(Y-EY)&gt;0;</p><p><span></span>在图中的区域(2)中,有&nbsp;<span>X<ex ,y-ey="">0 ,</ex></span>所以<span>(X-EX)(Y-EY)&lt;&gt;</span></p><p><span></span>在图中的区域(3)中,有&nbsp;<span>X<ex></ex>&lt;0&gt;<!--0--></span>所以<span>(X-EX)(Y-EY)&gt;0;</span></p><p><span></span>在图中的区域(4)中,有&nbsp;<span>X&gt;EX ,Y-EY&lt;0&gt;<!--0--></span>所以<span>(X-EX)(Y-EY)&lt;&gt;</span>。</p><p><strong><span><span></span>当</span>X&nbsp;</strong><span><strong>与</strong></span><strong>Y&nbsp;</strong><span><strong>正相关</strong></span><span><strong>时,它们的分布大部分在区域(</strong></span><span><strong>1</strong></span><span><strong>)和(</strong></span><span><strong>3</strong></span><span><strong>)中,小部分在区域(</strong></span><span><strong>2</strong></span><span><strong>)和(</strong></span><span><strong>4</strong></span><strong><span>)中,所以平均来说,有</span><span>E</span>(<span>X-EX)(Y-EY)&gt;0</span>&nbsp;</strong><span><strong>。</strong></span></p><p><strong><span><span></span>当</span>&nbsp;X<span>与</span><span>&nbsp;</span>Y<span>负相关</span><span>时,它们的分布大部分在区域(</span><span>2</span><span>)和(</span><span>4</span><span>)中,小部分在区域(</span><span>1</span><span>)和(</span><span>3</span><span>)中,所以平均来说,有</span><span><strong>(X-EX)(Y-EY)&lt;&gt;</strong></span><span>&nbsp;</span><span><strong>。</strong></span><span></span></strong></p><p><strong><span><span></span>当</span>&nbsp;X<span>与</span>&nbsp;Y<span>不相关</span><span>时,它们在区域(</span><span>1</span><span>)和(</span><span>3</span><span>)中的分布,与在区域(</span><span>2</span><span>)和(</span><span>4</span><span>)中的分布几乎一样多,所以平均来说,有</span><span><strong>(X-EX)(Y-EY)=0</strong></span><span>&nbsp;</span><span><strong>。</strong></span><span></span></strong></p><span></span><span>所以,我们可以定义一个表示X, Y&nbsp;相互关系的数字特征,也就是</span><span><strong><span><a href="http://zh.wikipedia.org/wiki/%E5%8D%8F%E6%96%B9%E5%B7%AE">协方差</a></span></strong></span></div><div><div>cov(X, Y) = E(X-EX)(Y-EY)<span>。</span></div><span></span><p><strong><span>当</span>&nbsp;<span>cov(X, Y)&gt;0</span></strong><span><strong>时,</strong></span><span><strong>表明</strong></span><span>&nbsp;X</span><span><strong>与</strong></span><span>Y</span><span>&nbsp;</span><span><strong>正相关</strong></span><span><strong>;</strong></span></p><span></span><p><strong><span>当</span>&nbsp;<span><strong>cov(X, Y)&lt;&gt;</strong></span><span>时,表明</span><span><strong>X</strong></span><span><strong>与</strong></span><span><strong>Y</strong></span><span>负相关</span><span>;</span></strong></p><p><strong><span>当&nbsp;</span><span><strong><strong>cov(X, Y)=0</strong></strong></span><span>时,表明</span><span><strong>X</strong></span><span><strong>与</strong></span><span><strong>Y</strong></span><span>不相关</span><span>。</span></strong></p><p>这就是协方差的意义。</p></div><br><p><br></p></td></tr></tbody></table><!--阅读全文(测试用,现在可能不用了)--><div id="viewerPlaceHolder" style="width: 717px; height: 700px; display: none; margin: 0 auto;"></div></div><table><!--防止文章内容有不完整标签--><tbody><tr><td><ul></ul></td></tr></tbody></table><div></div><span></span><a></a><p style="margin: 0; padding: 0;"></p><p class="clearboth"></p><div id="oranuserinfo" style="display: none;  border: 0;padding: 0; margin: 0;overflow: visible;" class="yc_user zcomdiv new_yc_user"></div><div id="divreward" style="display: none; width: 659px;"><div class="arti_reward new_arti_reward"><a id="btnreward" href="javascript:void(0);" class="a1" onclick="rewardlist.showRewardAlert();">赞赏</a><div id="rewarduserslist" class="arti_rlist"><a href="javascript:void(0);" class="ara1"><img src="http://pubimage.360doc.com/payment/wx.jpg" title="游客"></a><a href="javascript:void(0);" class="ara1"><img src="http://pubimage.360doc.com/payment/wx.jpg" title="游客"></a><a href="javascript:void(0);" class="ara1"><img src="http://pubimage.360doc.com/payment/wx.jpg" title="游客"></a><a href="javascript:void(0);" class="ara1"><img src="http://pubimage.360doc.com/payment/wx.jpg" title="游客"></a><span id="spantotalrewardcount" class="ara1_morelist stopbubble"><div class="d1"><span id="totalormore" style="color: black;">共</span><span id="totalrewardcount">11</span>人赞赏</div><div id="morerewarduserslist" class="d2" style="display: none;"></div></span></div></div></div><div id="divtort"><div style="color:#999;text-align:left;line-height:22px;background:#f7f7f7;padding: 10px 20px;margin-bottom: -7px;margin-top:10px;">本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。如发现有害或侵权内容,请<span style="color:#155d9a;cursor:pointer;white-space: nowrap;" onclick="reportLayer.isLogin();artStatistics('20-18');">点击这里</span> 或 拨打24小时举报电话:4000070609 与我们联系。</div></div><div id="divresaveunder" class="bdsharebuttonbox bottombtn bdshare-button-style0-16" style="margin-top: 23px;" data-bd-bind="1582275510035"><div class="zcommond" style="overflow: visible;"><a href="javascript:void(0);" class="btn_collect" onclick="SaveArt();artStatistics('20-3-2');">转藏到我的图书馆</a><a id="flowimg3" href="javascript:void(0);" class="btn_good" onclick="Showflowerlayer('sendedLayer1');">献花(<span id="articleflowernum">0</span>)<span id="flowernumadd" style="display: none;">+1</span></a><span class="span1 f_left" onclick="setTimeout(function(){$('.bottombtn .sharelist_new').slideToggle(0);},10);artStatistics('20-8-3');pushUserInterestRedis(4)" onmouseover="this.style.color='#0f659c'" onmouseout="this.style.color=''">分享:</span><a class="sharewx f_left" href="javascript:void(0);" onclick="shareWeixin();artStatistics('20-8-6');shareStatic.addStatic();pushUserInterestRedis(4)">微信</a><div class="s2 f_left" onclick="setTimeout(function(){$('.bottombtn .sharelist_new').slideToggle(0);},10);artStatistics('20-8-4');"><span></span></div></div><div class="sharelist_new" id="fenxiangLayer2"><a class="slbg1" href="javascript:void(0);" onclick="shareTo('qzone');artStatistics('20-8-8');shareStatic.addStatic();">QQ空间</a><a class="slbg2" href="javascript:void(0);" onclick="shareTo('qq');artStatistics('20-8-10');shareStatic.addStatic();">QQ好友</a><a class="slbg3" href="javascript:void(0);" onclick="shareTo('sina');artStatistics('20-8-12');shareStatic.addStatic();">新浪微博</a><a class="slbg5" href="javascript:void(0);" onclick="showdivemail1();artStatistics('20-8-16');shareStatic.addStatic();">推荐给朋友</a></div></div><div class="bottom_controler"><p class="bottom_cleft">来自:<span class="a_username" style="width: auto;"><a href="http://www.360doc.com/userhome/48898194" id="savernickname2" target="_blank" onclick="artStatistics('20-7-2');">Greatguy瑞</a></span>&gt; <span id="cname" class="a_from"><a href="http://www.360doc.com/userhome.aspx?userid=48898194&amp;cid=7" target="_blank" onclick="artStatistics(&quot;20-6&quot;);">《统计学 大数据》</a></span></p><div class="bottom_cright"><a href="javascript:void(0);" class="a2" onclick="reportLayer.isLogin();artStatistics('20-18');">举报</a></div></div><div class="prev_next"><p class="p1" style="display: block;"><span style="color: #E6352B;">推<span style="visibility: hidden;">一</span>荐</span>:<a href="http://www.360doc.com/pages/Wallet/bonus.html" target="_blank">发原创得奖金,“原创奖励计划”来了!</a>&nbsp;&nbsp;<span style="color: #707070">|</span>&nbsp;&nbsp;<a href="http://www.360doc.com/pages/activity/activity38.html" target="_blank">曾为鲜衣怒马少年时,有奖征文邀你分享!</a></p></div><div class="prev_next"><p id="lastart" class="p1" style="display: block;"> 上一篇:<a onclick="artStatistics(&quot;20-9-5&quot;);" href="http://www.360doc.com/content/18/0126/12/48898194_725236883.shtml" target="_blank">熊大胡说 | 北大教授告诉你,被顶级学术期刊枪毙的p.Value到底是个什么鬼?</a></p><p id="nextart" class="p2" style="display: block;"> 下一篇:<a onclick="artStatistics(&quot;20-9-6&quot;);" href="http://www.360doc.com/content/18/0515/22/48898194_754249040.shtml" target="_blank">一文读懂多元回归分析</a></p></div><div class="prev_next" style="margin-left: -13px; line-height: normal;"><script src="//static.mediav.com/js/feed_ts.js"></script><script>NEWS_FEED({w: 500,showid: '6aUB2C',inject: 'textual',useCapture: true,usePolling: true,displayType: 'singleImage',noCSS:false,userConf: {titleFontSize: 14,titleFontColor: "#707070",titleHover: "#0f659c",titleFontFamily: "Microsoft Yahei"}});</script><newsfeed id="QIHOO__WEB__SO__1582275509483_817" style="display: block; position: relative; margin: 0px; padding: 0px; overflow: hidden; border: none; text-align: left; width: 500px;"><newsfeed-header class="feed-tab"></newsfeed-header><newsfeed-main style="overflow: hidden; position: relative; font-size: 50px;"><info-div class="feed__wrapper" data-impressnum="0.6000950744772322"><info-div></info-div><info-div class="feed__item textual clk"><info-div class="textual__body"><a class="feed__link" data-href="http://spro.so.com/searchthrow/api/midpage/throw?ls=sn2344760&amp;q=%E9%87%91%E6%AD%A3%E6%94%B6%E9%9F%B3%E6%9C%BA&amp;lmid=2b8ac620513caefb.0&amp;mid=f30a8a5011513c12daddeb67a1eef31c&amp;huid=113ZuYrjLAE83jNX5omidCnYY17KrgiOPXcjsZbqzwys0%3D&amp;lm_extend=ctype%3A29%7Clmbid%3A24%2C14%2C35%2C4%2C64%2C73%2C7%2C93%2C101%2C111%2C502%7Cjt%3A2%7Cmaxbid%3A4456453%2C4457009%2C4456713%2C4456961%2C4456457%2C4325392%2C4390928%2C4390930%2C4390949%7Csadspace%3A&amp;ctype=29&amp;rurl=http%3A%2F%2Fwww.360doc.com%2Fcontent%2F18%2F0315%2F17%2F48898194_737282437.shtml&amp;bucket_id=24,14,35,4,64,73,7,93,101,111,502&amp;lmsid=2b8ac620513caefb.0&amp;ism=1&amp;seq=&amp;travel_city=" href="http://spro.so.com/searchthrow/api/midpage/throw?ls=sn2344760&amp;q=%E9%87%91%E6%AD%A3%E6%94%B6%E9%9F%B3%E6%9C%BA&amp;lmid=2b8ac620513caefb.0&amp;mid=f30a8a5011513c12daddeb67a1eef31c&amp;huid=113ZuYrjLAE83jNX5omidCnYY17KrgiOPXcjsZbqzwys0%3D&amp;lm_extend=ctype%3A29%7Clmbid%3A24%2C14%2C35%2C4%2C64%2C73%2C7%2C93%2C101%2C111%2C502%7Cjt%3A2%7Cmaxbid%3A4456453%2C4457009%2C4456713%2C4456961%2C4456457%2C4325392%2C4390928%2C4390930%2C4390949%7Csadspace%3A&amp;ctype=29&amp;rurl=http%3A%2F%2Fwww.360doc.com%2Fcontent%2F18%2F0315%2F17%2F48898194_737282437.shtml&amp;bucket_id=24,14,35,4,64,73,7,93,101,111,502&amp;lmsid=2b8ac620513caefb.0&amp;ism=1&amp;seq=&amp;travel_city=" data-clk="http://stat.lianmeng.360.cn/s2/clk.gif?lm_extend=ctype%3A29%7Clmbid%3A24%2C14%2C35%2C4%2C64%2C73%2C7%2C93%2C101%2C111%2C502%7Cjt%3A2%7Cmaxbid%3A4456453%2C4457009%2C4456713%2C4456961%2C4456457%2C4325392%2C4390928%2C4390930%2C4390949%7Csadspace%3A&amp;qid=2b8ac620513caefb.0&amp;nu=3&amp;ls=sn2344760&amp;ifr=0&amp;ir=1&amp;m=AgsICgwGAgAFAQMMCg4PC4KJKHhxNsHmwAqtrg&amp;wp=AAAAAF5Pm7UAAAAAAAg2unacGMhYKdRKa6xn7g&amp;index=0&amp;txt=%E9%87%91%E6%AD%A3%E6%94%B6%E9%9F%B3%E6%9C%BA&amp;ds=%%DEAL_SLOT%%&amp;_r=1582275509495,http://sfstat.lianmeng.360.cn/s2/clk.gif?lm_extend=ctype%3A29%7Clmbid%3A24%2C14%2C35%2C4%2C64%2C73%2C7%2C93%2C101%2C111%2C502%7Cjt%3A2%7Cmaxbid%3A4456453%2C4457009%2C4456713%2C4456961%2C4456457%2C4325392%2C4390928%2C4390930%2C4390949%7Csadspace%3A&amp;qid=2b8ac620513caefb.0&amp;nu=3&amp;ls=sn2344760&amp;ifr=0&amp;ir=1&amp;m=AgsICgwGAgAFAQMMCg4PC4KJKHhxNsHmwAqtrg&amp;wp=AAAAAF5Pm7UAAAAAAAg2unacGMhYKdRKa6xn7g&amp;index=0&amp;txt=%E9%87%91%E6%AD%A3%E6%94%B6%E9%9F%B3%E6%9C%BA&amp;ds=%%DEAL_SLOT%%&amp;_r=1582275509495&amp;img_key=t016c33bcd7643ce51f.png&amp;img_size=180_100&amp;mid=f30a8a5011513c12daddeb67a1eef31c,http://max-l.mediav.com/rtb?type=3&amp;ver=1&amp;v=CH8SEDE0MmFiYmFkNWU3MzNmYWIYuI6PASDE5AwoAWIXODExMzI5ODA5MjcwOTE3MTQwODAwMTlwAIoBEDE0MmFiYmFkNWU3MzNmYWI&amp;k=5JVwPQAAAAA=&amp;i=k2_mzkEMc9WU&amp;exp=BQBEMQJECQFEAQJECQBEEABCEABDEgBDJQBD&amp;x=__OFFSET_X__&amp;y=__OFFSET_Y__&amp;st=__EVENT_TIME_START__&amp;et=__EVENT_TIME_END__&amp;adw=__ADSPACE_W__&amp;adh=__ADSPACE_H__&amp;tc=&amp;turl=" target="_blank"><info-div class="textual__title">【金正收音机】新款 金正收音机2020年新款</info-div><info-span class="adTag">广告</info-span></a></info-div></info-div></info-div></newsfeed-main></newsfeed></div></div>

在这里插入图片描述


http://www.ppmy.cn/news/605380.html

相关文章

LeetCode中等题之字典序排数

题目 给你一个整数 n &#xff0c;按字典序返回范围 [1, n] 内所有整数。 你必须设计一个时间复杂度为 O(n) 且使用 O(1) 额外空间的算法。 示例 1&#xff1a; 输入&#xff1a;n 13 输出&#xff1a;[1,10,11,12,13,2,3,4,5,6,7,8,9] 示例 2&#xff1a; 输入&#xff1a;n…

方差协方差以及协方差矩阵

协方差矩阵在统计学和机器学习中随处可见&#xff0c;一般而言&#xff0c;可视作方差和协方差两部分组成&#xff0c;即方差构成了对角线上的元素&#xff0c;协方差构成了非对角线上的元素。本文旨在从几何角度介绍我们所熟知的协方差矩阵。文章结构方差和协方差的定义从方差…

通过nginx_lua拦截请求参数准发到不同服务

一、引言 ​ 在不更改代码情况下&#xff0c;使用nginx拦截请求参数token&#xff0c;通过token长短转发到不同应用。可使用nginx_lua 实现。 二、处理方案 2.1 前置要求 ​ nginx安装lua模块&#xff0c;也可直接使用OpenResty&#xff08;通过Lua拓展nginx的web平台&…

LeetCode简单题之有效的山脉数组

题目 给定一个整数数组 arr&#xff0c;如果它是有效的山脉数组就返回 true&#xff0c;否则返回 false。 让我们回顾一下&#xff0c;如果 arr 满足下述条件&#xff0c;那么它是一个山脉数组&#xff1a; arr.length > 3 在 0 < i < arr.length - 1 条件下&#…

协方差矩阵有什么意义?

Yining​交易员740 人赞同了该回答协方差矩阵实在是太重要了&#xff0c;无论是在计量&#xff0c;金融工程还是随机分析中&#xff0c;我们都会到用到协方差矩阵。其实&#xff0c;这三者都利用了协方差矩阵本身的含义&#xff0c;即随机变量之间的线性相关关系&#xff08;当…

LeetCode简单题之山脉数组的峰顶索引

题目 符合下列属性的数组 arr 称为 山脉数组 &#xff1a; arr.length > 3 存在 i&#xff08;0 < i < arr.length - 1&#xff09;使得&#xff1a; arr[0] < arr[1] < … arr[i-1] < arr[i] arr[i] > arr[i1] > … > arr[arr.length - 1] 给你由…

对偶问题

比如一个学校有n个班&#xff0c;以及n个老师&#xff0c;每个老师教两个班&#xff0c;并且没有两位老师所教的两个班完全重合。反过来&#xff0c;每个班也有两个任课老师。

LeetCode简单题之得到 0 的操作数

题目 给你两个 非负 整数 num1 和 num2 。 每一步 操作 中&#xff0c;如果 num1 > num2 &#xff0c;你必须用 num1 减 num2 &#xff1b;否则&#xff0c;你必须用 num2 减 num1 。 例如&#xff0c;num1 5 且 num2 4 &#xff0c;应该用 num1 减 num2 &#xff0c;因此…