Basics and matrices
24 important questions on Basics and matrices
What are some shortcuts for calculating the covariance?
- 〈X,Y 〉= 〈Y,X〉
- 〈X, constant 〉= 0
- 〈X,X〉= Var(X)
- 〈bX,Y 〉= b〈X,Y 〉
- 〈X,Y + Z〉= 〈X,Y 〉+ 〈X,Z〉
What are some conventions about the characteristiccs of matrices?
- variables denoting matrices are bold upper case
- we say A is a “two by four matrix” (i.e., rows first)
- number of rows and number of columns are the dimensions
- the element of A in row i and column j is denoted aij
- we often write A = (Aij)
What is the transpose of a matrix?
- The transpose of A swaps rows and columns
- A(T) = Aij(T) = Aji
- use the hand rule.
- Higher grades + faster learning
- Never study anything twice
- 100% sure, 100% understanding
How can you add or subtract two matrices?
- Matrices can be added or subtracted if they have the same shape.
- if they have similar dimensions, you can use the transpose of one of the matrices to still make the calculation.
- Then make the calculation pairwise,
- A + B = C -> A11 + B11 = C11, A12 + B12 = C12, enz
How can two matrices be multiplied?
- Two matrices can be multiplied only if A has the same amount of columns as B has rows.
- C then becomes the sum of the components of a row in a, multiplied by the elements of a column in B.
- so; C11 = A11*B11 + A12*B21 + A13*B31
- to keep things in check;
- A(pxq) * B(qxr) = C(pxr)
How can you code matrix multiplication in R?
B = matrix(c(1,-1,2,0,0,3), 2, 3)
C = matrix(c(2,3,-1,-1,3,-2),3, 2)
B %*% C
Don't forget the percentage symbols
What is important to realize about matrix multiplication?
- Matrix multiplication is not commutable
- B*C != C*B
What is an identity matrix?
- A square matrix I which has all 0's except for the diagonal, which has all 1's
- multiplying by an identity matrix always returns the original matrix.
- diag(3) gives an identity matrix of 3x3
What important role does the identity matrix play in magtrix algebra?
- The identity matrix is the equivalent of 1 in matrix algebra.
- The inverse of number a is the number x for which xa = ax = 1. Obviously x = a^−1 = 1/a.
- Analogously, the inverse of a square matrix A is the matrix X for which XA = AX = I. We denote X = A^−1.
- An inverse of a matrix is only possible for square matrices
How can you use matrix algebra to find a common point of two equations?
- Make both linear equations in the shape ax + by = c.
- then you can make the matrix A * matrix (x over y) = matrix C
- We know that A * A^-1 = I and I times any matrix is that matrix
- So multiplying both sides by A^-1 results in matrix x over y = C*A^-1
What is a requirement for using matrix calculation to determine whether two lines to have a common point?
How can you determine whether the inverse of the matrix of the constants of x and y exists?
- The determinant of a square matrix can tell us this
- Measures the volume of the parallelogram formed by its columns
- If det(A) != 0 then A^−1 exists.
- det() gives the determinant
How can you obtain the general variance of a set of dependent variables?
What is the approach of statistical modelling?
Fit a model to sample data, and calculate how well that model fits the data.
Determine whether the sample model generalizes well to the population from which the sample model was built
What is the t value?
- It is a standardized test statistic that represents the distance between the data and the null hypothesis.
- t = (x - mu0)/se
What is a type one and type 2 error?
- Type 1; the null hypothesis is true, but incorrectly rejected
- chance of happening is alpha
- type 2; the null hypothesis is incorrect but incorrectly not rejected.
- chance of happening is beta
- the power is correctly rejecting the null hypothesis
What is the importance of the effect size?
- You can obtain a p-value of less than your alpha more easily if your sample size is large enough.
- finding a p value like that implies statistical significance.
- but if your effect size is very small, there isn't any scientific significance. The effect you've found is irrelevant
How can you find the inverse of a matrix in R?
- The formula to know; A * A^-1 = I
- to find the inverse you need to know what to multiply A with to get an identity matrix.
- create identity matrix I with the same dimensions as A, and use solve(A,I) to find A^-1
When is a matrix symmetric?
- In linear algebra, a symmetric matrix is a square matrix that is equal to its transpose.
- the two halves, split by the diagonal, are the same when folded onto each other.
What does the solve() function do?
- With matrix algebra you can have the equation; A * X = B
- if you provide matrices A and B to the solve function it will return matrix X.
What is the trace of the matrix?
to compute the trace sum these values, but only if it's a square matrix.
use sum(diag(matrix))
What is the primary goal of applied multivariate statistics in most scientific research?
- learn something about populations, often those that are too large to measure each member
- make an educated guess at population parameters based on statistics computed in a sample
Which are always key tasks in applying multivariate statistics?
1. Fit a model to sample data and calculate how well that model fits
2. Determine whether the fitted model generalizes to the intended population
What are properties of the eigen vectors and eigen values of the pc's?
- the eigenvalues of S are equal to the variances of the components
- the eigenvectors of S are orthogonalthe components maximize the variance subject to the orthogonality constraints
- the covariances between linear combinations formed with two different eigenvectors are always zero
The question on the page originate from the summary of the following study material:
- A unique study and practice tool
- Never study anything twice again
- Get the grades you hope for
- 100% sure, 100% understanding