As I understand the Bootstrap Method: you have a set of data which is of size $N_{all}$, and then from this set you select sub-samples of size $N_{sub}$.  Is there a rule of thumb for the size of the subset you should choose? For now I simply take the  $N_{all} = N_{sub}$ as for the sub samples repeated values from the original main set may be selected.  Is there a smarter way to choose $N_{sub}$?
Say we have the following sample and we are trying to estimate the variance of the sample mean of the population.  X = [0, -1, 2, 10, -3]   If I take an increasing number of bootstrap (e.g. 100, 1000, 10,000, 100,0000), the bootstrap distribution of the sample mean gets narrower and narrower. In other words, I can make the bootstrap distribution arbitrarily narrow.   Given the above, what's the point of using a different number of bootstrap samples here? And wouldn't this mean that I could make the standard error of the mean arbitrarily small by just taking more and more bootstrap samples? What am I missing?  Please note that I am doing a proper bootstrap sample in the sense that each bootstrap sample has the same exact size as the original sample (input array).
How does a  work? If seen from the outer side, we can see through thinking it is transparent, while if seen from the inside, the glass acts as a mirror. How? What is the Euler Totient of Zero? Wolfram MathWorld defines the Euler Totient function as follows:  The totient function phi(n), also called Euler's totient function, is defined     as the number of positive integers &lt;=n that are relatively prime to (i.e., do  not contain any factor in common with) n, where 1 is counted as being  relatively prime to all numbers   By this definition would $\phi(0)=0$? So I have a mac computer but i plugged in a windows keyboard in my mac. I am still trying to figure out how to paste commands into a command block. So how can I paste a command? Javascript custom button stopped working, Synchronous XMLHttpRequest is deprecated We have a custom javascript button on the quotes object in our org that has been working for several months that someone has noticed today is not working.    I'm not sure if there was an update that broke it or what day exactly it stopped working.  I'm hoping someone has an idea of where I can even begin to look.   Here's the code:   javascript:location.href= 'mailto:emailaddress@ourdomain.com?SUBJECT='+ escape("{!Quote.Name}")+' - '+ escape("{!Quote.Contact_s_Account__c}") + '&amp;BODY=Please convert ' + escape(location.href)+ ' into a proposal and send it to the email address on the quote.  Thanks!';   Using developer tools in chrome, I see this error after I click the javascript button:   presence: onFailure in event parser ={"status":-5,"statusText":""}page load happens value=true           umps1w4.salesforce.com/umps/UMPSWidget_184/js/dist/umps-min.js?cflag=184.36:14 presence: onFailure in event parser ={"status":-5,"statusText":""}page load happens value=true   I changed my code to something simple:   javascript:location.href= 'mailto:emailaddress@ourdomain.com?SUBJECT='hello'    and got this error in the developer tools in chrome:   Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.   This lead me to the conclusion that I'm having XSS issues.  I do remember a SF update not too long about about protecting against XSS issues.  I guess I'll have to figure out a different way to implement this functionality. On every other site on Stack Exchange I can click on the site's title and be taken directly to the questions...     Except Meta.stackexchange.com   Here I actually have to click on the word "Questions" as there is no link active on the Meta title and logo.  Now I agree this isn't a big deal, however as I typically visit stack exchange pages up to a couple of hundred times a day, this one that doesn't fit spoils my flow. I am pretty certain it used to work.  It works for me in Firefox, and Safari on iPad, but even closing and reopening Chrome doesn't fix the issue.  Chrome is on Version 53.0.2785.116 If light rays obey to the wave equation, why can they be thought as straight lines? I'm a newbie with physics but I'm wondering how a ray of light can essentially be represented. I have always known that a ray of light proceeds in a straight line until it encounters another object (or material) that refracts/reflects it. But a light ray should be part of an electro-magnetic wave, is this correct? If it is so, it should obey to the  and this doesn't seem to me to describe a straight line ray.  I'm having problems visualizing how light is emitted and how it relates with the wave equation. Can someone with a clear understanding of the problem explain it to me in simple terms? I've been doing some practice questions in the textbook for an upcoming predicate calculus lecture and I think I've managed to get A and B (possibly C) correct but I am clueless on how I can manage D and E.   For A I got: ∃x(R(x)∧¬B)  For B I got: ∀x(¬R(x)∧B)  For C I got: ∃x(R(x)∧(x=y))   - Not sure if this is even remotely correct    R(X) : ”X is rich”  X = Y : ”X equals Y”  B : ”Bill Gates”  a) Someone besides Bill Gates is rich.  b) Bill Gates alone is rich.  c) At least two people are rich.  d) Exactly one person is rich.  e) Exactly two persons are rich.  The universe of discourse is the set of all people. Execute a Java program from our Java program I used   Runtime.getRuntime().exec("_____")   but it throws a IOException as below:  java.io.IOException: CreateProcess: c:/ error=5   at java.lang.Win32Process.create(Native Method)   at java.lang.Win32Process.&lt;init&gt;(Win32Process.java:63)   at java.lang.Runtime.execInternal(Native Method   I don't know whether I have the problem with specifying the path or something else. Can anyone please help me with the code. Why did Obi-Wan allow Leia to get adopted by such a high profile figure? I know that Leia is a princess because she was adopted by the Queen of Alderaan, but why would Obi-Wan allow this? Wasn't the original plan of Obi-Wan and Yoda to hide the Skywalkers from Palpatine? Luke was placed into a very low-profile position, being the child of two farmers on a backwater planet. However, Leia occupies a very important political position.  Is there any reason why Obi-Wan would do this if he was trying to hide her? What's the name for the relativistic paradox with the train/car travelling over a gap? There is a relativistic paradox I was introduced by a friend in Ithaca (Courtenay Footman). It involves a vehicle travelling over a ravine relativistically, so it's in the general family of ladder paradoxes. There are many ways to phrase it, but here's a simple one.   A three-car train with each car of length $L$ is travelling over a bridge across a ravine. (Assume that the couplings between cars are stiff: this train does not bend.) Unfortunately, some evil genius has precisely removed a length $6L$ of the track. The train however is relativistic, travelling at a speed such that $\gamma \approx 12$.  In the reference frame of the ground, the train should appear to be 1/24th the size of the gap, which suggests that it will fall a little and should crash into the bridge opposite. But in the reference frame of the train, each car of the train is at least twice as long as the gap and aside from the very front wheel and the very back wheel, which need to be supported by rigidity, everything is constantly well-supported. This suggests that the train makes it. Who is right?  I vaguely remember that as an undergraduate knowing only a little relativity, I trusted the train's perspective because it's at rest in that perspective, and Courtenay said that this was ultimately correct after a lot of details got resolved. But I do not remember all of these details such that I could work it out for myself. So I'm looking for some discussion that's a little more well-sourced or authoritative.  What is this paradox called, and what literature has addressed the issue? Prove that $\sum_{r=1}^nr(r+1)=\frac{n(n+1)(n+2)}{3}$ using induction $$\sum_{r=1}^nr(r+1)=\frac{n(n+1)(n+2)}{3}$$  could you help me with how exactly I work this out? If you could travel to the center of the Earth (or any planet), would you be weightless there? Compare double in VBA precision problem I have trouble comparing 2 double in Excel VBA  suppose that I have the following code  Dim a as double Dim b as double a = 0.15 b = 0.01   After a few manipulations on b, b is now equal to 0.6  however the imprecision related to the double data type gives me headache because  if a = b then  //this will never trigger end if   Do you know how I can remove the trailing imprecision on the double type? I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.  The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.  The two ways are:  var functionOne = function() {     // Some code };     function functionTwo() {     // Some code }   What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other? When I'm using rendered viewport it initially takes a while before rendering starts, but once it does, I can freely move around and rendering a new view happens almost instantaneously. When on the other hand I'm rendering a movie, for each frame Blender takes a significant amount of time before rendering even starts, usually doing the following:  Synchronizing object, Updating images, Updating meshes, Updating Scene BVH, Packing BVH,  Why does it do this? And is it possible to disable this to increase movie rendering speed? Generating random points uniformly on a disk I have to randomly generate 1000 points over a unit disk such that are uniformly distributed on this disk. Now, for that, I select a radius $r$ and angular orientation $\alpha$ such that the radius $r$ is a uniformly distributed variate from $r \in [0,1]$ while $\alpha$ is a uniformly distributed variate from $\alpha \in [0, 2\pi]$ using the following code r &lt;- runif(1000, min=0, max=1)  alpha &lt;- runif(1000, min=0, max=2*pi) x &lt;- r*cos(alpha) y &lt;- r*sin(alpha) plot(x,y, pch=19, col=rgb(0,0,0,0.05), asp=1)  Then I look at my sample space and it looks like this:  This obviously doesn't look like a sample with uniform distribution over the disk. Hence, I guessed that the problem might be occurring as a result of a lack of independence between the variables $r$ and $\alpha$ in contingency to how they've been linked computationally. To take care of that I wrote a new code. rm(list=ls()) r &lt;- runif(32, min=0, max=1) df_res &lt;- data.frame(matrix(c(-Inf, Inf), byrow = T, nrow = 1)) for (i in 1:32) {   for (j in 1:32) {     alpha &lt;- runif(32, min=0, max=2*pi)     r &lt;- runif(32, min=0, max=1)     df &lt;- data.frame(matrix(c(r[i],alpha[j]), byrow = T, nrow = 1))     df_res &lt;- rbind(df_res,df)   } } df_res &lt;- subset(df_res, df_res$X1 != -Inf) x&lt;- df_res$X1 *cos(df_res$X2) y &lt;- df_res$X1 *sin(df_res$X2) plot(x,y, pch=19, col=rgb(0,0,0,0.05), asp=1)  And, yet again the sample looks non-uniformly distributed over the disk  I'm starting to suspect that there is a deeper mathematical problem going on in the vicinity. Could someone help me write code that would create a sample space uniformly distributed over the disk, or explain the mathematical fallacy if any in my reasoning? I opened Cairo-dock in my terminal with: open cairo-dock and that worked but if I close the terminal it goes with it. How can I keep it open regardless of the terminal? Google Drive files opening in new window vs new tab? This might be a duplicate of  but that question is 5 years old and unanswered.  When I'm in drive.google.com and I open a G Suite file (either double-click or select &amp; press enter) in Firefox it opens in a new window whereas in Chrome it opens in a new tab.   Why do they do that? Is this a browser-specific quirk or a Google setting (that I haven't found)? Is there a way to control the behavior? I'd like them both to open in tabs, but presumably the same answer would be relevant in the opposite direction too. What's the difference between the work function and ionisation energy? CBC-MAC Padding weaknesses