My starting point is a covariance matrix (Not raw data) and I want to calculate the regression weights.  I may have as many as 6-8 independent variables and 1 dependent variable so looking for a matrix solution.  Been 20 years since I have done matrix algebra so any instructions for how to do this in Excel are appreciated.
For simple linear regression, the regression coefficient is calculable directly from the variance-covariance matrix $C$, by  $$ C_{d, e}\over C_{e,e} $$ where $d$ is the dependent variable's index, and $e$ is the explanatory variable's index.  If one only has the covariance matrix, is it possible to calculate the coefficients for a model with multiple explanatory variables?   ETA: For two explanatory variables, it appears that $$\beta_1 = \frac{Cov(y,x_1)var(x_2) - Cov(y,x_2)Cov(x_1,x_2)}{var(x_1)var(x_2) - Cov(x_1,x_2)^2} $$ and analogously for $\beta_2$. I'm not immediately seeing how to extend this to three or more variables.
Why split the  tag when writing it with document.write()? What are the rules for China's visa-free transit programs? Assuming one wants to travel through China, what are the rules for visa-free access? To be more specific:   How does the 24-hour visa free transit work? How does the 72-hour version work? What does a person ineligible for either of these programs have to do to transit China? Do the programs apply to flights only or do they also work for transit on land? Would a visitor save much hassle by using visa free transit instead of just getting a visa?      NB: this is intended as a canonical question on transiting China Why is the upper Riemann integral the infimum of all upper sums? I was reading the theory of Riemann integration when I cam across the following ,   If $f$ is bounded on $[a,b]$, and $P = \{x_0,x_1,x_2.......x_n\}$ is a partition of $[a,b]$, let $$M_j = \sup_{x_{j-1}\leq x\leq x_j}f(x)$$ The upper sum of f over P is $$S(P) = \sum_{j=1}^{n} M_j(x_j-x_{j-1})$$ and the upper integral of $f$ over $[a,b]$, denoted by $$\int_{a}^{b^-} f(x)dx$$ is the infimum of all upper sums.  The theorem similarly goes on to state the result for lower sums.  My doubt is : I do not understand how is $$\int_{a}^{b^-} f(x)dx$$ the infimum of all upper sums. I understand that if we refine the partition P, then the upper sum would decrease, so it may be a lower limit for all the upper sums computed on the refinements of P (but still being the lower limit does not prove that it is the infimum) and what about those partitions for which P itself is the refinement of?  How do I know that it will be a lower limit for those, let alone a infimum? I have a complicated integral to solve. I tried to split ($101 x$) and proceed but I am getting a pretty nasty answer while evaluating using parts. are there any simpler methods to evaluate this integral?  $$ \int\!\sin (101x)\cdot\sin^{99}(x)\, dx $$ For which real values of t does the following system of linear equations:  $$ \left\{  \begin{array}{c} tx_1 + x_2 + x_3 = 1 \\  x_1 + tx_2 + x_3 = 1 \\  x_1 + x_2 + tx_3 = 1 \end{array} \right.  $$  Have:  a) a unique solution?  b) infinitely many solutions?  c) no solutions?  I haven't done linear algebra in almost a year, so I'm really rusty and could use some pushes in the right direction. Picking a $\delta$ for a convenient $\varepsilon$? Number of sigma algebras for set with 4 elements How to prove: if $a,b \in \mathbb N$, then $a^{1/b}$ is an integer or an irrational number? It is well known that $\sqrt{2}$ is irrational, and by modifying the proof (replacing 'even' with 'divisible by $3$'), one can prove that $\sqrt{3}$ is irrational, as well.  On the other hand, clearly $\sqrt{n^2} = n$ for any positive integer $n$.  It seems that any positive integer has a square root that is either an integer or irrational number.        How do we prove that if $a \in  \mathbb N$, then $\sqrt a$ is an integer or an irrational number?      I also notice that I can modify the proof that $\sqrt{2}$ is irrational to prove that $\sqrt[3]{2}, \sqrt[4]{2}, \cdots$ are all irrational.  This suggests we can extend the previous result to other radicals.        Can we extend 1? That is, can we show that for any $a, b \in \mathbb{N}$, $a^{1/b}$ is either an integer or irrational? Find the probability that a geometric random variable $X$ is an even number Is it possible to do The Pitt without a slave outfit? Does app review rejection list all issues? Our app was rejected recently with reason Google+ signin, which we understood is not according to Apple policy and need to fix.  While discussing about this issue we came across an interesting question with Apple review process, does Apple review team list all issues (if more than one exists) while rejecting app (or) would they stop reviewing other areas as soon as they found an issue (in our case Google+ signin)? Series as an integral (sophomore's dream) I need help with this exercise.  I need to prove $$\int_{0}^{1}x^{-x}\ dx=\sum_{n=1}^{\infty}n^{-n}$$  I think I should use some convergence theorem, but I'm stuck.  Thanks a lot! Check if macro is fully expandable Question  Is there a way to check whether a macro is fully expandable (or rather "safe in an expansion-only context" )?    Consider this code:  \def\a{Just a string} \def\b{\a} \def\c{\def\unsafe} \def\d{\c}   How could I check which of the macros (a-d) are safe in an expansion-only context? By looking at them I know that a and b are whereas c and d are not but if I wanted to know the same for a macro I haven't written myself this could get quite useful.      Background  I am working on a way to detect whether some input is a valid number in PGF. For this I developed  which makes use of passing the input into \pgfmathfloatparsenumber. The problem I have run into is that said macro appears to somehow manages to expand the input until there is an error (if the input is in fact not safe in an expansion-only-context). I tried using protected, noexpand and similar but somehow PGF manages to circumvent those.    So the idea is to check whether the input is safe before actually passing it to PGF. The problem is: I don't know how I'd go about that... BAV99 forward voltage Make tools indestructible in Minecraft In Minecraft, is there any way to make tools indestructible (without using mods)? I want to make some tools indestructible (for an adventure map). Is it possible to do this using enchantments (or a command of some kind?) The functions of each pair are inverse to each other. For each pair, check that both compositions give the identity function.  $F: \mathbb{R} \to \mathbb{R}$ and $F^{−1}:\mathbb{R} \to \mathbb{R}$ are defined by $F(x)=3x+2$ and $F^{−1}(y)=\dfrac{y−2}{3}$. for all y ∈ R  My attempt:     Inverse Function  For each particular but arbitrarily chosen $y \in \mathbb{R}$, according to the definition of $f^{-1}$, $f^{-1}(y) = \dfrac{y-2}{3}$ is a unique real number $x$ such that $f(x) = y$. \begin{align*} F(x) &amp; = y\\ 3x + 2 &amp; = y\\ x &amp; = \frac{y-2}{3} \end{align*} Therefore, $f^{-1}(y) = \frac{y-2}{3}$.  Compositions of Functions  The functions $g \circ f$ and $f \circ g$ are defined as follows: $$(g \circ f)(x) = g(f(x)) = g(3x + 2) = 3x + 2$$  for all $x \in \mathbb{Z}$. What are the pros and cons of having a separate home partition? Assume that $f$ be continuous on $\mathbb{R}$, $f'(x)$ exists for all $x\neq 0$, and $\lim_{x\rightarrow 0} f'(x)=1$. We need to show $f'(0)$ exist and is equal to $1$.  $f'(0)=\lim_{x\rightarrow 0}\frac{f(x)-f(0)}{x}$, $\lim_{x\rightarrow 0}f'(x)=1\Rightarrow\lim_{x\rightarrow 0}\lim_{h\rightarrow 0}\frac{f(x+h)-f(x)}{h}=1$...am I going in the right direction? Please help. One thing I liked about Mint was that the terminal would usually show two colors: everything from the left to the $ would be one color, and everything past the $ would be another.   Is there a way to have this setup with Ubuntu? By looking at this picture:    The earth is near the center of the universe. I've read that the universe look the same no matter where the observer is located. It is the same distance everywhere.  So I understand that for general relativity the universe need to be homogeneous and isotropic, so it will look the same no matter where I am.  But what if I'm on one of the planets near the right or left of the image, then if I draw the same picture of the universe, but from my perspective, then I would be also located in the center? If that's not the case (I'm actually near an edge), then part of my sky would be completely dark, and all the sky that way won't be isotropic?