-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path7261566d.bb798702.js
1 lines (1 loc) · 13.2 KB
/
7261566d.bb798702.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{146:function(e,t,i){"use strict";i.r(t),t.default=i.p+"assets/files/b-01-gaussian-dist-6687aeba553ac80d9b02c6757c4853ca.pdf"},75:function(e,t,i){"use strict";i.r(t),i.d(t,"frontMatter",(function(){return r})),i.d(t,"metadata",(function(){return s})),i.d(t,"rightToc",(function(){return l})),i.d(t,"default",(function(){return b}));var a=i(2),n=i(6),o=(i(0),i(94)),r={title:"The Gaussian Distribution"},s={unversionedId:"sec-b/b-01-gaussian-dist",id:"sec-b/b-01-gaussian-dist",isDocsHomePage:!1,title:"The Gaussian Distribution",description:"Authors: Luke Bravo, Sidd Chauhan and Shuming Chen. (PDF)",source:"@site/docs\\sec-b\\b-01-gaussian-dist.md",slug:"/sec-b/b-01-gaussian-dist",permalink:"/APM-2020/docs/sec-b/b-01-gaussian-dist",version:"current",lastUpdatedAt:1603328123,sidebar:"docs",previous:{title:"Principal Components Analysis",permalink:"/APM-2020/docs/sec-a/a-14-pca"},next:{title:"Multiple Linear Regression",permalink:"/APM-2020/docs/sec-b/b-02-mlr"}},l=[{value:"Gaussian Distribution",id:"gaussian-distribution",children:[{value:"Transformation Of Variables To Follow Gaussian Distribution:",id:"transformation-of-variables-to-follow-gaussian-distribution",children:[]}]},{value:"Maximum Likelihood Estimation",id:"maximum-likelihood-estimation",children:[]},{value:"Multiple Linear Regression",id:"multiple-linear-regression",children:[]},{value:"Resources",id:"resources",children:[{value:"Guassian Distribution",id:"guassian-distribution",children:[]},{value:"Maximum Likelihood Estimation",id:"maximum-likelihood-estimation-1",children:[]},{value:"Multiple Linear Regression",id:"multiple-linear-regression-1",children:[]}]}],c={rightToc:l};function b(e){var t=e.components,r=Object(n.a)(e,["components"]);return Object(o.b)("wrapper",Object(a.a)({},c,r,{components:t,mdxType:"MDXLayout"}),Object(o.b)("p",null,"Authors: ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://www.linkedin.com/in/luke-bravo/"}),"Luke Bravo"),", ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://www.linkedin.com/in/siddhantchauhan77/"}),"Sidd Chauhan")," and ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://www.linkedin.com/in/shuming-chen/"}),"Shuming Chen"),". (",Object(o.b)("a",{target:"_blank",href:i(146).default},"PDF"),")"),Object(o.b)("p",null,"The lecture covered the basics of multiple linear regression and the application of maximum likelihood estimation. Fundamental to both of these topics is the basic gaussian distribution, which these notes cover first. Then, we cover maximum likelihood functions and estimations. Next, we look at the equation, assumptions, and limitations of multiple linear regression. Finally, we have included two videos that provide more information on maximum likelihood estimation, and tie these three topics together."),Object(o.b)("h2",{id:"gaussian-distribution"},"Gaussian Distribution"),Object(o.b)("p",null,"Gaussian Distribution is interchangeable with normal probability distribution or a \u2018bell curve\u2019. It is symmetrical about the mean of its data points, and points closer to the mean are more common than points far off from the mean. A key characteristic of data that have a gaussian or normal distribution is that they are independent and identically distributed (i.i.d.). The i.i.d. assumption is central to machine learning theory; it asserts that data are consistent and uniform by virtue of the way they were sampled."),Object(o.b)("p",null,"In general terms, functions with gaussian distributions are of the following form, where ",Object(o.b)("em",{parentName:"p"},"a")," and ",Object(o.b)("em",{parentName:"p"},"b")," are constants and ",Object(o.b)("em",{parentName:"p"},"c")," is a non-zero constant:"),Object(o.b)("img",{src:"https://wikimedia.org/api/rest_v1/media/math/render/svg/13993a37c117176295fada7cdaa9c1ef1ae769f7"}),Object(o.b)("p",null,"The equation below is one way of writing the probability density for the Gaussian distribution, where ",Object(o.b)("em",{parentName:"p"},"mu")," is the mean, ",Object(o.b)("em",{parentName:"p"},"sigma")," is the standard deviation, and ",Object(o.b)("em",{parentName:"p"},"sigma^2")," is the variance."),Object(o.b)("img",{src:"https://wikimedia.org/api/rest_v1/media/math/render/svg/61463c3decedda46e356782e24051ec7dd3c34c8"}),Object(o.b)("p",null,"The function has its peak at the mean, and its \u201cspread\u201d increases with the standard deviation (the function reaches 0.607 times its maximum at ",Object(o.b)("em",{parentName:"p"},"x + sigma")," and ",Object(o.b)("em",{parentName:"p"},"x - sigma"),". This implies that normal is more likely to return samples lying close to the mean, rather than those far away. ",Object(o.b)("em",{parentName:"p"},"From numpy documentation and P. R. Peebles Jr., \u201cCentral Limit Theorem\u201d in \u201cProbability, Random Variables and Random Signal Principles\u201d, 4th ed., 2001, pp. 51, 51, 125.")),Object(o.b)("h3",{id:"transformation-of-variables-to-follow-gaussian-distribution"},"Transformation Of Variables To Follow Gaussian Distribution:"),Object(o.b)("p",null,"These are some direct, mathematical methods to transform variables so that they follow Gaussian distribution. None of them is better than the other. They majorly depend on the original distribution of the variables. They are,"),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"Logarithmic Transformation"),Object(o.b)("li",{parentName:"ul"},"Reciprocal Transformation"),Object(o.b)("li",{parentName:"ul"},"Square Root Transformation"),Object(o.b)("li",{parentName:"ul"},"Exponential Transformation")),Object(o.b)("h2",{id:"maximum-likelihood-estimation"},"Maximum Likelihood Estimation"),Object(o.b)("p",null,"Maximum Likelihood Estimation is a method for estimating parameters of a probability distribution. We saw in class that maximizing a likelihood function (or minimizing its negative in the context of a cost function, see example equation below) lets you calculate the mean and variance of a distribution."),Object(o.b)("p",null,"In most cases, it is best to take the natural log of a likelihood function and then maximize or minimize the result; this is then called log-likelihood. This simplifies multiplication to addition and cancels the e term. You can also avoid differentiating to test for maxima and then differentiating again by doing this. Professor Ghosh explained that we can rest assured that the extrema of the log-likelihood function will correspond to those of the original likelihood function because the logarithm is a monotonically decreasing function."),Object(o.b)("p",null,"The two following equations express the likelihood and log-likelihood functions, respectively:"),Object(o.b)("img",{src:"https://wikimedia.org/api/rest_v1/media/math/render/svg/fa485e7acf98b3a0ce236ce7293f63dd89f84b96"}),Object(o.b)("img",{src:"https://wikimedia.org/api/rest_v1/media/math/render/svg/70323a65c0f24cb9b3e9bb0e1a8cf30442c350a7"}),Object(o.b)("p",null,"Note that for the likelihood function,"),Object(o.b)("img",{src:"https://wikimedia.org/api/rest_v1/media/math/render/svg/5a0e1848f54c87072bd9ebf8871ceeb19e8bb1e9"}),Object(o.b)("p",null,"is a product of two single-variable functions."),Object(o.b)("h2",{id:"multiple-linear-regression"},"Multiple Linear Regression"),Object(o.b)("p",null,"A linear regression model is a statistical model that\u2019s frequently used in data science. It\u2019s also one of the basic building blocks of machine learning! Multiple linear regression (MLR/multiple regression) is a statistical technique. It can use several variables to predict the outcome of a different variable. The goal of multiple regression is to model the linear relationship between your independent variables and your dependent variable. It looks at how multiple independent variables are related to a dependent variable."),Object(o.b)("p",null,"Multiple Linear Regression is a statistical technique that models the relationship between a scalar response and one or more explanatory vairables. It is often fitted using the Least Square approach. The general equation for a multiple linear regression is as follows:"),Object(o.b)("img",{src:"https://wikimedia.org/api/rest_v1/media/math/render/svg/704b31aa61dfc93d672f15bf02aa6d168be49643"}),Object(o.b)("p",null,"There are two assumptions behind the model, and they are as follows:"),Object(o.b)("ol",null,Object(o.b)("li",{parentName:"ol"},Object(o.b)("p",{parentName:"li"},"The conditional mean of Y is linear in the Xi variables")),Object(o.b)("li",{parentName:"ol"},Object(o.b)("p",{parentName:"li"},"The error terms \\ epsoilon \\ are normally distributed, independent from each other, and have constant variance."))),Object(o.b)("p",null,"The model also has its limitations, one of them being that it does not model the distribution of x."),Object(o.b)("p",null,"MLR is used extensively in econometrics and financial inference."),Object(o.b)("p",null,"Minimizing the mean square error is equivalent to maximizing likelihood under a Gaussian model."),Object(o.b)("p",null,"Least squares estimation finds the line that minuses total squared distance between the actual data point and the regression line. Maximum likelihood estimation maximizes the total probability of the data. Under Gaussian distribution, maximum probability is close to the mean value and this is equivalent to minimizing the distance between the data point and the mean value since Gaussian distribution is symmetric. "),Object(o.b)("h2",{id:"resources"},"Resources"),Object(o.b)("h3",{id:"guassian-distribution"},"Guassian Distribution"),Object(o.b)("p",null,"This ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://medium.com/towards-artificial-intelligence/introduction-to-gaussian-distribution-726be7dc5046"}),"article")," further explains gaussian distribution."),Object(o.b)("h3",{id:"maximum-likelihood-estimation-1"},"Maximum Likelihood Estimation"),Object(o.b)("p",null,"This ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://www.youtube.com/watch?v=XepXtl9YKwc&ab_channel=StatQuestwithJoshStarmer"}),"video")," gives a brief overview of MLE. The example provided helps better visualize how the estimation works. "),Object(o.b)("p",null,"This ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://towardsdatascience.com/probability-concepts-explained-maximum-likelihood-estimation-c7b4342fdbb1#:~:text=Maximum%20likelihood%20estimation%20is%20a,data%20that%20were%20actually%20observed"}),"article")," further explains MLE."),Object(o.b)("h3",{id:"multiple-linear-regression-1"},"Multiple Linear Regression"),Object(o.b)("p",null,"This ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://towardsdatascience.com/multiple-linear-regression-in-four-lines-of-code-b8ba26192e84"}),"article")," further explains MLR and how to write the basic code for MLR."),Object(o.b)("p",null,"This ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://www.investopedia.com/terms/m/mlr.asp#:~:text=Key%20Takeaways-,Multiple%20linear%20regression%20(MLR)%2C%20also%20known%20simply%20as%20multiple,uses%20just%20one%20explanatory%20variable"}),"artilce")," explains how to apply MLR in investing and finance contexts."))}b.isMDXComponent=!0},94:function(e,t,i){"use strict";i.d(t,"a",(function(){return m})),i.d(t,"b",(function(){return h}));var a=i(0),n=i.n(a);function o(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,a)}return i}function s(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?r(Object(i),!0).forEach((function(t){o(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function l(e,t){if(null==e)return{};var i,a,n=function(e,t){if(null==e)return{};var i,a,n={},o=Object.keys(e);for(a=0;a<o.length;a++)i=o[a],t.indexOf(i)>=0||(n[i]=e[i]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)i=o[a],t.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}var c=n.a.createContext({}),b=function(e){var t=n.a.useContext(c),i=t;return e&&(i="function"==typeof e?e(t):s(s({},t),e)),i},m=function(e){var t=b(e.components);return n.a.createElement(c.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.a.createElement(n.a.Fragment,{},t)}},d=n.a.forwardRef((function(e,t){var i=e.components,a=e.mdxType,o=e.originalType,r=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),m=b(i),d=a,h=m["".concat(r,".").concat(d)]||m[d]||u[d]||o;return i?n.a.createElement(h,s(s({ref:t},c),{},{components:i})):n.a.createElement(h,s({ref:t},c))}));function h(e,t){var i=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=i.length,r=new Array(o);r[0]=d;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:a,r[1]=s;for(var c=2;c<o;c++)r[c]=i[c];return n.a.createElement.apply(null,r)}return n.a.createElement.apply(null,i)}d.displayName="MDXCreateElement"}}]);