-3
votes
0answers
23 views

Math issue implementing an invoice API [on hold]

Okay, so, I have $2$ separate systems: An invoice record database on an external site, I do not have access to the code here. An prestashop e-commerce installation, where i am developing a plugin. ...
2
votes
0answers
42 views

Jacobian for a matrix transformation: Example of Cholesky decomposition

I would like to generally understand how the Jacobian of a matrix transformation can be computed. As a concrete example, consider the Transformation from a (correlation) matrix to its Cholesky ...
0
votes
1answer
36 views

If $A \succeq B$ is it true that $B^{-1} \succeq A^{-1}$

If $A$ and $B$ are two positive definite matrices such that $A - B$ is nonnegative definite, is it true that $B^{-1} - A^{-1}$ is positive definite? The doubt came to me when working with confidence ...
1
vote
1answer
31 views

Projection equation

I'm a programmer, not a math expert or statistician by any means, but my organization wants a page in our admin console that displays a projection of how many registrations we can expect to see based ...
3
votes
0answers
33 views

Bayesian linear regression cost function

I am studying classification using linear regression . Now, I want to map it in Bayesian regression. Let talk about binary classification using linear regression again. Assume that I have a set ...
0
votes
1answer
52 views

Fast way to inverse B'CB+D

$\mathbf {A = B'CB}$, where $\mathbf A$ is of dimension $n \times n$, $\mathbf C$ is m by m, positive definite and symmetric, $\mathbf B$ is of dimension $m \times n$, and $n >> m$. Inversion ...
3
votes
1answer
24 views

Does affine equivariance implies shape unbiasedness?

Basically, I'm dealing with an algorithm that, given an $n\times p$ data matrix $\pmb X$ with iid rows, returns $\hat{\pmb\sigma}(\pmb X)\in\mathbb{R}^{p\times p}$. To simplify things, I will also ...
0
votes
1answer
13 views

Understanding details of PCA - variance

I am currently reading through Principal Component Analysis, Second Edition and came to small paragraph that I do not fully understand on page 5 (Section 1.1): "To derive the form of the PCs, ...
1
vote
0answers
32 views

Strong duality in trace maximization

I'm working on understanding the derivation of the solution for principal components analysis. Let $\mathbf{S} \in \mathbb{R}^{p \times p}$ be a positive semi-definite matrix with rank $d < p$. ...
3
votes
2answers
136 views

Relationship between the singular value decomposition (SVD) and the principal component analysis (PCA). A radical result(?)

I was wondering if I could get a mathematical description of the relationship between the singular value decomposition (SVD) and the principal component analysis (PCA). To be more specific I have ...
2
votes
2answers
68 views

Constructing a function similar to x^3 between [0,1]

I'm trying to construct a function $f$, in order to normalize a dataset(obviously where all the element come from $[0,1] \in \mathbb{R}$. The big picture is that the envisioned $f: [0,1] \rightarrow ...
2
votes
1answer
37 views

What is the distribution of $x^TAx$ when $x$ is gaussian ($A$ may be not symmetric)

Suppose that $A \in \Re^{d \times d}$, $x \in \Re^d$ and each component of $x$ is independently sampled from $N(0,1)$. I wonder what is the distribution of $x^TAx$. To be more concrete, how will the ...
0
votes
0answers
28 views

determinant and trace of a huge positive definite matrix

I have a problem to compute the determinant and the trace of inverse matrix: $det(\Gamma^{-1}+I_n⊗\Phi^T\Phi)$ and $tr[(\Gamma^{-1}+I_n⊗\Phi^T\Phi)^{-1}]$ where $\Gamma$ is a huge positive definite ...
0
votes
1answer
6 views

Attempting to determine intent of $(X^{\text{T}} X)^{-1} (X^{\text{T}} Y)$, possibly related to multiple regression

I've inherited a code base that is pretty much undocumented. Some of this code is grouped in a module named "Regression". This particular function is named "getCoefMatrix". For a 2D matrix $X$ (with ...
0
votes
0answers
15 views

Some little tasks concerning least squares estimators

Consider the linear model $$ y=\theta_1\eta_n+\theta_2x+U $$ with $$ \eta_n=(1,\ldots,1)^T,~~~x=(x_1,\ldots,x_n)^T,~~~y=(y_1,\ldots,y_n)^T. $$ (1) Show that the point ...
1
vote
0answers
38 views

Confusion on Covariance matrix equation?

I have read from wikipedia that the equation of Covariance matrix is as follows: But while reading the steps of PCA in various links and MATLAB codes etc, I encountered the covariance matrix again, ...
0
votes
0answers
44 views

Help larry water his tomato plants with math

I have a bit of a real world problem that I believe Math can help me solve. I think it might be easiest to phrase in a manor similar to that of high school textbook. Larry has a device that can ...
0
votes
3answers
47 views

Linear combination of independent random variables that are poisson distributed

Suppose $X_1$ and $X_2$ are independent random variables $X_1$~ Poisson$(\lambda_1)$ and $X_2$~ Poisson$(\lambda_2)$ I want to show $X_1 + X_2$~poisson$(\lambda_1 + \lambda_2)$ I want to then ...
1
vote
1answer
32 views

Calculating R-squared with duplicate data

I have the following question regarding the proper usage of R-squared value. Say I have an equation, that predicts energy consumption for the month of a building. One of the input variables accounts ...
2
votes
0answers
31 views

Number of elements and number of different basis of $\mathbb F_5^3$

Let $\mathbb F:=\mathbb F_5$ the field with five elements. (i) How many elements has $\mathbb F^3$? (ii) How many different basis has $\mathbb F^3$? My idea: (i) $\mathbb F^3$ has $5^3$ elements. ...
2
votes
1answer
51 views

Incremental Calculation of the Sample Covariance

The formula to calculate the sample covariance given $n$ vector samples $x_{i}$ for $i = 1, \ldots, n$ is as follows: \begin{align*} S &= \frac{1}{n-1}\sum\limits_{i=1}^{n}(x_{i} - m)(x_{i} - ...
0
votes
0answers
19 views
0
votes
0answers
16 views

Singular Value Decomposition of Rectangular Matrices

Say that $X$ is an $M\times L$ real matrix, and let $X=U\Sigma V^T$ be its singular value decomposition. Thus, $U$ is $M\times M$, $V$ is $L\times L$, and $\Sigma$ is $M\times L$. Now let $n=\min(L, ...
0
votes
1answer
27 views

Show that the entries of a matrix are:

For a regression model $y=\beta x$ (note there is no intercept term), show that entries of the matrix $\bf{H} = \bf{X}[\bf{X'}\bf{X}]^{-1}\bf{X'}$ are $h_{ij} = ...
0
votes
0answers
24 views

Covariance matrix with constant diagonal

Is there a term for covariance matrices with constant diagonal (variance of every entry being equal)?
1
vote
1answer
22 views

Solving for a ridge penalty given a fitted model

This is kind of embarrassing; I once knew this stuff, and I've forgotten it. I've got a fitted ridge regression: $$ \hat\beta = \left(X'X+\lambda\right)^{-1}X'y $$ X is n by k y is n by 1 ...
0
votes
1answer
28 views

Expanding variance

Could someone please expand on line 2 and 3 of: Thank you.
0
votes
1answer
37 views

Calculate Linear regression segment

I have array of random numbers. How can I calculate linear regression segment? I am interested in finding the exact formula so I be able to use it in my work, please help me finding this formula with ...
3
votes
2answers
96 views

Algorithm to find best in class of groups with weighting?

I have widgets and a single widget will have attributes of: Name Weight (decimal from 0-1) Group (letter A-F) Price (an integer from 1 - 100) I must pick one ...
2
votes
2answers
77 views

what's the relationship of $A*A^T$ and $A^T*A$

For a $m \times n$ matrix $A$, what's the relationship of $A*A^T$ and $A^T*A$? The background of this question is that if we see the row of $A$ as observations and column as variables, $A*A^T$ is the ...
2
votes
0answers
31 views

Smallest set of Liner equations, which exactly fit a set of points

I have a set of 2-d points,(it can be of any arbitrary dimension n). I want to find the minimum set of straight lines(linear equations) which exactly passes through the given 2-d points (unlike ...
1
vote
0answers
13 views

Any way to simplify this expression?

So I have a vector of asset allocation weights given by $x \in R^4$ and a covariance matrix of the asset returns $\Sigma \in R^{4,4}$. I know by the spectral theorem, $\Sigma = V DV^{-1}$ and the ...
0
votes
0answers
9 views

Predict values of some numerical vectors by using other numerical vectors with all these vectors in the same vector set

I need to solve a problem about predicting values of some numerical vectors by using other numerical vectors with all these vectors in the same vector set, which is generated by one or more black box ...
0
votes
1answer
277 views

PCA using SVD in Matlab, a few questions.

I have X = [25, 2000] i.e. 25 subjects and 2000 values (i.e. each subject has a spectrogram that is reduced to 2000 values). My goal is to reduce from 25 subjects to 1 or 2 "subjects" that best ...
1
vote
0answers
36 views

Linear Regression Question (Linear Algebra) Help!!

Hey guys, I have a quick question. I am trying to prove that the squared sample correlation between fitted and observed values is equal to $R^2$ (coefficient of determination). I am having a lot of ...
1
vote
1answer
51 views

Inverse of a triangular matrix in a statistical problem

Can any one give to me idea how to solve this problem? Find the inverse of the triangular matrix T, where $ T =\left[ \begin{array}{ccc} I & J & J \\ 0 & I & J \\ 0 & 0 & I ...
2
votes
2answers
84 views

connection between PCA and linear regression

Is there a formal link between linear regression and PCA? The goal of PCA is to decompose a matrix into a linear combination of variables that contain most of the information in the matrix. Suppose ...
0
votes
1answer
59 views

How can solve this integral

How ı can solve this integral, ı thınk that ı can seperate as above ı did but I dıd not do it, thanks for helping..
1
vote
1answer
37 views

An equation related to covariance matrix, square root of the matrix, and Euclidean norm.

How can I prove this equation: $${ ({ x }^{ T }\Sigma x) }^{ 1/2 }={ \left\| { \Sigma }^{ 1/2 }x \right\| }_{ 2 }$$ In which $\Sigma $ is a covariance matrix. I tried some numerical examples in ...
0
votes
1answer
41 views

Differentiability of linear least squares

Show that least-squares $\|y-X\beta\|^2$ is twice differentiable and has minimizer. I understand that the second derivative is $X'X$. Also it is a composition of linear function which is ...
2
votes
2answers
100 views

Avoid dividing by zero with just variables and basic operators

I am working on stats for a sports team, and one of the stats I have the ratio of Shots and Shots on Target (Which I call ...
2
votes
1answer
42 views

Solving an system of equations for the system

I'm trying to find a $n \times n$ matrix $A$, that satisfies $V_x = A V_y$, where $V_x$ and $V_y$ are both $n \times 1$ vectors of known quantities. For what its worth, the sum of $V_x$ and the sum ...
1
vote
0answers
45 views

What type of formula am I looking for?

Let say you have a list of items with 3 columns, two are statistical the third is just a name. The statistical categories you have are Points, and Salary. You have 10 different options. Each Row ...
1
vote
0answers
45 views

How does SVD work?

Trying to find information, and, no-one seems to know the answers. I have a time-series, represented by $T = [0, 1, 1, 0, \ldots, n]$ the time series is then transformed into the Spectral results: ...
2
votes
1answer
40 views

Algebraically expanding this function

I have an algebra question. I am currently working on this function: $$\left(\frac{{e^{t\sqrt{3/n}}} -{e^{-t\sqrt{3/n}}}}{2t\sqrt{3/n}}\right)^n$$ Now this is the MGF of a function called $Z$ and I ...
0
votes
0answers
82 views

Minimizing the Kullber-Leibler divergence between two multivariate normal distributions

Take two zero-mean multivariate normal distributions: $p=\mathcal{N}(\mathbf{0},\boldsymbol\Sigma)$ and $q=\mathcal{N}\left(\mathbf{0},\left(\mathbf{A}^{T} \boldsymbol\Omega ...
1
vote
1answer
24 views

Distribution of multivariate Gaussian conditional on value of linear function

Given a Gaussian random vector $X \in \mathbf{R}^p \sim \mathcal{N}(\boldsymbol\mu, \boldsymbol\Sigma)$, a matrix $\mathbf{K} \in \mathbf{R}^{q \times p}$, and a vector $y \in \mathbf{R}^q$, I'd like ...
0
votes
0answers
26 views

Diagonalization of a covariance matrix

Consider $m=(m_i)$ a n-dimensional vector such that $m_i$ are i.i.d. standard Gaussian variables $N(0,1)$. Consider a T-dimensional vector $u=(u_t)$. We define $X_{i,t}=S(m_iu_t)$ where $S(.)$ is an ...
0
votes
0answers
24 views

MSE of weighted PCA estimator

I need to calculate the variance of this estimator which is a generalisation of the OLS estimator: OLS: $Y=X\beta+e$ where Y is n*1 vector of responses X is n*p pbserved matrix of regressor ...
1
vote
0answers
29 views

book related query

I have been solving a lot of problems in algebra, calculus, probability and statistics. But have never encountered problems that consist of every mathematical field mentioned above (at max two ...