Suppose we have n jointly distributed random variables $x_i,i=1,...,n,$ with mean and variance $E(x_i)=\mu_i$, $Var(x_i)=\sigma^2_i$ and covariance $Cov(x_i,x_j)=\sigma_{ij}.$ Then the weighted sum of the n random variable has mean  $E\bigg(\displaystyle\sum_{i=1}^n\omega_ix_i\bigg)=\displaystyle\sum_{i=1}^n \omega_i\mu_i$  and variance  $Var\bigg(\displaystyle\sum_{i=1}^n\omega_ix_i\bigg)=\displaystyle\sum_{i=1}^n\displaystyle\sum_{i=1}^n\omega_i\omega_j\sigma_{ij}$  How to prove both these formulas?  Any member may show its correct proof along with examples.
I understand the proof that  $$Var(aX+bY) = a^2Var(X) +b^2Var(Y) + 2abCov(X,Y), $$  but I don't understand how to prove the generalization to arbitrary linear combinations.  Let $a_i$ be scalars for $i\in {1,\dots ,n}$ so we have a vector $\underline a$, and $\underline X = X_i,\dots ,X_n$ be a vector of correlated random variables. Then $$ Var(a_1X_1 + \dots a_nX_n) = \sum_{i=1}^n a_i^2 \sigma_i^2 + 2 \sum_{i=1}^n \sum_{j&gt;i}^n a_i a_j \text{ Cov}(X_i,X_j)$$  How do we prove this? I imagine there are proofs in the summation notation and in vector notation?
What could cause java.lang.reflect.InvocationTargetException? How do I make the Super key open the activities overview in Ubuntu 20.04 LTS? Reading text file with NSString:stringWithContentsOfFile? I am trying to retrieve list items using date range based on date column. It implicit both 'Fromdate' and 'Todate'.My CAML query is also querying on two other conditions as well. I am using the below query but it is not retrieving the data.when I remove the date range from query data is retrieved fine. But i want date range as well in my query how would i do this. Little help would work for me.   camlQuery.set_viewXml('&lt;View&gt;&lt;Query&gt;&lt;Where&gt;&lt;And&gt;&lt;And&gt;&lt;Neq&gt;&lt;FieldRef Name="ID" /&gt;&lt;Value Type="Number"&gt;0&lt;/Value&gt;&lt;/Neq&gt;&lt;Eq&gt;&lt;FieldRef Name="_ModerationStatus" /&gt;&lt;Value Type="ModStat"&gt;0&lt;/Value&gt;&lt;/Eq&gt;&lt;Geq&gt;&lt;FieldRef Name="Created" /&gt;&lt;Value Type="DateTime"&gt;' + fromDate + '&lt;/Value&gt;&lt;/Geq&gt;&lt;Leq&gt;&lt;FieldRef Name="Created" /&gt;&lt;Value Type="DateTime"&gt;' + toDate + '&lt;/Value&gt;&lt;/Leq&gt;&lt;/And&gt;&lt;/And&gt;&lt;/Where&gt;&lt;OrderBy&gt;&lt;FieldRef Name="_ModerationStatus" Ascending="True" /&gt;&lt;/OrderBy&gt;&lt;/Query&gt;&lt;/View&gt;'); Get the row and column name of the minimum element of a matrix How do I get and modify the source code of packages installed through apt-get? I am assuming that all application installed through apt-get are open source; but for those that are available in that manner, where can I get the source code for these applications as well as update them?   I have a couple applications I use regularly that aren't being actively developed any longer and I would like to add features. Where would I go to get the rights to update these applications?  In this case specifically, I am referring to the hellanzb package Is there any way in QGIS to apply service area buffers e.g if I have a point on a map I wish to show the service coverage of 1 mile, 2 mile, 3 mile, breaks using  the road network? If I click to open achievements from a question when I click the X to close the achievements view I end up on the answers tab of the question, I assume because the X is over the tab and it's tapping through.    It appears if I hit the X it's ok, but if I tap anywhere else in the top row (where the X is) then I can switch to the question or answer tab. Want to copy the file name quickly in Windows. I always use rename, copy , but feel it is quite slow. Any better way? Can I visit the USA as a VWP tourist immediately prior to entry on non-tourist visa? Here's my situation: I'm a UK citizen. I have an H-1B visa to work in the US as of 1 August. I also have a valid ESTA.  I would like to go to the US in July for a holiday, immediately prior to beginning my work. The holiday would be at the other end of the country from my work.  I can't enter with the H-1B as I can only enter the US on that visa 10 days prior to starting work.  Specific question: Would it be possible to visit the US in early July on the VWP, visit Canada/Mexico for a few days in late July, and re-enter the US with my H-1B visa?  General question: Is it possible to visit the US on the VWP, leave briefly, and re-enter on a different status (e.g. H, F, J, K, etc), without ever returning to one's home country?  I have posted this in Travel rather than Expatriates because, although in my specific case I have an H-1B visa, my question is more generally about VWP and travel, and I believe that it is applicable to travellers with non-immigrant visas.  There's a similar question , although that's about going to the US and before having the H-1B visa. I won a Samsung Galaxy S6 Edge, signed into it with my Google account, played around with it, wiped it, and sold it.  Now the person can't get past setup because it's saying he must login with an account previously synced to the phone.   Is there anything I can do from my side to remove this lock? $\chi(G)+\chi(G')\leq n+1$ How to prove, that the sum of chromatic numbers of graph and it's complement is smaller then the number of vertices incremented by one?  $\chi(G)+\chi(G')\leq n+1$  The notes from my classes say to color the first graph using sequential algorithm with vertices ordered by their degrees (the ones with lowest appear first). We would get $k_1$ colors, then we color the graph $G'$ in the backwards order and get $k_2$ colors, and the sum $k_1+k_2$ in my notes is magically smaller than $n+1$, but I just don't see why... I have one script to allow for one user to run. The string calling it from the command line looks like  ./script path/to/folder -a option='value'   When I try to add it to the other commands in Cmnd_Alias line, sudo blames sudoers file for incorrect syntax. How can I set such commands properly? Implementing support for nested transactions using JDBC 3.0 our legacy application uses JDBC 3.0. it supports transactions by implementing its own transaction manager that is capable of returning the same JDBC connection for each thread. The problem I recently discovered is that it doesn't support nested transactions: if a transaction is started inside an another transaction, then every SQLs running in the context of the inner transaction will be executed using the same db connection, and when it's commited or rolled back it will automatically commit or roll back all the changes starting from the outer transaction.  As far as I understand I can implement the support for nested transaction using JDBC 3.0 savepoints: whenever a nested transaction is started, I can set a new savepoint for the current connection. Afterward, if the nested transaction is rolled back, I will just rollback to this savepoint. If, on the other hand, it is commited, I will just do nothing. Only the commit of the most outer transaction will save the changes to the db.  Is this correct? Does this approach have any flaws? If yes, what are my possibilities?  Thanks. 2D and 3D vectors in Tikz I would like to draw some 2D and 3D vectors in Tikz with certain properties. The following primitive graph sums what I desire:   I just need the first quadrant of the Cartesian coordinate system for my representation.  I need the vector to be connected to the respective values on the distinct dimensions(not a projection, just orthogonal dashed lines).   The code segment below does what I want to achieve in 3D with two exceptions:  The projections on the xy plane and z dimension are given instead of connecting the head of the vector to the corresponding value in each dimension.  Numerical values are missing in dimensions.   Code: \documentclass[tikz]{standalone} \usepackage{tikz-3dplot} \begin{document}  \tdplotsetmaincoords{60}{120} \begin{tikzpicture}     [scale=3,     tdplot_main_coords,     axis/.style={-&gt;,blue,thick},     vector/.style={-stealth,red,very thick},     vector guide/.style={dashed,red,thick}]  %standard tikz coordinate definition using x, y, z coords \coordinate (O) at (0,0,0);  %tikz-3dplot coordinate definition using r, theta, phi coords \tdplotsetcoord{P}{.8}{55}{60}  %draw axes \draw[axis] (0,0,0) -- (1,0,0) node[anchor=north east]{$x$};     \draw[axis] (0,0,0) -- (0,1,0) node[anchor=north west]{$y$};     \draw[axis] (0,0,0) -- (0,0,1) node[anchor=south]{$z$};  %draw a vector from O to P \draw[vector] (O) -- (P);  %draw guide lines to components \draw[vector guide] (O) -- (Pxy); \draw[vector guide] (Pxy) -- (P); \end{tikzpicture} \end{document} How to figure if it is safe to travel to the area I am interested in? When planning a trip, I like to make sure I will feel safe enough (I am talking about war/terrorism risk, not pickpockets), or at least I like to have an idea about the risks. I know the risk could be subject to political views (for example the political stability of a region might not be acknowledged by every country) and therefore I am mostly interested in a Western country view.  In order to figure that, I thought about checking travel operators offers. I suppose if they do not organise trips to a specific region, it might be due to political instability risks. But it might be due to a lack of tourist interest too. As I tend to travel without their help, I am not really considering this kind of source as very helpful.  So I am interested in one (or two, for cross-checking) source(s) of information with a western view (I mean I understand the view could be biased) regarding the security of ideally any area in the world. My expectation is that, the same way I can browse a tour operator's catalog of visited areas, I could browse through the areas and see if it is recommended or not to travel there. List comprehension with expensive computation Where can I find a standalone installer for Windows 7 Service Pack 1? Texture mapping with multiple UV maps So, as a newbie relatively new to blender, I started doing some texture mapping (blender internal Render). I created a texture for the main object and a couple of transparent decals to decorate it. (basic effects made in GIMP). Simple stuff, just to know how it works.  After unwrapping, having 2 UV maps made, creating both new material and textures, enabling UV mapping coordination I always end up with:  - all - 1 faces of the cube being covered nicely in the main texture  - 1 face covered in blank material with a decal in the middle of it  - the whole thing partly coated by a huge "stain" of a decal  So, the problem is that I can't layer textures correctly. Is there a way to have one texture covering everything and more transparent ones on top of it? I am working on a bigger project right now and having this ability would be useful 14.04 - Network manager stopped working When I started my laptop, there was no network service, and also no network icon in the top bar. It gives an error when I start OS like "Sorry, Ubuntu 14.04 experienced an internal error". When I click details, it says the error is occurred in the executable path usr/sbin/NetworkManager. Also, when I try to enter Network in the System Settings, it says "the system network services are not compatible with this version"  How can I solve this shocking issue?  p.s. I didn't install any third party packages/apps related with networking. Only system updates are installed.