If a large sample of volunteers were not representative of a specific population, would it necessarily mean that any conclusion of a study performed with sound methodology on this sample could not be generalized to that population?
Take as an example the well-known . In the original paper, the regression model was used to model the amount people were willing to pay for improved air quality.  But the 'people' whose behaviour was being modelled was never specified. Presumably, it was not limited to 'residents of Greater Boston'. Only implausibly would it be 'humans anywhere on the planet'. Nor, 'all US residents'.   So what inference are we invited by the authors to draw about the scope they intend for their theory? Perhaps 'all residents of large US metro areas'. But - what about other First World metro areas? The first two sections of the Boston paper scrupulously avoid any reference which might suggest that they had a particular 'population' to which their 'sample' was to apply.  There is also the dimension of time - the data came from the 70s, whereas the theory is has no time limitations spelt out.  Plus - going back to first principles - how could the Boston data be treated as a sample of a population including, say, the Chicago metro area when no data from the Chicago area was considered?   Besides, lots of the covariates in the Boston regression weren't samples at all, but totals - so, for example, the proportion of blacks was supplied from census stats.  My question: how can we conceive the Boston data as supporting the geographically unlimited propositions in the paper? Is there a mathematical way of showing equivalence or approximation of the Boston data analysis to other cities? Or is it just assumed as a matter of common sense - such that the paper's authors would be amazed to think anyone could have any doubts on the matter?
I have two Python dictionaries, and I want to write a single expression that returns these two dictionaries, merged (i.e. taking the union).  The update() method would be what I need, if it returned its result instead of modifying a dictionary in-place. &gt;&gt;&gt; x = {'a': 1, 'b': 2} &gt;&gt;&gt; y = {'b': 10, 'c': 11} &gt;&gt;&gt; z = x.update(y) &gt;&gt;&gt; print(z) None &gt;&gt;&gt; x {'a': 1, 'b': 10, 'c': 11}  How can I get that final merged dictionary in z, not x? (To be extra-clear, the last-one-wins conflict-handling of dict.update() is what I'm looking for as well.) Inequality involving $\limsup$ and $\liminf$: $ \liminf(a_{n+1}/a_n) \le \liminf((a_n)^{(1/n)}) \le \limsup((a_n)^{(1/n)}) \le \limsup(a_{n+1}/a_n)$ What algorithm for a tic-tac-toe game can I use to determine the "best move" for the AI? Equivalence of conditions for Convergence of Non-negative Random Series Question  Let $X_n\geq 0$ be independent for $n\geq 1$. The following are equivalent.  $\sum_{n=1}^\infty X_n&lt;\infty$ a.s. $\sum_{n=1}^\infty[P(X_n&gt;1)+E(X_nI(X_n\leq 1)]&lt;\infty$ $\sum_{n=1}^\infty E(X_n/(1+X_n))&lt;\infty$   My attempt I was able to prove $(1)$ implies $(2)$ and $(2)$ implies $(3)$ but not $(3)$ implies $(1)$. For $(1)$ implies $(2)$, observe that by Borel-Cantelli $\sum_{n=1}^\infty P(X_n&gt;1)&lt;\infty$, else $X_n&gt;1$ infinitely often w.p.1 so that $(1)$ is violated. To see that $\sum_{n=1}^\infty E(X_nI(X_n\leq 1)]&lt;\infty$, apply Kolmogorov three-series theorem (I think). For $(2)$ implies $(3)$ we can write that $$ \begin{align} \frac{X_n}{1+X_n}&amp; =\frac{X_n}{1+X_n}I(X_n\leq 1)+\frac{X_n}{1+X_n}I(X_n&gt;1)\\ &amp;\leq X_nI(X_n\leq 1)+ I(X_n&gt;1). \end{align} $$ Now take the expectation of both sides and sum on $n$ using $(2)$ to conclude $(3)$. For the last implication $(3)$ implies $(1)$, I tried to use Kolmogorov three series theorem. To this end put $Y_n=X_nI(X_n\leq 1)$. First note that $\sum_{n=1}^\infty P(X_n&gt;1)&lt;\infty$ since $$ P(X_n&gt;1)\leq P\left(\frac{X_n}{1+X_n}&gt;\frac{1}{2}\right)\leq 2E\frac{X_n}{1+X_n} $$ by Markov's inequality. But I am unable to show that $\sum EY_n&lt;\infty$ and $\sum\text{Var}(Y_n)&lt;\infty$. Any help is appreciated. Fibonacci combinatorial identity: $F_{2n} = {n \choose 0} F_0 + {n\choose 1} F_1 + ... {n\choose n} F_n$ Can someone explain how to prove the following identity involving Fibonacci sequence  $F_n$  $F_{2n} = {n \choose 0} F_0 + {n\choose 1} F_1 + ... {n\choose n} F_n$ ? Handle application exit We are asked the following:      let $f(x)$ be a continuous function on $[0, 1]$ such that   $$\int _ {0} ^ {1} \ f(y) dy = 1$$   prove that $f(x) = 1$ for some $x ∈ [0, 1]$   The question asks to take into account Rolle's Theorem and Mean Value Theorem.  I'm aware of the definitions, but I am really unsure how to answer this question and my tutors are not really responding till after easter.    Could someone please help? Why is there a "y" involved?  Thanks you How does the ternary operator work? Please demonstrate how the ternary operator works with a regular if/else block. Example:  Boolean isValueBig = value &gt; 100 ? true : false;     Exact Duplicate: Compute the (multiplicative) inverse of $4x+3$ in the field $\frac {\Bbb F_{11}[x]}{\langle x^2+1 \rangle}$? So I am finding a polynomial $px+q$ ($p,q \in \Bbb F_{11}$) which is multiplicative inverse of $4x+3$ in $\frac {\Bbb F_{11}[x]}{\langle x^2+1 \rangle}$.  i.e. $[(4x+3)+\langle x^2+1 \rangle][(px+q)+\langle x^2+1 \rangle]=1+\langle x^2+1 \rangle$   $\Rightarrow$  $(4x+3)(px+q)+\langle x^2+1 \rangle=1+\langle x^2+1 \rangle$  $\Rightarrow$  $4px^2+(4q+3p)x+3q+\langle x^2+1 \rangle=1+\langle x^2+1 \rangle$.  We see that the remainder,when $(4x+3)(px+q)$ is divided by $x^2+1$, is $1$. So by Division algorithm,  $$ \require{enclose} \begin{array}{r} 4p \\[-3pt] x^2+1 \enclose{longdiv}{4px^2+(4q+3p)x+3q} \\[-3pt] \underline{4px^2+4p} \\[-3pt] (4q+3p)x+(3q-4p) \\[-3pt] \end{array} $$    So I equate $(4q+3p)x+(3q-4p)=1$ and solve the simultaneous linear equations  $4q+3p=0, 3q-4p=1$. I get $p=6,q=1$  Hence $6x+1$ is the required inverse.  I am pretty sure that the answer is correct but is the method to achieve it right? Removing intercept from GLM for multiple factorial predictors only works for first factor in model I am running a binomial logistic regression with a logit link function in R. My response is factorial [0/1] and I have two multilevel factorial predictors - let's call them $a$ and $b$ where $a$ has 4 factor levels  $(a_1,a_2,a_3,a_4)$ and $b$ has 9 factor levels $(b_1,b_2,\dotsc,b_9)$. Therefore:  mod &lt;- glm(y ~ a + b, family = binomial(logit), data=pretend) summary(mod)   The model output would then show all the information about the model as well as the coefficients.  There is a factor level for both a and b missing (a1 and b1) from the summary output. I understand that it is constrained in the "intercept" of the model. I have read that if I want to remove the intercept term and see the estimates for those factor levels I can just add -1 to the model formula, i.e.:  mod2 &lt;- glm(y ~ a + b - 1, family=binomial(logit), data=pretend) summary(mod2)   In the new model (mod2) the intercept term is then gone and variable a's factor-level a1 is given amongst the list of coefficients. But, variable b's factor-level b1 is still missing and given that there is no intercept term anymore, how can I interpret the odds-ratio for that factor level then?  Could someone please explain to me how to get the coefficient for b1 too and why this is happening? How can I read a file even when getting an "in use by another process" exception? Why does arXiv have a multi-day lag between submission and publication? If you go on the  (now, 8th December 2020, 19:24 Italian time), there is for example the article &quot;Exploring the Usage of Online Food Delivery Data for Intra-Urban Job and Housing Mobility Detection and Characterization&quot;. This article is under the heading &quot;8 December&quot;. But if you , it was &quot;Submitted on 4 Dec 2020&quot;. Why there is a lag between submission time and the header under which it appears for recent publications? I guess the arXiv staff have to approve the article before is being published .... is my guessing correct? Why is it that Android still can't be installed as regular OS? Are there any technical or others reasons why Android is still a firmware and not an OS which can be just installed without a lot of hassle?  Why there is no universal image which could detect appropriate drivers (kernel modules), partition NAND in some standard way and configure boot loader to boot updated OS version?  What stops Google from making a real (less firmware-like) OS (an OS for small ARM, x86 etc. devices)? Is it purely a 'gotta-have-them-all' mindset, or do they actually serve some purpose?  I notice that you are able to sell them on a community market. For a test I listed one, and someone bought it for 50p. Not exactly a huge amount, but I don't understand why someone would spend real money on them.  Am I missing something?   Are they redeemable for games or money off vouchers or something 'tangible' that I'm missing? trouble installing pygame on ubuntu 16.04 LTS I had a hard time installing pygame on my ubuntu 16.04 LTS. I use python 3. these are the steps I took to install pygame:  1.first I installed pip:  sudo python3 get-pip.py   this is the output of running pip --version:  pip 10.0.1 from /usr/local/lib/python3.5/dist-packages/pip (python 3.5)    I executed the following commands:   sudo apt-get install python3-dev mercurial  sudo apt-get install libsdl-image1.2-dev libsdl2-dev libsdl-ttf2.0-dev   then I executed the following command:   pip install --user hg+http://bitbucket.org/pygame/pygame  and this is the result in terminal:  Collecting hg+http://bitbucket.org/pygame/pygame   Cloning hg http://bitbucket.org/pygame/pygame to /tmp/pip-req-build-hxy86__i abort: error: Connection reset by peer Command "hg clone --noupdate -q http://bitbucket.org/pygame/pygame /tmp/pip-req-build-hxy86__i" failed with error code 255 in None   and it fails to install pygame. what should I do?? How can I get the list of files in a directory using C or C++? How can I determine the list of files in a directory from inside my C or C++ code?  I'm not allowed to execute the ls command and parse the results from within my program. Is there any way to keep a command from being added to your history? I have a command that I want to keep out of my history file, and I really don't care to have it there when I search the history stored in memory, though that's less of a concern. Is there any way to prevent this, or do I just have to go back and edit my history file.  update: I didn't realize this might be shell-specific. My shell is zsh. You're welcome to answer for other shells so people know how to do this in their shell. Do SSD's really last 285 years? Some Sold State Disks (SSD) have a  (MTBF) of 2,500,000 hours. If you divide that by the rough number of hours in a year you get 2500000÷(365×24) ~= 285 years before there is a problem.  I know that the first generation SSD's used to have a short life - but now the estimated time before they fail seems absurdly high. Most warranties only cover them for 1-3 years it seems.  How long are the modern, SATA III drives supposed to last? find an approximate solution, up to the order of epsilon The question is to find an approximate solution, up to the order of epsilon of following problem.  $$y'' + y+\epsilon y^3 = 0$$ $$y(0) = a$$ $$y'(0) = 0$$  I tried to solve the given problem using perturbation theory.  $$y(t) = y_0(t) + \epsilon y_1(t) + \epsilon^2 y_2(t) + \cdots$$ $$t = w(\epsilon)t = (1 + \epsilon w_1 + \epsilon^2 w_2 + \cdots )t$$  However, i failed to find an appropriate approximate solution... help me!! My options to link large image into AI file My .psd file has a resolution of 6m x 3m @ 150 DPI. This makes it 35433px x 5906px in size. Photoshop CS6 saves the file as .tiff or .psb only. When I first import into Illustrator I get an error that the file is not readable but I have tried many options. Last one is not supported by AI.  So I'm puzzled... is there a way to link large images into Illustrator?