Prove that $$\sum_{k=0}^r {m \choose k} {n \choose r-k} = {m+n \choose r}.$$  This problem is in the chapter about discrete random variables, but I have no idea what to go about substituting.  I can't get it to be a featured formula without screwing stuff up, sorry about that.
How can we prove that     $$\sum_{k=0}^{n}\binom{R}{k}\binom{M}{n-k}=\binom{R+M}{n}?$$   (Presumptive) Source: Theoretical Exercise 8, Ch 1, A First Course in Probability, 8th ed by Sheldon Ross.
What are bitwise shift (bit-shift) operators and how do they work? Why does the road look like it's wet on hot days? Often, I'll be driving down the road on a summer day, and as I look ahead toward the horizon, I notice that the road looks like there's a puddle of water on it, or that it was somehow wet. Of course, as I get closer, the effect disappears.  I know that it is some kind of atmospheric effect. What is it called, and how does it work? Terminal only shows up as a black window XGBoost Loss function Approximation With Taylor Expansion As an example, take the objective function of the XGBoost model on the $t$'th iteration:  $$\mathcal{L}^{(t)}=\sum_{i=1}^n\ell(y_i,\hat{y}_i^{(t-1)}+f_t(\mathbf{x}_i))+\Omega(f_t)$$  where $\ell$ is the loss function, $f_t$ is the $t$'th tree output and $\Omega$ is the regularization. One of the (many) key steps for fast calculation is the approximation:  $$\mathcal{L}^{(t)}\approx \sum_{i=1}^n\ell(y_i,\hat{y}_i^{(t-1)})+g_tf_t(\mathbf{x}_i)+\frac{1}{2}h_if_t^2(\mathbf{x}_i)+\Omega(f_t),$$  where $g_i$ and $h_i$ are the first and second derivatives of the loss function.   What I'm asking for is convincing arguments to demystify why the above approximation works:  1) How does XGBoost with the above approximation compare to XGBoost with the full objective function? What potentially interesting, higher-order behavior is lost in the approximation?  2) It's a bit hard to visualize (and depends on the loss function) but, if the loss function has a large cubic component, then the approximation will likely fail. How is it that this doesn't cause problems for XGBoost? I am working on parameter estimation and one of the estimators involves a summation of $_nC_k$ ($n$ choose $k$) expressions. For some iterations, I need to compute expressions like $_0C_1$, $_0C_2$, etc.  In general how do we compute $_nC_k$ when $n$ is less than $k$? Do we still use the formula $\frac{n!}{(n-k)!k!}$ and use the gamma function to compute the negative factorial?  Thanks! Let $R$ be a simple ring and $T$ be a non-zero ring. Let $f\colon R \rightarrow T$ be a ring homomorphism. Show $f$ is injective.  Proof: $\ker f \lhd R$, so $\ker f=R$ or $\ker f=\{0\}$. If $\ker f=R$ then $R/R \cong \{0\}$, but $T \neq \{0\}$, which is a contradiction. I can't see why does the last part means contradiction.   Thanks for any assistance! I recently read this , which stated:     For scientists trying to design a compound that will attach itself to,   and modify, a target disease pathway, the critical first step is to   determine the electronic structure of the molecule. But modeling the   structure of a molecule of an everyday drug such as penicillin, which   has 41 atoms at ground state, requires a classical computer with some   $10^{86}$ bits—more transistors than there are atoms in the observable   universe. Such a machine is a physical impossibility. But for quantum   computers, this type of simulation is well within the realm of   possibility, requiring a processor with 286 quantum bits, or qubits.   Along with this resource estimate for penicillin, I've also seen  of the number of qubits required to model the ground state of caffeine (160 qubits). Given that the above report offers no reference(s) (probably in the name of business intelligence) and much Internet searching and looking into the quantum chemistry literature has come up short, my question is: Where are these resource estimates coming from – is there a journal article that published these numbers? I would really like to identify the methodology and assumptions used in making these estimates. What made us think that Earth moves around the Sun? I am having trouble understanding what defines Entailment operator. On Mathoverflow I posted this question on what I perceive to be .  Consider: :     P therefore Q  P            Therefore, Q   My question is could we have arbitrarily defined it such as:     P therefore Q  P            Therefore, P   However, if an advanced civilization receives information in the form of following nested structures/containers or packets, how will they interpret Modus Ponens if in an alien land Modus Ponens is not defined?    Therefore, it raises the validity of MP. How do we define the implication or entailment operator? Because if we use an argument that relies on implication or entailment operator ipso facto, then it is trivial that logic is circular.  Is there a flaw in my rationale? What is the value of $\sum\limits_{i=1}^\infty\frac{1}{p_{p_i}}$ where $p_{i}$ is the $i$th prime? Is the universe finite or infinite? Can two different planes share the same flight number? What are the limits of house-elf apparition? I know Wizards can't apparate where they want on the Earth, except if they are very powerful but what about a house-elf ? Their magic is different so I was wondering if they can apparate wherever they want or if they have a limit too. Consider the sequence defined as  $x_1 = 1$  $x_{n+1} = \sin x_n$  I think I was able to show that the sequence $\sqrt{n} x_{n}$ converges to $\sqrt{3}$ by a tedious elementary method which I wasn't too happy about.  (I think I did this by showing that $\sqrt{\frac{3}{n+1}} &lt; x_{n} &lt; \sqrt{\frac{3}{n}}$, don't remember exactly)  This looks like it should be a standard problem.   Does anyone know a simple (and preferably elementary) proof for the fact that the sequence $\sqrt{n}x_{n}$ converges to $\sqrt{3}$? TL:DR: Is it ever a good idea to train an ML model on all the data available before shipping it to production? Put another way, is it ever ok to train on all data available and not check if the model overfits, or get a final read of the expected performance of the model?    Say I have a family of models parametrized by $\alpha$. I can do a search (e.g. a grid search) on $\alpha$ by, for example, running k-fold cross-validation for each candidate.   The point of using cross-validation for choosing $\alpha$ is that I can check if a learned model $\beta_i$ for that particular $\alpha_i$ had e.g. overfit, by testing it on the "unseen data" in each CV iteration (a validation set). After iterating through all $\alpha_i$'s, I could then choose a model $\beta_{\alpha^*}$ learned for the parameters $\alpha^*$ that seemed to do best on the grid search, e.g. on average across all folds.  Now, say that after model selection I would like to use all the the data that I have available in an attempt to ship the best possible model in production.  For this, I could use the parameters $\alpha^*$ that I chose via grid search with cross-validation, and then, after training the model on the full ($F$) dataset, I would a get a single new learned model $\beta^{F}_{\alpha^*}$   The problem is that, if I use my entire dataset for training,  I can't reliably check if this new learned model $\beta^{F}_{\alpha^*}$ overfits or how it may perform on unseen data. So is this at all good practice? What is a good way to think about this problem? We have a directory and want to protect that from remove and rename, but we need to be able to rename, remove and create contents. What we can do? onKeyUp not firing for ESC in IE How is Mono magical? I'm learning C#, so I made a little C# program that says Hello, World!, then compiled it with mono-csc and ran it with mono:  $ mono-csc Hello.cs $ mono Hello.exe Hello, World!   I noticed that when I hit TAB in bash, Hello.exe was marked executable. Indeed, it runs by just a shell loading the filename!   Hello.exe is not an ELF file with a funny file extension:  $ readelf -a Hello.exe readelf: Error: Not an ELF file - it has the wrong magic bytes at the start $ xxd Hello.exe | head -n1 00000000: 4d5a 9000 0300 0000 0400 0000 ffff 0000  MZ..............   MZ means it's a Microsoft Windows statically linked executable. Drop it onto a Windows box, and it will (should) run.  I have wine installed, but wine, being a compatibility layer for Windows apps, takes about 5x as long to run Hello.exe as mono and executing it directly do, so it's not wine that runs it.  I'm assuming there's some mono kernel module installed with mono that intercepts the exec syscall/s, or catches binaries that begin with 4D 5A, but lsmod | grep mono and friends return an error.   What's going on here, and how does the kernel know that this executable is special?    Just for proof it's not my shell working magic, I used  (aka sh) to run it and it still runs natively.    Here's the program in full, since a commenter was curious:  using System;  class Hello {   /// &lt;summary&gt;   ///   The main entry point for the application   /// &lt;/summary&gt;   [STAThread]   public static void Main(string[] args) {     System.Console.Write("Hello, World!\n");   } } I am stuck on how to calculate the following limit: $$\lim_{x\to\infty}x\left(\left(1 + \frac{1}{x}\right)^x - e\right).$$  Definitely, it has to be through l'Hôpital's rule. We know that $\lim_{x\to\infty} (1+(1/x))^x = e$. So, I wrote the above expression as $$\lim_{x\to\infty}\frac{\left(1 + \frac{1}{x}\right)^x - e}{1/x}.$$Both numerator and denominator tend to zero as x tends to infinity. I applied l'Hôpital's rule twice, but I got the limit equal to infinity which is clearly wrong. In the book, it says that the limit should be $-e/2$.  Any help please? Also, in case someone managed to solve it, please tell me which numerator and denominator did you apply your l'Hôpital's rule to in both cases? Thanks a lot  Also, guys can you tell me how to write equations in this forum? Thanks. Trying to format USB (using Linux/fdisk) so it shows up on my Mac I have a USB drive that I can see/access/modify/etc in Linux/Ubuntu but it doesn't show up on my Mac OSX.  I did sudo fdisk /dev/sdb (where my USB is) and then g to create a new GPT partition table, n to make a new partition, used all default settings, then w to save and exit.  Then I did sudo mkfs.fat -F32 /dev/sdb1 to format the partition with a FAT32 filesystem.  I ejected the USB and put it in my Mac and it doesn't show up / get detected.  What did I miss?