北大暑期課程回歸分析LinearRegressionAnalysis講義1_第1頁
北大暑期課程回歸分析LinearRegressionAnalysis講義1_第2頁
北大暑期課程回歸分析LinearRegressionAnalysis講義1_第3頁
北大暑期課程回歸分析LinearRegressionAnalysis講義1_第4頁
北大暑期課程回歸分析LinearRegressionAnalysis講義1_第5頁
已閱讀5頁,還剩4頁未讀 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、Class 1: Expectations, variances, and basics of estimationBasics of matrix (1) I. Organizational Matters(1) Course requirements:1) Exercises: There will be seven (7) exercises, the last of which is optional. Each exercise will be graded on a scale of 0-10. In addition to the graded exercise, an answ

2、er handout will be given to you in lab sections. 2) Examination: There will be one in-class, open-book examination. (2) Computer software: StataII. Teaching Strategies(1) Emphasis on conceptual understanding. Yes, we will deal with mathematical formulas, actually a lot of mathematical formulas. But,

3、 I do not want you to memorize them. What I hope you will do, is to understand the logic behind the mathematical formulas. (2) Emphasis on hands-on research experience.Yes, we will use computers for most of our work. But I do not want you to become a computer programmer. Many people think they know

4、statistics once they know how to run a statistical package. This is wrong. Doing statistics is more than running computer programs. What I will emphasize is to use computer programs to your advantage in research settings. Computer programs are like automobiles. The best automobile is useless unless

5、someone drives it. You will be the driver of statistical computer programs. (3) Emphasis on student-instructor communication.I happen to believe in students' judgment about their own education. Even though I will be ultimately responsible if the class should not go well, I hope that you will fee

6、l part of the class and contribute to the quality of the course. If you have questions, do not hesitate to ask in class. If you have suggestions, please come forward with them. The class is as much yours as mine. Now let us get to the real business.III(1). Expectation and VarianceRandom Variable: A

7、random variable is a variable whose numerical value is determined by the outcome of a random trial.Two properties: random and variable.A random variable assigns numeric values to uncertain outcomes. In a common language, "give a number". For example, income can be a random variable. There

8、are many ways to do it. You can use the actual dollar amounts. In this case, you have a continuous random variable. Or you can use levels of income, such as high, median, and low. In this case, you have an ordinal random variable 1=high, 2=median, 3=low. Or if you are interested in the issue of pove

9、rty, you can have a dichotomous variable: 1=in poverty, 0=not in poverty.In sum, the mapping of numeric values to outcomes of events in this way is the essence of a random variable.Probability Distribution: The probability distribution for a discrete random variable X associates with each of the dis

10、tinct outcomes xi (i = 1, 2,., k) a probability P(X = xi).Cumulative Probability Distribution: The cumulative probability distribution for a discrete random variable X provides the cumulative probabilities P(X £ x) for all values x.Expected Value of Random Variable: The expected value of a disc

11、rete random variable X is denoted by EX and defined:EX = P(xi)where: P(xi) denotes P(X = xi). The notation E (read “expectation of”) is called the expectation operator.In common language, expectation is the mean. But the difference is that expectation is a concept for the entire population that you

12、never observe. It is the result of the infinite number of repetitions. For example, if you toss a coin, the proportion of tails should be .5 in the limit. Or the expectation is .5. Most of the times you do not get the exact .5, but a number close to it. Conditional ExpectationIt is the mean of a var

13、iable conditional on the value of another random variable. Note the notation: E(Y|X).In 1996, per-capita average wages in three Chinese cities were (in RMB):Shanghai:3,778Wuhan:1,709Xian: 1,155Variance of Random Variable: The variance of a discrete random variable X is denoted by VX and defined:VX =

14、 (xi - EX)2 P(xi)where: P(xi) denotes P(X = xi). The notation V (read “variance of”) is called the variance operator.Since the variance of a random variable X is a weighted average of the squared deviations, (X - EX)2 , it may be defined equivalently as an expected value: VX = E(X - EX)2. An algebra

15、ically identical expression is: VX = EX2 - (EX)2.Standard Deviation of Random Variable: The positive square root of the variance of X is called the standard deviation of X and is denoted by sX: s X =The notation s (read “standard deviation of”) is called the standard deviation operator.Standardized

16、Random Variables: If X is a random variable with expected value EX and standard deviation sX, then:Y=is known as the standardized form of random variable X. Covariance: The covariance of two discrete random variables X and Y is denoted by CovX,Y and defined:CovX, Y = where: P(xi, yj) denotes )The no

17、tation of Cov , (read “covariance of”) is called the covariance operator.When X and Y are independent, Cov X, Y = 0.Cov X, Y = E(X - EX)(Y - EY); Cov X, Y = EXY - EXEY(Variance is a special case of covariance.)Coefficient of Correlation: The coefficient of correlation of two random variables X and Y

18、 is denoted by rX,Y (Greek rho) and defined:where: sX is the standard deviation of X; sY is the standard deviation of Y; Cov is the covariance of X and Y.Sum and Difference of Two Random Variables: If X and Y are two random variables, then the expected value and the variance of X + Y are as follows:

19、Expected Value: EX+Y = EX + EY; Variance: VX+Y = VX + VY+ 2 Cov (X,Y).If X and Y are two random variables, then the expected value and the variance of X - Y are as follows:Expected Value: EX - Y = EX - EY; Variance: VX - Y = VX + VY - 2 Cov (X,Y).Sum of More Than Two Independent Random Variables: If

20、 T = X1 + X2 + . + Xs is the sum of s independent random variables, then the expected value and the variance of T are as follows:Expected Value: ; Variance: III(2). Properties of Expectations and Covariances:(1) Properties of Expectations under Simple Algebraic Operations This says that a linear tra

21、nsformation is retained after taking an expectation. is called rescaling: is the location parameter, is the scale parameter. Special cases are: For a constant: For a different scale: , e.g., transforming the scale of dollars into the scale of cents.(2) Properties of Variances under Simple Algebraic

22、OperationsThis says two things: (1) Adding a constant to a variable does not change the variance of the variable; reason: the definition of variance controls for the mean of the variable graphics. (2) Multiplying a constant to a variable changes the variance of the variable by a factor of the consta

23、nt squared; this is to easy prove, and I will leave it to you. This is the reason why we often use standard deviation instead of variance is of the same scale as x. (3) Properties of Covariance under Simple Algebraic OperationsCov(a + bX, c + dY) = bd Cov(X,Y). Again, only scale matters, location do

24、es not. (4) Properties of Correlation under Simple Algebraic OperationsI will leave this as part of your first exercise: That is, neither scale nor location affects correlation. IV: Basics of matrix.1. DefinitionsA. MatricesToday, I would like to introduce the basics of matrix algebra. A matrix is a

25、 rectangular array of elements arranged in rows and columns:Index: row index, column index. Dimension: number of rows x number of columns (n x m)Elements: are denoted in small letters with subscripts. An example is the spreadsheet that records the grades for your home work in the following way: Name

26、1st2nd.6thA710.9B6 5.8.Z8 9.8This is a matrix. Notation: I will use Capital Letters for Matrices.B. VectorsVectors are special cases of matrices: If the dimension of a matrix is n x 1, it is a column vector:If the dimension is 1 x m, it is a row vector:y' = | . |Notation: small underlined letter

27、s for column vectors (in lecture notes)C. TransposeThe transpose of a matrix is another matrix with positions of rows and columns being exchanged symmetrically.For example: if It is easy to see that a row vector and a column vector are transposes of each other. 2. Matrix Addition and SubtractionAddi

28、tions and subtraction of two matrices are possible only when the matrices have the same dimension. In this case, addition or subtraction of matrices forms another matrix whose elements consist of the sum, or difference, of the corresponding elements of the two matrices. Examples: 3. Matrix Multiplic

29、ation A. Multiplication of a scalar and a matrixMultiplying a scalar to a matrix is equivalent to multiplying the scalar to each of the elements of the matrix.B. Multiplication of a Matrix by a Matrix (Inner Product)The inner product of matrix X(a x b) and matrix Y(c x d) exists if b is equal to c.

30、The inner product is a new matrix with the dimension (a x d). The element of the new matrix Z is:c k=1Note that XY and YX are very different. Very often, only one of the inner products (XY and YX) exists. Example: BA does not exist. AB has the dimension 2x1Other examples:If , , what is the dimension

31、 of AB? (3x3)If , , what is the dimension of BA? (5x5)If , , what is the dimension of AB? (1x1, scalar)If , , what is the dimension of BA? (nonexistent)4. Special MatricesA. Square MatrixB. Symmetric MatrixA special case of square matrix. For , . All i, j.A' = AC. Diagonal MatrixA special case of symmetric m

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論