Sample Mean Vector and Sample Covariance Matrix

Total Page:16

File Type:pdf, Size:1020Kb

Sample Mean Vector and Sample Covariance Matrix STA135 Lecture 2: Sample Mean Vector and Sample Covariance Matrix Xiaodong Li UC Davis 1 Sample mean and sample covariance Recall that in 1-dimensional case, in a sample x1; : : : ; xn, we can define n 1 X x¯ = x n i i=1 as the (unbiased) sample mean n 1 X s2 := (x − x¯)2 n − 1 i i=1 p-dimensional case: Suppose we have p variates X1;:::;Xp. For the vector of variates 2 3 X1 ~ 6 . 7 X = 4 . 5 ; Xp we have a p-variate sample with size n: p ~x1; : : : ; ~xn 2 R : This sample of n observations give the following data matrix: 2 3 2 >3 x11 x12 : : : x1p ~x1 > 6x21 x22 : : : x2p7 6~x2 7 X = 6 7 = 6 7 : (1.1) 6 . .. 7 6 . 7 4 . 5 4 . 5 > xn1 xn2 : : : xnp ~xn Notice that here each column in the data matrix corresponds to a particular variate Xj. Sample mean: For each variate Xj, define the sample mean: n 1 X x¯ = x ; j = 1; : : : ; p: j n ij i=1 Then the sample mean vector 2 n 3 1 P 2 3 n xi1 2 3 x¯1 6 i=1 7 n xi1 n 6 7 1 X 1 X ~x := 6 . 7 = 6 . 7 = 6 . 7 = ~x : 4 . 5 6 . 7 n 4 . 5 n i 6 n 7 i=1 i=1 x¯p 4 1 P 5 xip n xip i=1 1 Sample covariance matrix: For each variate Xj, j = 1; : : : ; p, define its sample variance as n 1 X s = s2 := (x − x¯ )2; j = 1; : : : ; p jj j n − 1 ij j i=1 and sample covariance between Xj and Xk n 1 X s = s := (x − x¯ )(x − x¯ ); 1 ≤ k; j ≤ p; j 6= k: jk kj n − 1 ij j ik k i=1 The sample covariance matrix is defined as 2 3 s11 s12 : : : s1p 6s21 s22 : : : s2p7 S = 6 7 ; 6 . .. 7 4 . 5 sp1 sp2 : : : spp Then 2 1 Pn 2 1 Pn 3 n−1 i=1(xi1 − x¯1) ::: n−1 i=1(xi1 − x¯1)(xip − x¯p) 6 . .. 7 S = 4 . 5 1 Pn 1 Pn 2 n−1 i=1(xip − x¯p)(xi1 − x¯1) ::: n−1 i=1(xip − x¯p) 2 2 3 n (xi1 − x¯1) ::: (xi1 − x¯1)(xip − x¯p) 1 X . = 6 . .. 7 n − 1 4 . 5 i=1 2 (xip − x¯p)(xi1 − x¯1) ::: (xip − x¯p) 2 3 n xi1 − x¯1 1 X = 6 . 7 x − x¯ : : : x − x¯ n − 1 4 . 5 i1 1 ip p i=1 xip − x¯p n 1 X > = ~x − ~x ~x − ~x : n − 1 i i i=1 2 Linear transformation of observations 2 3 X1 ~ 6 . 7 Consider a sample of X = 4 . 5 with size n: Xp ~x1; : : : ; ~xn: The corresponding data matrix is represented as 2 3 2 >3 x11 x12 : : : x1p ~x1 > 6x21 x22 : : : x2p7 6~x2 7 X = 6 7 = 6 7 : 6 . .. 7 6 . 7 4 . 5 4 . 5 > xn1 xn2 : : : xnp ~xn q×p q For some C 2 R and d~ 2 R , consider the linear transformation 2 3 Y1 ~ 6 . 7 ~ ~ Y = 4 . 5 = CX + d: Yq 2 Then we get a q-variate sample: ~yi = C~xi + d;~ i = 1; : : : ; n; The sample mean of ~y1; : : : ; ~yn is n n n 1 X 1 X 1 X ~y = ~y = (C~x + d~) = C( ~x ) + d~ = C~x + d:~ n i n i n i i=1 i=1 i=1 And the sample covariance is n 1 X > S = ~y − ~y ~y − ~y y n − 1 i i i=1 n 1 X > = C~x − C~x C~x − C~x n − 1 i i i=1 n 1 X > = C ~x − ~x ~x − ~x C> n − 1 i i i=1 n ! 1 X > = C ~x − ~x ~x − ~x C> n − 1 i i i=1 > = CSxC : 3 Block structure of the sample covariance 2 3 2 3 2 3 X1 X1 Xq+1 6X27 6X27 6Xq+27 For the vector of variables X~ = 6 7, we can divide it into two parts: X~ (1) = 6 7 and X~ (2) = 6 7. 6 . 7 6 . 7 6 . 7 4 . 5 4 . 5 4 . 5 Xp Xq Xp In other words, 2 3 2 3 X1 xi1 6 X2 7 6 xi2 7 6 7 6 7 6 . 7 6 . 7 6 . 7 6 . 7 6 7 " ~ (1) # 6 7 " (1) # ~ 6 Xq 7 X 6 xiq 7 ~xi X = 6 7 = (2) ; in correspondence ~xi = 6 7 = (2) 6 Xq+1 7 X~ 6 xi(q+1) 7 ~x 6 7 6 7 i 6 X 7 6 x 7 6 q+2 7 6 i(q+2) 7 6 . 7 6 . 7 4 . 5 4 . 5 Xp xip where 2 3 2 3 xi1 xi(q+1) 6xi27 6xi(q+2)7 ~x(1) = 6 7 ; ~x(2) = 6 7 i 6 . 7 i 6 . 7 4 . 5 4 . 5 xiq xip 3 We have the partition of the sample mean and the sample covariance matrix as follows: 2 3 x¯1 2 3 6 x¯2 7 s11 : : : s1q s1;q+1 : : : s1;p 6 7 6 . 7 6 . .. .. 7 6 . 7 6 . 7 6 7 ¯(1) 6 7 ¯ 6 x¯q 7 ~x 6 sq1 : : : sqq sq;q+1 : : : sq;p 7 S11 S12 ~x = 6 7 = (2) ; S = 6 7 = : 6 x¯q+1 7 ~x¯ 6 sq+1;1 : : : sq+1;q sq+1;q+1 : : : sq+1;p 7 S21 S22 6 7 6 7 6 x¯q+2 7 6 . .. .. 7 6 7 4 . 5 6 . 7 4 . 5 sp1 : : : spq sp;q+1 : : : sp;p x¯p (1) (2) By definition, S11 is the sample covariance of X~ and S22 is the sample covariance of X~ . Here S12 is referred to as the sample cross covariance matrix between X~ (1) and X~ (2). In fact, we can derive the following formula: n 1 X (2) (1) > S = S> = ~x − ~x¯(2) ~x − ~x¯(1) 21 12 n − 1 i i i=1 4 Standardization and Sample Correlation Matrix For the data matrix (1.1). The sample mean vector is denoted as ~x and the sample covariance is denoted p as S. In particular, for j = 1; : : : ; p, letx ¯j be the sample mean of the j-th variable and sjj be the sample standard deviation. For any entry xij for i = 1; : : : ; n and j = 1; : : : ; p, we get the standardized entry xij − x¯j zij = p : sjj Then the data matrix X is standardized to 2 3 2 >3 z11 z12 : : : z1p ~z1 > 6z21 z22 : : : z2p7 6~z2 7 Z = 6 7 = 6 7 : 6 . .. 7 6 . 7 4 . 5 4 . 5 > zn1 zn2 : : : znp ~zn Denote by R the sample covariance for the sample z1;:::; zn. What is the connection between R and S? The i-th row of Z can be written as 2 3 2 p 3 2 p1 3 2 3 zi1 (xi1 − x¯1)= s11 s11 xi1 − x¯1 p p1 6zi27 6(xi2 − x¯2)= s227 6 s 7 6xi2 − x¯27 6 7 = 6 7 = 6 22 7 6 7 6 . 7 6 . 7 6 .. 7 6 . 7 4 . 5 4 . 5 6 . 7 4 . 5 p 4 1 5 zip (xip − x¯p)= spp p xip − x¯p spp Let 2 p1 3 s11 6 p1 7 − 1 6 s22 7 V 2 = 6 . 7 : 6 .. 7 4 5 p1 spp This transformation can be represented as − 1 − 1 − 1 ~zi = V 2 (~xi − ~x) = V 2 ~xi − V 2 ~x; i = 1; : : : ; n: 4 This implies that the sample mean for the new data matrix is − 1 ~z¯ = V 2 (~x¯ − ~x¯) = ~0; By the formula for the sample covariance of linear combinations of variates, the sample covariance matrix for the new data matrix Z is > − 1 − 1 R = V 2 S V 2 2 p1 3 2 3 2 p1 3 s11 s11 s12 : : : s1p s11 p1 p1 6 s 7 6s21 s22 : : : s2p7 6 s 7 = 6 22 7 6 7 6 22 7 6 .. 7 6 . .. 7 6 .. 7 6 . 7 4 . 5 6 . 7 4 1 5 4 1 5 p sp1 sp2 : : : spp p spp spp s 2 1 p s12 ::: p 1p 3 2 3 s11s22 s11spp r11 r12 : : : r1p s p s21 2p 6 1 ::: p 7 6r21 r22 : : : r2p7 6 s22s11 s22spp 7 6 7 = 6 . 7 := . 6 . 7 6 . .. 7 4 . 5 4 5 sp1 sp2 p p ::: 1 rp1 rp2 : : : rpp spps11 spps22 The matrix R is called the sample correlation matrix for the original data matrix X. 5 Mahalanobis distance and mean-centered ellipse Sample covariance is p.s.d. Recall that the sample covariance is n 1 X S = (~x − ~x¯)(~x − ~x¯)>: n − 1 i i i=1 Is S always positive semidefinite? Consider the spectral decomposition p X > S = λj~uj~uj : j=1 Then S~uj = λj~uj, which implies that > > > ~uj S~uj = ~uj (λj~uj) = λj~uj ~uj = λj: On the other hand n ! 1 X ~u>S~u = ~u> (~x − ~x¯)(~x − ~x¯)> ~u j j n − 1 j i i j i=1 n 1 X = ~u>(~x − ~x¯)(~x − ~x¯)>~u n − 1 j i i j i=1 n 1 X = j~u>(~x − ~x¯)j2 ≥ 0: n − 1 j i i=1 This implies that all eigenvalues of S are nonnegative, so S is positive semidefinite.
Recommended publications
  • LECTURES 2 - 3 : Stochastic Processes, Autocorrelation Function
    LECTURES 2 - 3 : Stochastic Processes, Autocorrelation function. Stationarity. Important points of Lecture 1: A time series fXtg is a series of observations taken sequentially over time: xt is an observation recorded at a specific time t. Characteristics of times series data: observations are dependent, become available at equally spaced time points and are time-ordered. This is a discrete time series. The purposes of time series analysis are to model and to predict or forecast future values of a series based on the history of that series. 2.2 Some descriptive techniques. (Based on [BD] x1.3 and x1.4) ......................................................................................... Take a step backwards: how do we describe a r.v. or a random vector? ² for a r.v. X: 2 d.f. FX (x) := P (X · x), mean ¹ = EX and variance σ = V ar(X). ² for a r.vector (X1;X2): joint d.f. FX1;X2 (x1; x2) := P (X1 · x1;X2 · x2), marginal d.f.FX1 (x1) := P (X1 · x1) ´ FX1;X2 (x1; 1) 2 2 mean vector (¹1; ¹2) = (EX1; EX2), variances σ1 = V ar(X1); σ2 = V ar(X2), and covariance Cov(X1;X2) = E(X1 ¡ ¹1)(X2 ¡ ¹2) ´ E(X1X2) ¡ ¹1¹2. Often we use correlation = normalized covariance: Cor(X1;X2) = Cov(X1;X2)=fσ1σ2g ......................................................................................... To describe a process X1;X2;::: we define (i) Def. Distribution function: (fi-di) d.f. Ft1:::tn (x1; : : : ; xn) = P (Xt1 · x1;:::;Xtn · xn); i.e. this is the joint d.f. for the vector (Xt1 ;:::;Xtn ). (ii) First- and Second-order moments. ² Mean: ¹X (t) = EXt 2 2 2 2 ² Variance: σX (t) = E(Xt ¡ ¹X (t)) ´ EXt ¡ ¹X (t) 1 ² Autocovariance function: γX (t; s) = Cov(Xt;Xs) = E[(Xt ¡ ¹X (t))(Xs ¡ ¹X (s))] ´ E(XtXs) ¡ ¹X (t)¹X (s) (Note: this is an infinite matrix).
    [Show full text]
  • Ph 21.5: Covariance and Principal Component Analysis (PCA)
    Ph 21.5: Covariance and Principal Component Analysis (PCA) -v20150527- Introduction Suppose we make a measurement for which each data sample consists of two measured quantities. A simple example would be temperature (T ) and pressure (P ) taken at time (t) at constant volume(V ). The data set is Ti;Pi ti N , which represents a set of N measurements. We wish to make sense of the data and determine thef dependencej g of, say, P on T . Suppose P and T were for some reason independent of each other; then the two variables would be uncorrelated. (Of course we are well aware that P and V are correlated and we know the ideal gas law: PV = nRT ). How might we infer the correlation from the data? The tools for quantifying correlations between random variables is the covariance. For two real-valued random variables (X; Y ), the covariance is defined as (under certain rather non-restrictive assumptions): Cov(X; Y ) σ2 (X X )(Y Y ) ≡ XY ≡ h − h i − h i i where ::: denotes the expectation (average) value of the quantity in brackets. For the case of P and T , we haveh i Cov(P; T ) = (P P )(T T ) h − h i − h i i = P T P T h × i − h i × h i N−1 ! N−1 ! N−1 ! 1 X 1 X 1 X = PiTi Pi Ti N − N N i=0 i=0 i=0 The extension of this to real-valued random vectors (X;~ Y~ ) is straighforward: D E Cov(X;~ Y~ ) σ2 (X~ < X~ >)(Y~ < Y~ >)T ≡ X~ Y~ ≡ − − This is a matrix, resulting from the product of a one vector and the transpose of another vector, where X~ T denotes the transpose of X~ .
    [Show full text]
  • 6 Probability Density Functions (Pdfs)
    CSC 411 / CSC D11 / CSC C11 Probability Density Functions (PDFs) 6 Probability Density Functions (PDFs) In many cases, we wish to handle data that can be represented as a real-valued random variable, T or a real-valued vector x =[x1,x2,...,xn] . Most of the intuitions from discrete variables transfer directly to the continuous case, although there are some subtleties. We describe the probabilities of a real-valued scalar variable x with a Probability Density Function (PDF), written p(x). Any real-valued function p(x) that satisfies: p(x) 0 for all x (1) ∞ ≥ p(x)dx = 1 (2) Z−∞ is a valid PDF. I will use the convention of upper-case P for discrete probabilities, and lower-case p for PDFs. With the PDF we can specify the probability that the random variable x falls within a given range: x1 P (x0 x x1)= p(x)dx (3) ≤ ≤ Zx0 This can be visualized by plotting the curve p(x). Then, to determine the probability that x falls within a range, we compute the area under the curve for that range. The PDF can be thought of as the infinite limit of a discrete distribution, i.e., a discrete dis- tribution with an infinite number of possible outcomes. Specifically, suppose we create a discrete distribution with N possible outcomes, each corresponding to a range on the real number line. Then, suppose we increase N towards infinity, so that each outcome shrinks to a single real num- ber; a PDF is defined as the limiting case of this discrete distribution.
    [Show full text]
  • Spatial Autocorrelation: Covariance and Semivariance Semivariance
    Spatial Autocorrelation: Covariance and Semivariancence Lily Housese ­P eters GEOG 593 November 10, 2009 Quantitative Terrain Descriptorsrs Covariance and Semivariogram areare numericc methods used to describe the character of the terrain (ex. Terrain roughness, irregularity) Terrain character has important implications for: 1. the type of sampling strategy chosen 2. estimating DTM accuracy (after sampling and reconstruction) Spatial Autocorrelationon The First Law of Geography ““ Everything is related to everything else, but near things are moo re related than distant things.” (Waldo Tobler) The value of a variable at one point in space is related to the value of that same variable in a nearby location Ex. Moranan ’s I, Gearyary ’s C, LISA Positive Spatial Autocorrelation (Neighbors are similar) Negative Spatial Autocorrelation (Neighbors are dissimilar) R(d) = correlation coefficient of all the points with horizontal interval (d) Covariance The degree of similarity between pairs of surface points The value of similarity is an indicator of the complexity of the terrain surface Smaller the similarity = more complex the terrain surface V = Variance calculated from all N points Cov (d) = Covariance of all points with horizontal interval d Z i = Height of point i M = average height of all points Z i+d = elevation of the point with an interval of d from i Semivariancee Expresses the degree of relationship between points on a surface Equal to half the variance of the differences between all possible points spaced a constant distance apart
    [Show full text]
  • Fast Estimation of the Median Covariation Matrix with Application to Online Robust Principal Components Analysis
    Fast Estimation of the Median Covariation Matrix with Application to Online Robust Principal Components Analysis Hervé Cardot, Antoine Godichon-Baggioni Institut de Mathématiques de Bourgogne, Université de Bourgogne Franche-Comté, 9, rue Alain Savary, 21078 Dijon, France July 12, 2016 Abstract The geometric median covariation matrix is a robust multivariate indicator of dis- persion which can be extended without any difficulty to functional data. We define estimators, based on recursive algorithms, that can be simply updated at each new observation and are able to deal rapidly with large samples of high dimensional data without being obliged to store all the data in memory. Asymptotic convergence prop- erties of the recursive algorithms are studied under weak conditions. The computation of the principal components can also be performed online and this approach can be useful for online outlier detection. A simulation study clearly shows that this robust indicator is a competitive alternative to minimum covariance determinant when the dimension of the data is small and robust principal components analysis based on projection pursuit and spherical projections for high dimension data. An illustration on a large sample and high dimensional dataset consisting of individual TV audiences measured at a minute scale over a period of 24 hours confirms the interest of consider- ing the robust principal components analysis based on the median covariation matrix. All studied algorithms are available in the R package Gmedian on CRAN. Keywords. Averaging, Functional data, Geometric median, Online algorithms, Online principal components, Recursive robust estimation, Stochastic gradient, Weiszfeld’s algo- arXiv:1504.02852v5 [math.ST] 9 Jul 2016 rithm.
    [Show full text]
  • Characteristics and Statistics of Digital Remote Sensing Imagery (1)
    Characteristics and statistics of digital remote sensing imagery (1) Digital Images: 1 Digital Image • With raster data structure, each image is treated as an array of values of the pixels. • Image data is organized as rows and columns (or lines and pixels) start from the upper left corner of the image. • Each pixel (picture element) is treated as a separate unite. Statistics of Digital Images Help: • Look at the frequency of occurrence of individual brightness values in the image displayed • View individual pixel brightness values at specific locations or within a geographic area; • Compute univariate descriptive statistics to determine if there are unusual anomalies in the image data; and • Compute multivariate statistics to determine the amount of between-band correlation (e.g., to identify redundancy). 2 Statistics of Digital Images It is necessary to calculate fundamental univariate and multivariate statistics of the multispectral remote sensor data. This involves identification and calculation of – maximum and minimum value –the range, mean, standard deviation – between-band variance-covariance matrix – correlation matrix, and – frequencies of brightness values The results of the above can be used to produce histograms. Such statistics provide information necessary for processing and analyzing remote sensing data. A “population” is an infinite or finite set of elements. A “sample” is a subset of the elements taken from a population used to make inferences about certain characteristics of the population. (e.g., training signatures) 3 Large samples drawn randomly from natural populations usually produce a symmetrical frequency distribution. Most values are clustered around the central value, and the frequency of occurrence declines away from this central point.
    [Show full text]
  • Covariance of Cross-Correlations: Towards Efficient Measures for Large-Scale Structure
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by RERO DOC Digital Library Mon. Not. R. Astron. Soc. 400, 851–865 (2009) doi:10.1111/j.1365-2966.2009.15490.x Covariance of cross-correlations: towards efficient measures for large-scale structure Robert E. Smith Institute for Theoretical Physics, University of Zurich, Zurich CH 8037, Switzerland Accepted 2009 August 4. Received 2009 July 17; in original form 2009 June 13 ABSTRACT We study the covariance of the cross-power spectrum of different tracers for the large-scale structure. We develop the counts-in-cells framework for the multitracer approach, and use this to derive expressions for the full non-Gaussian covariance matrix. We show that for the usual autopower statistic, besides the off-diagonal covariance generated through gravitational mode- coupling, the discreteness of the tracers and their associated sampling distribution can generate strong off-diagonal covariance, and that this becomes the dominant source of covariance as spatial frequencies become larger than the fundamental mode of the survey volume. On comparison with the derived expressions for the cross-power covariance, we show that the off-diagonal terms can be suppressed, if one cross-correlates a high tracer-density sample with a low one. Taking the effective estimator efficiency to be proportional to the signal-to-noise ratio (S/N), we show that, to probe clustering as a function of physical properties of the sample, i.e. cluster mass or galaxy luminosity, the cross-power approach can outperform the autopower one by factors of a few.
    [Show full text]
  • On the Use of the Autocorrelation and Covariance Methods for Feedforward Control of Transverse Angle and Position Jitter in Linear Particle Beam Accelerators*
    '^C 7 ON THE USE OF THE AUTOCORRELATION AND COVARIANCE METHODS FOR FEEDFORWARD CONTROL OF TRANSVERSE ANGLE AND POSITION JITTER IN LINEAR PARTICLE BEAM ACCELERATORS* Dean S. Ban- Advanced Photon Source, Argonne National Laboratory, 9700 S. Cass Ave., Argonne, IL 60439 ABSTRACT It is desired to design a predictive feedforward transverse jitter control system to control both angle and position jitter m pulsed linear accelerators. Such a system will increase the accuracy and bandwidth of correction over that of currently available feedback correction systems. Intrapulse correction is performed. An offline process actually "learns" the properties of the jitter, and uses these properties to apply correction to the beam. The correction weights calculated offline are downloaded to a real-time analog correction system between macropulses. Jitter data were taken at the Los Alamos National Laboratory (LANL) Ground Test Accelerator (GTA) telescope experiment at Argonne National Laboratory (ANL). The experiment consisted of the LANL telescope connected to the ANL ZGS proton source and linac. A simulation of the correction system using this data was shown to decrease the average rms jitter by a factor of two over that of a comparable standard feedback correction system. The system also improved the correction bandwidth. INTRODUCTION Figure 1 shows the standard setup for a feedforward transverse jitter control system. Note that one pickup #1 and two kickers are needed to correct beam position jitter, while two pickup #l's and one kicker are needed to correct beam trajectory-angle jitter. pickup #1 kicker pickup #2 Beam Fast loop Slow loop Processor Figure 1. Feedforward Transverse Jitter Control System It is assumed that the beam is fast enough to beat the correction signal (through the fast loop) to the kicker.
    [Show full text]
  • Lecture 4 Multivariate Normal Distribution and Multivariate CLT
    Lecture 4 Multivariate normal distribution and multivariate CLT. T We start with several simple observations. If X = (x1; : : : ; xk) is a k 1 random vector then its expectation is × T EX = (Ex1; : : : ; Exk) and its covariance matrix is Cov(X) = E(X EX)(X EX)T : − − Notice that a covariance matrix is always symmetric Cov(X)T = Cov(X) and nonnegative definite, i.e. for any k 1 vector a, × a T Cov(X)a = Ea T (X EX)(X EX)T a T = E a T (X EX) 2 0: − − j − j � We will often use that for any vector X its squared length can be written as X 2 = XT X: If we multiply a random k 1 vector X by a n k matrix A then the covariancej j of Y = AX is a n n matrix × × × Cov(Y ) = EA(X EX)(X EX)T AT = ACov(X)AT : − − T Multivariate normal distribution. Let us consider a k 1 vector g = (g1; : : : ; gk) of i.i.d. standard normal random variables. The covariance of g is,× obviously, a k k identity × matrix, Cov(g) = I: Given a n k matrix A, the covariance of Ag is a n n matrix × × � := Cov(Ag) = AIAT = AAT : Definition. The distribution of a vector Ag is called a (multivariate) normal distribution with covariance � and is denoted N(0; �): One can also shift this disrtibution, the distribution of Ag + a is called a normal distri­ bution with mean a and covariance � and is denoted N(a; �): There is one potential problem 23 with the above definition - we assume that the distribution depends only on covariance ma­ trix � and does not depend on the construction, i.e.
    [Show full text]
  • The Variance Ellipse
    The Variance Ellipse ✧ 1 / 28 The Variance Ellipse For bivariate data, like velocity, the variabililty can be spread out in not one but two dimensions. In this case, the variance is now a matrix, and the spread of the data is characterized by an ellipse. This variance ellipse eccentricity indicates the extent to which the variability is anisotropic or directional, and the orientation tells the direction in which the variability is concentrated. ✧ 2 / 28 Variance Ellipse Example Variance ellipses are a very useful way to analyze velocity data. This example compares velocities observed by a mooring array in Fram Strait with velocities in two numerical models. From Hattermann et al. (2016), “Eddy­driven recirculation of Atlantic Water in Fram Strait”, Geophysical Research Letters. Variance ellipses can be powerfully combined with lowpassing and bandpassing to reveal the geometric structure of variability in different frequency bands. ✧ 3 / 28 Understanding Ellipses This section will focus on understanding the properties of the variance ellipse. To do this, it is not really possible to avoid matrix algebra. Therefore we will first review some relevant mathematical background. ✧ 4 / 28 Review: Rotations T The most important action on a vector z ≡ [u v] is a ninety-degree rotation. This is carried out through the matrix multiplication 0 −1 0 −1 u −v z = = . [ 1 0 ] [ 1 0 ] [ v ] [ u ] Note the mathematically positive direction is counterclockwise. A general rotation is carried out by the rotation matrix cos θ − sin θ J(θ) ≡ [ sin θ cos θ ] cos θ − sin θ u u cos θ − v sin θ J(θ) z = = .
    [Show full text]
  • Lecture 2 Covariance Is the Statistical Measure That Indicates The
    Lecture 2 Covariance is the statistical measure that indicates the interactive risk of a security relative to others in a portfolio of securities. In other words, the way security returns vary with each other affects the overall risk of the portfolio. The covariance between two securities X and Y may be calculated using the following formula: Where: Covxy = Covariance between x and y. Rx = Return of security x. Ry = Return of security y Rx = Expected or mean return of security x. Ry = Expected or mean return of security y. N = Number of observations. Calculation of Covariance Year Rx Deviation R…3 Deviation Product of deviations Rx – Rx y Ry – Ry (Rx – Rx) (Ry – Ry) 1 10 -4 17 5 -20 2 12 -2 13 1 -2 3 16 2 10 -2 -4 4 18 4 8 -4 -16 = -42 / 4 = -10.5 The covariance is a measure of how returns of two securities move together. If the returns of the two securities move in the same direction consistently the covariance would be positive. If the returns of the two securities move in opposite direction consistently the covariance would be negative. If the movements of returns are independent of each other, covariance would be close to zero. Covariance is an absolute measure of interactive risk between two securities. To facilitate comparison, covariance can be standardized. Dividing the covariance between two securities by product of the standard deviation of each security gives such a standardised measure. This measure is called the coefficient of correlation. This may be expressed as: Where Rxy = Coefficient of correlation between x and y Covxy = Covariance between x and y.
    [Show full text]
  • Week 7: Multiple Regression
    Week 7: Multiple Regression Brandon Stewart1 Princeton October 24, 26, 2016 1These slides are heavily influenced by Matt Blackwell, Adam Glynn, Jens Hainmueller and Danny Hidalgo. Stewart (Princeton) Week 7: Multiple Regression October 24, 26, 2016 1 / 145 Where We've Been and Where We're Going... Last Week I regression with two variables I omitted variables, multicollinearity, interactions This Week I Monday: F matrix form of linear regression I Wednesday: F hypothesis tests Next Week I break! I then ::: regression in social science Long Run I probability ! inference ! regression Questions? Stewart (Princeton) Week 7: Multiple Regression October 24, 26, 2016 2 / 145 1 Matrix Algebra Refresher 2 OLS in matrix form 3 OLS inference in matrix form 4 Inference via the Bootstrap 5 Some Technical Details 6 Fun With Weights 7 Appendix 8 Testing Hypotheses about Individual Coefficients 9 Testing Linear Hypotheses: A Simple Case 10 Testing Joint Significance 11 Testing Linear Hypotheses: The General Case 12 Fun With(out) Weights Stewart (Princeton) Week 7: Multiple Regression October 24, 26, 2016 3 / 145 Why Matrices and Vectors? Here's one way to write the full multiple regression model: yi = β0 + xi1β1 + xi2β2 + ··· + xiK βK + ui Notation is going to get needlessly messy as we add variables Matrices are clean, but they are like a foreign language You need to build intuitions over a long period of time (and they will return in Soc504) Reminder of Parameter Interpretation: β1 is the effect of a one-unit change in xi1 conditional on all other xik . We are going to review the key points quite quickly just to refresh the basics.
    [Show full text]