I can accept the fact that $Z^2 = \dfrac{\left(X-\mu\right)^2}{\sigma^2} \sim \chi^2(1)$ without knowing too much about this mysterious $\chi$-function, but I'm wondering how I can show that $(n-1)\dfrac{S^2}{\sigma^2} \sim \chi^2(n-1)$ from this?     Let $X_1 + X_2+\cdots+X_n$ be independent normally distributed variables:   $S = \dfrac{1}{n-1}\sum_{i=1}^n \left(X_i-\bar X\right)^2$      $W^2 = \dfrac{(\sum_{i=0}^n X_i -\bar X)^2}{\sigma^2} = \;? = \dfrac{n-1}{n-1}\dfrac{\sum\left(X_i-\bar X\right)^2}{\sigma^2} = \dfrac{(n-1)S^2}{\sigma^2} \overset{?}{\sim} \chi^2(n-1)$   I'm assuming some of this is wrong, and I don't really understand the argument of $\chi$ (why isn't it $\chi(n)$?), but I'm mostly interested in seeing a better derivation of the last result, if there is one.  Any help is appreciated!
It's a standard result that given $X_1,\cdots ,X_n $ random sample from $N(\mu,\sigma^2)$, the random variable $$\frac{(n-1)S^2}{\sigma^2}$$ has a chi-square distribution with $(n-1)$ degrees of freedom, where $$S^2=\frac{1}{n-1}\sum^{n}_{i=1}(X_i-\bar{X})^2.$$ I would like help in proving the above result. Thanks.
customize of autoref Guests see the Protected notice , somewhat displaced:    Logged in, all is fine:    It actually belongs there, at the bottom, but then it has some design glitches, or it needs to be placed at the top.  Verified on Firefox and Chrome stable. Imaginary line on the Earth is straight or not? I was watching Google map. Saw a line which is joinging north to south pole. It is going between middle of China and Mexico. But, the line is not straight. Tried to search in net but not able to get anything. Can anyone check and let me know  or What are valid values for "data defined" labeling settings? We are in the early stages of development of the official Stack Exchange Android app and we need your help with testing. To set a few expectations: there will be bugs, crashes, and missing features, all of which will be fixed in .    We are initially targeting Android devices running  (Android 4.1 or higher) starting with phones (up to ~5 inch) and eventually moving our way to tablets.    To register for alpha testing .  After you register we will send you an invite to a private Google community where you can find a link to download our app directly from the  store. The invitations will be sent out in waves, so if you don’t get an invite immediately, be patient.  Crash reports will be automatically reported back to us using . Bugs or feature requests should be reported here on meta and tagged . Please do not use the Google community to report bugs.  As always, we welcome your feedback and are committed to building the best mobile app possible for browsing the Stack Exchange sites. How to deal with perfect separation in logistic regression? If you have a variable which perfectly separates zeroes and ones in target variable, R will yield the following "perfect or quasi perfect separation" warning message:  Warning message: glm.fit: fitted probabilities numerically 0 or 1 occurred    We still get the model but the coefficient estimates are inflated.   How do you deal with this in practice? I guess I can live with the fact that the  changes size drastically when he transforms, but why does his shirt rip off and not his pants?  I think that we need a little better answer than "it keeps us tied to the fact that inside he's still human". What does it mean by 'bringing him gasping to all fours' in Harry potter? Immediately, his insides started writhing as though he'd just swallowed live snakes -- doubled up, he wondered whether he was going to be sick -- then a burning sensation spread rapidly form his stomach to the very ends of his fingers and toes -- next, bringing him gasping to all fours, came to a horrible melting feeling, as the skin all over his body bubbled like hot wax -- and before their eyes, his hands began to grow, the fingers thickened, the knuckles were bulging like bolts -- his shoulders stretched painfully and a prickling on his forehead told him that his hair was creeping down toward his eyebrows -- his robes ripped as his chest expanded like a barrel bursting its hoops -- his feet were agony in shoes four sizes too small      Harry potter and the chamber of secrets   It is the description of the feeling of drinking Polyjuice Potion, which makes someone into a different person, from the point of view of Harry Potter turning into Gregory Goyle.  And I don't understand what 'bring him gasping to all fours' means, especially 'four'. Does four here mean number 4? How to harden an SSH server? When looking for the path to an executable or checking what would happen if you enter a command name in a Unix shell, there's a plethora of different utilities (which, type, command, whence, where, whereis, whatis, hash, etc).  We often hear that which should be avoided. Why? What should we use instead? The bounty I offered on  is now in its grace period and the information box tells me:     you must award this bounty as soon as possible   But there are no answers - what do I do? Is it appropriate to buy a "thank you" gift for a PhD supervisor? I am nearing the end of my PhD and I would quite like to buy a "thank you" gift for my supervisor (although, she's the socially awkward type who I'm sure will be greatly embarrassed to receive one).  I'm just wondering whether a gift is the done thing? And if so, what sort of gift seems appropriate? I suppose a bottle of wine would be a safe choice? Proof that there are infinitely many prime numbers starting with a given digit string To prove the following fact: given any sequence of digits in any base, eg 314159265358979323 base 10, there are infinitely many primes that start with these digits,eg when expressed in decimal they start with 314159265358979323. I think using a prime number theorem will be helpful . But I am still not getting a point of how to start the proof. How to get a list of the filenames of the figures embedded in a document I have a TeX document that is embedding a huge amount of figures from a fig folder that is full of another humongous amount of other figures.  I would like to move the document along with its figures, but I don't want to take the whole fig folder, just the figures in there that are embedded by the document.  Is there a package (or any other way) that allows me to, for example, print out the filenames of all the figures embedded by the document? Something like:  fig/figurename1.eps fig/figurename2.eps ... etc   I could then just copy-paste that list and add some cp's in a plain text file and automate the copy of those files to my desired location by running the file in my shell:  $ cp fig/figurename1.eps wherever/fig/ $ cp fig/figurename2.eps wherever/fig/ ... etc   Of course this is just an idea, if somebody has an alternative to the "file listing and copy-pasting in a shell file" I would be happy to listen =) book recommendation on functional analysis I need to do this for displacement mapping, subdivision gives a bad result and makes triangles distinguishable.    Related to:   But I get the error "No other selected object found to use for projection". Is there any way to recover unsaved notepad++ docs? Zooming to WMS layer after CQL filter in OpenLayers? I created a layer that contains points and I added it to a map as WMS layer in OpenLayers. I did a CQL filter and it works but I'd like to zoom to the selected point when I worked with getextent or getdataextent it doesn't zoom to the right place. It missed with a few Km. Here is my the code of filter:   function filterNom(){             var filterType ="cql";             var filter = document.getElementById('batima').value;             // by default, reset all filters             var filterParams = {cql_filter: null};             if (OpenLayers.String.trim(filter) != "") {                 if (filterType == "cql")                      filterParams["cql_filter"] = "batiment='"+filter+"'";              }             // merge the new filter definitions             wfs_layer.mergeNewParams(filterParams);             var bounds =  new OpenLayers.Bounds             bounds = wfs_layer.getExtent()             map.setCenter(wfs_layer.getExtent(),18);             var center = map.getCenter();             center.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913"));             alert(center.toString()); }   and here is the code to add the WMS layer:    wfs_layer = new OpenLayers.Layer.WMS("Patrimoines",         "http:// localhost/geoserver/cite/wms",          {layers: 'cite:patrimoine' , transparent: true },         {isBaseLayer: false, opacity: 1, singleTile: true, visibility: true,          projection: 'EPSG:900913'}); Setting environment variables on OS X What is the proper way to modify environment variables like PATH in OS&nbsp;X?  I've looked on Google a little bit and found three different files to edit:   /etc/paths ~/.profile ~/.tcshrc   I don't even have some of these files, and I'm pretty sure that .tcshrc is wrong, since OS&nbsp;X uses bash now. Where are these variables, especially PATH, defined?  I'm running  (Leopard). Proving a triangle with different edge colors exists in a graph. This is again some homework translated (hopefully not too badly) from my book  The graph $K_{n}$ is colored using $n$ different colors, in a way that each color is used at least once. Prove that there exists a triangle with its edges colored in different colors.