If $p<1$ and $X$ is a random variable distributed according to the geometric distribution $P(X = k) = p (1-p)^{k-1}$ for all $k\in \mathbb{N}$, then it is easy to show that $E(X) = \frac 1p$, $\mathop{Var}(X)=\frac{1-p}{p^2}$ and $E(X^2) = \frac{2-p}{p^2}$.

Now consider a "conditional" geometric distribution, defined as follows (if there is standard terminology for this, let me know and I'll call it that):

- Fix a set $J\subset \mathbb{N}$ and a number $\mu>0$ (this will eventually be large).
- Let $P(X=k) = C \gamma^k$ if $k\in J$ and $P(X=k)=0$ otherwise, where $C>0$ and $\gamma<1$ are chosen so that probabilities sum to $1$ and $E(X) = \mu$.

I'm trying to understand how $E(X^2)$ (or equivalently, $\mathop{Var}(X)$) depends on $J$ and $\mu$. In the case where $J=\mathbb{N}$ the standard results show that $p=\frac 1\mu$ and so $E(X^2) = \mu^2(2-\frac 1\mu)$. I'm interested in the case where $\mu$ becomes very large and would like to obtain a similar estimate $E(X^2) \approx A\mu^2$, for some constant $A>1$, in a more general setting.

The example I'm working with at the moment is $J= \{2^n \mid n\in \mathbb{N}\}$, but ideally I'd like some conditions on the set $J$ that would guarantee an estimate of the above form.

Is there a standard name for these distributions, or a reference where I can read more about them? Are estimates of this form known?

**Edit:** As Brendan McKay pointed out below, this boils down to understanding the behaviour of the function $g(\gamma) = \sum_{j\in J} \gamma^j$, and in fact the issue that motivated the question I posed can be stated more directly in terms of this function.

The condition $E(X) = \mu$ is equivalent to the equation $\mu = \gamma g'(\gamma) / g(\gamma)$, which determines $\gamma$ implicitly as a function of $\mu$. We would like to understand how $g(\gamma)$ grows as $\mu\to\infty$, and hence $\gamma\to 1$. (In particular, this means we're really interested in the case where $J$ is infinite.)

In the case $J=\mathbb{N}$, one has $g(\gamma) = \frac\gamma{1-\gamma} = 1 - \frac 1{1-\gamma}$, and so $\mu = \gamma (\frac{\gamma}{(1-\gamma)^2}) (\frac{1-\gamma}\gamma) = \frac{\gamma}{1-\gamma}$, so that in fact $g(\gamma(\mu)) = \mu$ and the two quantities go to infinity together.

In the more general case a reasonably simple argument shows that $\lim_{\mu\to\infty} g(\gamma(\mu)) = \infty$ provided $J$ is infinite, but it's not at all clear to me how the rate at which $g$ grows (in terms of $\mu$) depends on $J$ for more general sets.

That's the original motivation -- after some messing around we decided that we could figure out the growth rate if we knew something about $E(X^2)$ as suggested above, and since it was phrased in terms of what seemed to be a reasonably natural probability distribution, we decided to ask it in that form. But now you have the whole story...