Take two i.i.d. Gaussian R.V.s $X$ are $Y$ both of which are $~N(0,a\sigma)$.  Define a new R.V. $D = \sqrt{X^2 + Y^2}$.  What's the expected value $E(D)$?  In researching this I'm seeing references to chi-squared distributions and chi distributions (of different degrees of freedom?), but I haven't learned about those yet. Do they apply here? What are their means and how does the original mean/variance carry through?
Let $X$ and $Y$ be independent $N(0; 1)$ random variables. Let $Z = \sqrt{X^2+Y^2}$.  (a) Derive the marginal pdf of $Z$ and then using the marginal pdf to compute ${\rm E}[Z^2]$  (b) Can you propose a different way other than that in (a) to compute ${\rm E}[Z^2]$  (c) Compute ${\rm E}[Z]$.  This is the whole question that I was asked. I can do (c) but I don't know how to find the marginal pdf of $Z$ with the given information and can't seem to find any formulas. Any help would be appreciated.
I've been getting this undefined symbol building with this command line:  $ gcc test.cpp Undefined symbols:   "___gxx_personality_v0", referenced from:   etc...   test.cpp is simple and should build fine.  What is the deal? How can I manage computers using my Firefox Sync account? I`m using Firefox Sync on a bunch of computers.   I would like to manage my account, by removing some computers. I can't find the place to do this, it should be on the Firefox Sync page, but the official page only has the privacy and download information. Solve $x^2+5x+6 \equiv 0 \pmod{\!11\cdot 17}$ Solve $x^2+5x+6 \equiv 187 \mod 187$ Solution $$x^2+5x+6 \equiv 187 \mod 187$$ $$ (x+\frac{5}{2})^2 \equiv \frac{1}{4}$$ $$ 4(x+\frac{5}{2})^2 \equiv 1$$ $$ y:= x+\frac{5}{2} $$ $$ 4y^2 \equiv 1 \mod 11 \wedge 4y^2 \equiv 1 \mod 17  $$ $$ ( 2y \equiv 1 \mod 11 \vee 2y \equiv 10 \mod 11 ) \wedge ( 2y \equiv 1 \mod 17  \vee 2y \equiv 13 \mod 17)  $$ $$ ( y \equiv 6 \mod 11 \vee y \equiv 5 \mod 11 ) \wedge ( y \equiv 9 \mod 17  \vee y \equiv 15 \mod 17)  $$ Combining that from CRT I got: $$ y \in \left\{49, 60,83,94 \right\} $$ and for example: $$ x+\frac{5}{2}  \equiv 94 \mod 187$$ $$ 2x  \equiv 183 \mod 187$$ some calculus and get... $$x \equiv 185 $$ And the same thing for each other case. Question Is there any faster (or smarter) way to solve equations like that? Map not loading when using getLegend and showing error for getView() I was able to run my application on using Legend earlier but now I want to update my Legend when scrolling on the map. So I tried to used this code  . And I got the gist of how he is able to do that but when I am trying the same I keeping getting the error var graphicUrl = wmsSource.getLegendUrl(currentResolution);  I think this is mainly due to the wmsSource not declare. But I tried to initialize  seems wmsSource in TileWMS but does not seems to work. var getExtent = function () {     return map.getView().calculateExtent(); } var getProjectionCode = function () {     return map.getView().getProjection().getCode(); }  var updateLegend = function() {     var currentResolution = map.getView().getResolution();     var graphicUrl = wmsSource.getLegendUrl(currentResolution);        const crs = `&amp;CRS=${getProjectionCode()}`;     const bbox = `&amp;BBOX=${getExtent().join(',')}`;     const height = getHeight(getExtent());     const width = getWidth(getExtent());     const heightAndWidth = `&amp;srcwidth=${height}&amp;srcheight=${width}` ;     const legenOptions = &quot;&amp;legend_options=countMatched:true;fontAntiAliasing:true;hideEmptyRules:true;forceLabels:on&quot; ;        var img = document.getElementById('legend');     img.src = `${graphicUrl}${crs}${bbox}${heightAndWidth}${legenOptions}`; }; //Updated Legend End   //View var myview = new ol.View({     center : [8717490.201868,2788422.791843],     zoom : 4 })  var firstSel = document.getElementById(&quot;City&quot;); var secSel = document.getElementById(&quot;Sector&quot;);  //var LayerArray = [baseLayer, firstLayer]  //Map var map = new ol.Map({       target : 'mymap',       view: myview,       layers: [         new ol.layer.Tile({             source : new ol.source.OSM({                 attributions: 'Surveyor Allpication'             })         }),         new ol.layer.Tile({             source : new ol.source.TileWMS({                url: 'http://localhost:8089/geoserver/India/wms',                params: {'LAYERS': 'India:India', 'TILED': true,'TRANSPARENT':true},                ratio: 1,                serverType: 'geoserver',                transition: 0,             })         })       ] }) updateLegend();   This here is my JS &lt;div class=&quot;innerMap&quot;&gt;     &lt;div class=&quot;map&quot; id=&quot;mymap&quot;&gt;&lt;/div&gt;         Legend:     &lt;div&gt;&lt;img id=&quot;legend&quot;/&gt;&lt;/div&gt;     &lt;!--    &lt;div&gt;&lt;img src=&quot;http://localhost:8089/geoserver/wms?REQUEST=GetLegendGraphic&amp;VERSION=1.0.0&amp;FORMAT=image/png&amp;WIDTH=20&amp;HEIGHT=20&amp;LAYER=India%3AIndia&amp;RULE=Agra&quot; /&gt;%Name&lt;/div&gt; --&gt; &lt;!--    &lt;div&gt;&lt;img src=&quot;http://localhost:8089/geoserver/India/wms?SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetLegendGraphic&amp;FORMAT=image/png&amp;WIDTH=20&amp;HEIGHT=20&amp;LAYER=India%3AIndia&amp;SRS=EPSG%3A4326&amp;STYLES=&amp;SRCWIDTH=742&amp;SRCHEIGHT=768&amp;BBOX=75.4541015625%2C14.21630859375%2C91.7578125%2C31.09130859375&amp;LEGEND_OPTIONS=countMatched:true;fontAntiAliasing:true;hideEmptyRules:true&quot; /&gt; &lt;/div&gt;  --&gt;     &lt;/div&gt;  This is my HTML. How do I make this work? How to execute a program or call a system command from Python How do you call an external command (as if I'd typed it at the Unix shell or Windows command prompt) from within a Python script? How to update Wine to the latest version? Number of Homomorphisms from $\Bbb{Z}_m$ to $\Bbb{Z}_n$ This question coutesy of Allan Clark's "Elements of Abstract Algebra" (60$\zeta$).   Find the number of homomorphisms from $\Bbb{Z}_m\to \Bbb{Z}_n$ as a function of $m$ and $n$.  This is stumping me, can anyone help? replacement wood threshold insert for metal door I have some late 70's doors and one is missing a threshold insert (the adjustable wood kind), anybody know of where one could by just the "wood strip" that goes in and screws down (there is a metal piece that sticks up into the wood, though you can't see it)?    They have about 4 screws that go down into them? Total MU Calculation when Outer CF is linked to Inner CF What happens to the Y MU from the outer field when 2 fields are connected AFTER both fields are made. What would be the total MU gained in the checkpoint in the third step? My USB drive used to be originally 8GB when I bought it.  I'm trying to reformatted in Windows 7 by right clicking on the drive and selecting Format.... But the capacity only shows 250MB.  Is there something I can do to get the original size back? Maybe it got partitioned in a weird way?   The  flash drive is a SanDisk Cruzer Micro 8GB. I got it from Wal-Mart but this is the same drive. Is using only HTTPS bad in a SEO perspective? I would like to set up a new business site. I plan to direct www.example.com to example.com and only use that domain. My plan is also to only use HTTPS and not HTTP.   Does this affect the SEO for the site? E.g. do Google put lower or higher rank for sites that is only available via HTTPS? How can infinite information be theoretically encoded or stored in a single qubit? I've just gotten started with Nielsen and Chuang's text, and I'm a little stuck. They mention that theoretically, it would be possible to store an infinite amount of information in the state of a single qubit. I'm not sure I completely comprehend this.    Here's how I rationalized it: You take all the information you want to store, put it in binary form, and make it the real component of $\alpha $ or $\beta$ (the coefficients of the computational basis states).   Now I'm not sure if I've understood it right, but since it's still fuzzy in my head it would be great to get some kind of ELI5 explanation or possibly a more detailed picture of how this would, even theoretically, be possible.    Apologies if the question doesn't meet standards. I'm new to the forum and would be open to feedback regarding asking questions or answering them. Getting JavaScript object key list Every Window in Windows 8 got this icon if it gots the focus. When clicking on it, nothing seems to happen.   How does this icon work? Finding total after percentage has been used? Tried my best with the title. Ok, earlier while I was on break from work (I have low level math, and want to be more fond of mathematics)  I work retail, and 20% of taxes are taken out, and I am wanting to find out how much I made before 20% is taken out.  So I did some scribbling, and this is without googling so please be gentle. but lets say I make 2000 dollars per paycheck, so to see how much money I get after taxes I do 2000 * .8 which gives me 1600. I can also do 2000 * .2 which gives me 400 and then do 2000 - 400 (imo I don't like this way since I have a extra unnecessary step)  Anyways, I was pondering how to reverse that to have the answer be 2000, and what I did was 1600 * 1.20 (120%) which gave me 1920, and I thought that is odd so I did 1600 * 1.25 and answer was 2000 exact.  My question is why did I have to add extra 5% (25%) to get my answer? I am sure I did something wrong, and I fairly confident the formula I am using is a big no no.  edit; wow thank you all for your detailed answers. I am starting to like mathematics more and more. Capitalize and punctuate "let us continue this discussion in chat" Stack Exchange has a feature to help move extended discussions out of comments and into chat, but when you use it, it automatically writes the following message for you:  let us   Could we get the orthography fixed?  I'd like it to read:  Let us .  That's a capital letter at the beginning and a period at the end. How to stop a script from running if it's not root (and echo "Not running as root! Exiting...") Here's my source:  #!/bin/bash  echo "Running script to free general cached memory!" echo ""; echo "Script must be run as root!"; echo ""; echo "Clearing swap!"; swapoff -a &amp;&amp; swapon -a; echo ""; echo "Clear inodes and page file!"; echo 1 &gt; /proc/sys/vm/drop_caches; echo "";   It clears caches and stuff, and it echoes that it needs to be run as root in the terminal. I basically just want the script to cease running if it detects it's not being executed as root.   Example:  "Running script to free general cached memory!" "Warning: script must be run as root or with elevated privileges!" "Error: script not running as root or with sudo! Exiting..."   If run with elevated privileges, it just runs as normal. Any ideas? Thanks! Setting Objects to Null/Nothing after use in .NET Should you set all the objects to null (Nothing in VB.NET) once you have finished with them?   I understand that in .NET it is essential to dispose of any instances of objects that implement the IDisposable interface to release some resources although the object can still be something after it is disposed (hence the isDisposed property in forms), so I assume it can still reside in memory or at least in part?  I also know that when an object goes out of scope it is then marked for collection ready for the next pass of the garbage collector (although this may take time).  So with this in mind will setting it to null speed up the system releasing the memory as it does not have to work out that it is no longer in scope and are they any bad side effects?  MSDN articles never do this in examples and currently I do this as I cannot  see the harm. However I have come across a mixture of opinions so any comments are useful. Downloading US Census data? Word style "keep with next" except on last item