Formulæ for concepts that Tom is drawing Thomas Levine March 22, 2014

These formulæ are for the bivariate (rather than more-than-two) populations (rather than samples).

1

Covariance

Conceptually, it’s this.   σxy = E (x − E[x])(y − E[y]) More precisely, it could be this. σxy =

N 1 X (xi − x ¯) (yi − y¯) N i=1

PN That’s the sum ( i=1 ) of rectangles ((xi − x ¯) (yi − y¯)) divided by the number of observations/rectangles ( N1 ). As matrix arithmetic, it’s written in a way that works for more than two variables. (Σ is the covariance matrix.) h i T Σ = E (X − E[X]) (X − E[X]) It’s multiplication of many X by many X, and that’s lots of rectangles for lots of covariances. In R, it’s this. # Two variables cov(x,y) # More variables var(iris[-5]) cov(iris[-5]) 1

2

Variance

Variance is the covariance of something with itself.  2 σx2 = σxx = E (x − E[x]) More precisely, like the covariance, it could be this. σx2 =

N 1 X (xi − x ¯) (xi − x ¯) N i=1

And that reduces to this. σxy =

N 1 X 2 (xi − x ¯) N i=1 2

This time, the top is a sum of squares ((xi − x ¯) ). As matrix arithmetic, it’s the diagonal of the covariance because those are the cells where we’re multiplying the the same x. diag (Σ) In R, all of these would work. # One variable var(x) cov(x,x) # More variables lapply(iris[-5],var) diag(cov(iris[-5]))

3

Correlation

Correlation (specifically, the Pearson product-moment correlation coefficient— there are others) measures how much the variables linearlly depend on each other. For perfectly linear variables that move together, ρxy will be 1. For perfectly linear variables that move oppositely, ρxy will be −1. ρxy is just the covariance (σxy ) divided by the product of the standard deviations (σx σy ).

2

ρxy =

σxy σx σy

We can also factor out the N term and write it as the sum of the rectangles divided by the rectangle formed by the square roots of the sums of the squares. PN

(xi − x ¯) (yi − y¯) q 2 PN 2 ¯) ¯) i=1 (xi − x i=1 (yi − y i=1

ρ = qP N

If you need to be convinced that σxy is no greater than σx σy , recall that the covariance includes negative rectangles and the variance does not;

4

Ordinary least-squares regression

Simple regression is a best fit line between two variables; we are looking for α and β. yˆi = α + βxi β is just the covariance divided by the variance. β = σxy/σx2 We can also factor out the N term and write it as the sum of the rectangles divided by the sum of the squares. β=

1 N

PN

¯) (yi − i=1 (xi − x PN 2 1 ¯) i=1 (xi − x N

y¯)

PN β=

(xi − x ¯) (yi − y¯) PN 2 ¯) i=1 (xi − x

i=1

In matrix form, we might right this. B = XT X

−1

XT y

The part on the right (X T y) is multiplication of x-values by y-values, so it’s the sum of rectangles like in covariance.  -1  We invert the part on the left X T X , so it’s sort of like a denominator. We’re multiplying x-values by x-values, so it’s a sum of squares, like in variance.

3

5

Credits

Some formulæ were lifted from these pages. • http://en.wikipedia.org/w/index.php?title=Covariance&action=edit • http://en.wikipedia.org/w/index.php?title=Pearson_product-moment_ correlation_coefficient&action=edit§ion=3 • http://en.wikipedia.org/w/index.php?title=Ordinary_least_squares&action= edit

4

Formulæ for concepts that Tom is drawing - GitHub

Mar 22, 2014 - As matrix arithmetic, it's the diagonal of the covariance because those are the cells where we're multiplying the the same x. diag (Σ). In R, all of ...

138KB Sizes 0 Downloads 46 Views

Recommend Documents

Technical Drawing - GitHub
Jan 19, 2017 - SD CARD DETAIL. (OMEGA2+ ONLY). D. C. B. A. A. B. C. D. 1. 2. 3. 4. 5. 6. 7. 8. 8. 7. 6. 5. 4. 3. 2. 1. OMEGA2. TITLE. DIMENSION IN MM.

Drawing - Case - Sheet1 - GitHub
Page 1. 6.000. 6.000. CALIBRATION. U. P. 9. 0 .0. 0. ° R .0. 2. IO SHIELD. CUTOUT. MB Outline 6.693" x 6.693". Keystone swage standoff 0.250". Case edge ...

Technical Drawing - GitHub
Page 1. Page 2. 38.67 ). 22.30. 26.37. Page 3. Page 4. 2.05 。.25. 4.92. 0.75. 「. 4.50. 「 2.85. P。RT AND SW_T〔H. DETA_L. PPPPP. Page 5.

Boost.Generic: Concepts without Concepts - GitHub
You Tell Me ... auto operator -( L lhs, R rhs ) -> decltype( lhs + -rhs ) ... In these tables, T is an object or reference type to be supplied by a C++ program.

Concepts in Crypto - GitHub
to check your email. ○. Enigmail: Thunderbird addon that adds OpenPGP ... you its certificate, which includes its public key ... iOS, Android: ChatSecure ...

"Knowledge is that which ..." "Knowledge is that ... -
what the Messenger [. ىلص. ملس و هيلع الله. , may Allah exalt his mention and render him and his message safe from every derogatory thing ] came with".

C++ IS - GitHub
#ifndef __GameOfLife__Grid__. #define __GameOfLife__Grid__. #include "cocos2d.h". #include "Creature.h" class Grid : public cocos2d::Node. { public:.

What is NetBeans? - GitHub
A comprehensive, modular IDE. – Ready to use out of the box. – Support for latest Java specifications. & standards. – Other languages too. (PHP, C/C++, etc). – Intuitive workflow. – Debugger, Profiler,. Refactoring, etc. – Binaries & ZIPs

Ebnf2ps — Automatic Railroad Diagram Drawing - GitHub
Oct 3, 2014 - Find out where your TEX installation stores .afm-files (Adobe font met- ric files). Then set the environment variable AFMPATH when running the.

What is Hibernate Search? - GitHub
2015 - MARTIN BRAUN - APPLIED COMPUTER SCIENCE IV, UNIVERSITY OF BAYREUTH. 1. Introduction. Hibernate Search with Hibernate ORM: Database.

What is structured prediction? - GitHub
9. Hal Daumé III ([email protected]). State of the art accuracy in.... ➢ Part of speech tagging (1 million words). ➢ wc: ... iPython Notebook for Learning to Search.

What Is AWS Icebreaker? - GitHub
physical devices from smart phone apps. The following diagram illustrates a high-level view of the Icebreaker service: You can interact with Icebreaker in a ...

NOTE: PCB Revision for this board is Rev B6 - GitHub
Description. DATE. GC. 11/19/2012. Initial production Release. A4A. A5. On the initial production release the processors were to be found incorrect as supplied by TI. ... There is a small chance that on power up the nRESETOUT signal on the processor

note that the y component - GitHub
change in potential energy of the wire? Note that ΔU12 is a signed number. ΔU12 is positive if the potential energy in Position 2 is higher than the potential ...

lecture 10: advanced bayesian concepts - GitHub
some probability distribution function (PDF) of perfect data x, but what we measure is d, a noisy version of x, and noise is ... We can also try to marginalize over x analytically: convolve true PDF with noise PDF and do this for each ... We would li

istgame.sty Drawing Game Trees with Ti kZ - GitHub
grow=south west=\istgrowdirection, so the payoffs are put below left of the terminal node. You can ...... A special thanks goes to Kansoo Kim for his great help in using expl3 to simplify the appearance and the ... doc/latex/egameps/egameps.pdf.

It is here by informed that no Candidate is found eligible for the post of ...
Dec 11, 2012 - ANDHRA PRADESH PUBLIC SERVICE COMMISSION : HYDERABAD. PRESS NOTE. It is here by informed that no Candidate is found eligible ...

Ooo Is That Coffee.pdf
props. TOMMY, production assistant. HOPE, press agent. TOMMY: Okay ... All you have to do is carry this coffee over ... Here, let me massage your shoulders.

Battery Life, That Is dl
A description for this result is not available because of this site's robots.txtLearn more