$s$ balls are sampled and then replaced from/into a box with $N$ balls. On average, how many samplings are to be made until all of the balls have been taken at least once?   ps: this is not a homework problem. I’m trying to reduce the number of updates on parameters during a neural network’s optimization phase. I’m able to simulate this experiment and get a good numerical approximation, but doing so for every different value of $s$ and $N$ seems a little unclever.
I am trying to solve a variation on the .  In this scenario, someone is selecting coupons at random with replacement from n different possible coupons. However, the person is not selecting coupons one at a time, but instead, in batches.  Here's an example problem formulation: There are 100 distinct coupons. A person makes selections in 10-coupon batches at random (each coupon with replacement). What is the expected number of batches necessary to have selected 80 unique coupons?  I have been able to determine the expected number of selections necessary to have selected k unique coupons when selecting one at a time (much like Henry's ), but I'm a bit stumped as to how to go about solving it with this particular wrinkle.  Any tips/guidance would be greatly appreciated.
What counts as an attack? I was looking over the class feature of the 'fiend' patron warlock in 5e. I'm a bit confused on what actions the player needs to take before they can use the 'Hurl Through Hell' ability on an enemy. The PHB states:     Starting at 14th level, when you hit a creature with an attack, you can use this feature to instantly transport the target through the lower planes.   I'm not clear on what an 'attack' means in this context. Does it have to be a physical attack like a sword or crossbow? Do magical attacks like Eldritch Blast that require an attack roll count? What about spells with no attack roll? If I read the sentence     Find ten apples and oranges.   Do I need to find ten or twenty pieces of fruit? Note: This question is specifically about installed, desktop software. There is  specifically about free cloud-based software and services.  What free programs should every GIS user have installed?  I'm not necessarily referring to ESRI extensions or open-source products, but others that increase your productivity and ability to handle GIS tasks.  For example:    for writing code snippets or editing XMLs.  or  for quick graphic editing. I use  daily and I think it's worth mentioning. It's not GIS-specific, but it's a great tool, especially if used independently and on multiple projects where purchasing time-management software isn't reasonable. While it's not focused on GIS development,  has proven to be very useful in terms of increasing productivity and monitoring system resources. I have created a GIS "sidebar" on my desktop that holds all of my development tools, as well as links to the online resources I used the most. It's nice to be able to use one location, rather than many (e.g. taskbar, bookmarks in browser, search engine). I have a table with a column for ID, Date and Frequency of occurrence for that particular date and ID.  ID    date          Frequency 1     2014-05-18      5 1     2014-05-19      4 1     2014-05-20      25 2     2014-05-20      7 3     2014-05-18      4 3     2014-05-20      1 4     2014-05-18      6   I'm looking to insert the dates for each ID that aren't currently there (assuming that the date ranges from 2014-05-18 to 2014-05-20) and add a value of 0 in Frequency for those.  For example, you can see that  ID 1 has an observation for all three dates;  ID 2 is missing 2014-05-18 and 2014-05-19;   ID 3 is missing 2014-05-19;   ID 4 is missing 2014-05-19 and 2014-05-20.  Therefore, the output should look like this  ID    date          Frequency 1     2014-05-18      5 1     2014-05-19      4 1     2014-05-20      25 2     2014-05-18      0 2     2014-05-19      0 2     2014-05-20      7 3     2014-05-18      4 3     2014-05-19      0 3     2014-05-20      1 4     2014-05-18      6 4     2014-05-19      0 4     2014-05-20      0   I've attempted the following from . However, that will only add dates with 0 Frequency that aren't present throughout the entire table instead of on an ID level.   DECLARE @s DATE = '20140518', @e DATE = '20140520';  SELECT c.date, Frequency = COALESCE(a.Frequency,0) FROM dbo.Calendar AS c LEFT OUTER JOIN dbo.table AS a ON c.date = s.[date] WHERE c.d &gt;= @s AND c.d &lt; DATEADD(DAY, 1, @e); There are several things that I don't understand. I know that zero is a real number, but I'm confused on the how and why aspects. What defines a real number, compared to a number that's considered non-real? For what reason is zero real, and how is it that a value such as infinity isn't when zero is?  Also, what purpose does zero even have? It's obvious that it's used as a place holder, but what value does it have alone? What makes it any different from other numbers? I realize that it is typically interchanged with nothing, but that would technically mean that zero is nothing—and that's not true. People have told me already so many times that zero does not necessarily mean nothing, and I figured it out a long while ago anyway. So, what I want to know is the actual value that can be associated with zero.  However, my question brings up another topic that has been argued and disputed about and disagreed on for years. Zero divided by zero, or 0/0. There are a lot of varying answers about this, but what's been constant throughout everything is that people claim 0/0 is not a real number. So, if I may ask, why is it that zero is considered a real number, and not 0/0? And why is it considered non-real in the first place? True, there is no defined value, but the expression is anything but meaningless; if it was, then there wouldn't be so many people trying to understand it. I guess what I'm trying to figure out is the reason behind the expression's classification as non-real—especially when the sole number of zero is real, despite not having an evident value.  This covers a few different things, so I was uncertain about what to make the title of these questions. I apologize for that. If anyone can answer, though, I'd be extremely grateful! Firefox 37.0.2 not opening (removing firefox did not help) runing ubuntu 14.04 LTS Do you get to use the additional attack from the Extra Attack feature as well when you Ready an Attack action?  One of my players, a monk, decided to Ready an action as an earth elemental was about to attack. The trigger was the elemental moving within five feet of him. When this occurred, he took his Attack action, and then proceeded to take the extra attack as well.  I was unsure at the time whether or not the extra attack would also happen, and I haven't had much luck figuring it out. How to correctly install libpng12-0 on the Ubuntu 19.10? I know and have observed that the the division algorithm can be used to convert any number in the decimal system to the binary system. However, I have tried searching for an intuition of why this method works, and I just can't seem to see anything, although I know what type of intuition I am trying to make out.   So, my question is why we can use the division algorithm to convert between the decimal bases and any other number bases?   An example from the decimal system to binary would be appreciated. Inverse of sum of exponential random variables (mean and variance) Assume $X_1,X_2, \dots , X_n$ following the exponential distribution with mean $\theta &gt; 0 $ and the statistic: $$ T = \sum\limits_{i = 1}^n X_i $$  I know that the sum of exponential random variables follows the Gamma distribution, but I cannot infer anything about the inverse of the sum $\frac{1}{T}$. My guess would be that: $$ E\left[\frac{1}{T}\right] = \frac{1}{\theta} \quad \text{and} \quad V\left[ \frac{1}{T} \right] = \frac{1}{\theta^2} $$ but why? Code: \documentclass[12pt]{article} \usepackage{pgfplots} \usepackage{float} \pgfplotsset{compat=1.17} \usepackage{tikz} \usetikzlibrary{shapes, arrows.meta, automata, positioning, matrix, calc} \usepackage[RPvoltages, american,siunitx]{circuitikz} \usepackage[margin=1in]{geometry}  \usepackage{steinmetz} \begin{document}         \begin{figure}[H]         \centering         \begin{circuitikz}             \draw(0,0) to[V = $\vec{V}_g$] ++(0, 3) to[R = 50 &lt;\ohm&gt;] ++(3, 0) to[C = 1&lt;\micro\farad&gt;, v = $\vec{V}_o$] ++(0, -3) to[short] ++(-3, 0);         \end{circuitikz}     \end{figure} \end{document}  Output:  As we can see, $\vec{V}_o$ is almost touching the capacitor. How to adjust the spacing for the voltage label? Actually, can  potentially solve the problem? Note that what I am trying to draw is based off of this: What should I do when my neural network doesn't generalize well? I'm training a neural network and the training loss decreases, but the validation loss doesn't, or it decreases much less than what I would expect, based on references or experiments with very similar architectures and data. How can I fix this?    As for question        to which this question is inspired, the question is intentionally left general so that other questions about how to reduce the generalization error of a neural network down to a level which has been proved to be attainable, can be closed as duplicates of this one.  See also dedicated thread on Meta: Are there difference between those sentences?        Alex is getting married next month.     Alex will get married next month.      Seems that the first one is expressed in present continues, and the second on in future tense. Am I correct? A contractive mapping on $M$ is a function $f$ from the metric space $(M,d)$ into itself satisfying $$d(f(x),f(y))&lt;d(x,y)$$ whenever $x,y\in M$ with $x\ne y$. Prove that if $f$ is a contractive mapping on a compact metric space $M$, there exists a unique point $x\in M$ with $f(x)=x$.   Consider the function $g(x)=d(f(x),x)$. Note that   \begin{align*}d(f(x),x)-d(f(y),y)&amp;\leq (d(x,y)+d(y,f(x))-(d(y,f(x)-d(f(x),f(y)) \\ &amp;=d(x,y)+d(f(x),f(y)) \\ &amp;&lt;2d(x,y)  \end{align*}  And similarly for $d(f(y),y)-d(f(x),x)$, so we have $|d(f(x),x)-d(f(y),y)|&lt;2d(x,y)$. This means $g(x)$ is continuous.  So $g(x)$ is a real-valued continuous function on a compact space, so must be bounded and has a minimum $c$, i.e. there exists $x_0$ such that $d(f(x_0),x_0)$ equals the minimum $c$. What then? From Stewart 7e pg 614 # 9  "One model for the spread of a rumor is that the rate of spread is proportional to the product of the fraction y of the population who have heard th eremor and the fraction who have not hear the rumor. a) Write a differential equation that is satisfied by y. b) Solve the differential equation c) A small town has 1000 inhabitants. At 8 am 80 people have heard a rumor. By noon half the town has heard it. At what will 90 percent of the population have heard the rumor? "  The wording of this is very ambiguous to me and I can't really make sense of it.  They mention a product, so I know that something is being multiplied and that y is a fraction which belongs to the population who have seen it so I think that "have not" heard is a constant, and that y is a fraction taht represents who have. I tried to set this up and it is the wrong answer. I am not sure what they want from that, the English usage is too ambiguous to make sense of it. The complete lack of punctuation is what really does it. If $F_n$ is the $n$-th fibonacci number, then prove that, $$F_n={n-1 \choose 0 }+{n-2 \choose 1 }+{n-3 \choose 2 }+\ldots$$  I tried the idea of using Pascal's triangle, but it seems to need some adjustment, so I am stuck, please help.    Any combinatorial argument would be of greater help than rigorous proof.  Thank you. Best way to track onchange as-you-type in input type="text"? In my experience, input type="text" onchange event usually occurs only after you leave (blur) the control.  Is there a way to force browser to trigger onchange every time textfield content changes? If not, what is the most elegant way to track this “manually”?  Using onkey* events is not reliable, since you can right-click the field and choose Paste, and this will change the field without any keyboard input.  Is setTimeout the only way?.. Ugly :-) Regression - How do I know if my residuals are normally distributed? How to find creation date of file? I want to find out the creation date of particular file, not modification date or access date.  I have tried with ls -ltrh and stat filename. Let $F:\mathbb{R^2}\rightarrow \mathbb{R}$ be a function, such as : $$F(x,y)=\begin{cases}        0 &amp; (x,y)=(0,0) \\       \frac{xy}{x^2+y^2} &amp; (x,y)\neq (0,0)    \end{cases}$$      Is $F$ differentiable at $(0,0)$?   My attempt :  Consider the limit, $\lim_{(x,y)\rightarrow (0,0)} F(x,y)$ along the line $y=x$. The limit equals to $\frac{1}{2}$. However, $F(0,0)=0$. Hence $F$ is not continuous at $(0,0)$ which implies that $F$ isn't differentiable as well.  Is this approach okay ?