# Tag Info

8

There are various ways a negative binomial distribution can come about. One of them, as Robert Long comments, is as a Poisson distribution whose parameter is itself Gamma distributed. The Wikipedia page gives the derivation of this result. So this covers parts (i) and (ii) of your model. This is an example of compound-distributions, which are often also ...

8

We'll denote $\mu_N = \text{E}(N)$, $\mu_X = \text{E}(X)$ and $\sigma_N^2 = \text{Var}(N)$. To find the covariance we can use the formula \begin{align} \text{Cov}(S, N) &= \text{E}(SN) - \text{E}(S) \text{E}(N) \\ &= \text{E}(SN) - \mu_N^2 \mu_X \end{align} where the second equality is found by taking an iterated expectation \begin{align} \text{...

7

You can find this using the Law of iterated expectation: $$\mathbb{E}[x] = \mathbb{E}_{\lambda}[\mathbb{E}_x[x|\lambda]]$$ where the subscripts denote what the expectation is taken with respect to. In your case, $\mathbb{E}_x[x|\lambda] = \lambda$, so, substituting, we obtain: $$\mathbb{E}[x] = \mathbb{E}_{\lambda}[\lambda]=\text{e}^{\mu+{\sigma^2 \... 7 The exponential distribution is a special case of the gamma distribution, so you have a Poisson-gamma compound-distribution (also known, confusingly, as a "mixture"). The resulting distribution is a negative binomial one - more specifically, a geometric distribution. Specifically, you have Z\sim\text{Pois}(\lambda), where 10\lambda\sim\text{Exp}(... 7 The negative binomial distribution is the Poisson-gamma mixture. Specifically, it can be established that:$$\text{NegBin} \bigg( t \bigg| n, \frac{1}{\theta+1} \bigg) = \int \limits_0^\infty \text{Pois}(t|\lambda) \ \text{Gamma}(\lambda|n, \theta) \ d \lambda.$$(In this statement the parameter \theta is the rate parameter of the gamma distribution.) ... 6 The variance calculation is incorrect. You must use the law of total variance:$$\operatorname{Var}[Z] = \operatorname{E}[\operatorname{Var}[Z \mid Y]] + \operatorname{Var}[\operatorname{E}[Z \mid Y]].$$The conditional variance and conditional expectation are equal since Z \mid Y is Poisson:$$\operatorname{Var}[Z \mid Y] = \operatorname{E}[Z \mid Y] = ...

5

It's unbiased. $$E\left[\frac{X}{\lambda}\right]=E\left[\frac{X}{N}\cdot\frac{N}{\lambda}\right]=E_N\left[E\left[\frac{X}{N}\cdot\frac{N}{\lambda}\middle| N\right] \right]$$ Now $$E\left[\frac{X}{N}\cdot\frac{N}{\lambda}\middle| N=n\right]=E\left[\frac{X}{n}\cdot\frac{n}{\lambda}\right]=\theta\frac{n}{\lambda}$$ So $$E\left[\frac{X}{\lambda}\right]=E_N[\... 5 For all y \ge 0 the value of the survival function of Y is$$S_Y(y\mid\theta) = \Pr(Y \gt y\mid \theta) = \exp(-y\theta)$$and, taking \beta to be a rate parameter for the Gamma distribution, the probability density function of \theta is proportional to$$f_\theta(t) \propto t^{r-1}\exp(-\beta t).$$Consequently the survival function of the ... 4 Wikipedia, under the "Examples" section, informs us that: Compounding an exponential distribution with its rate parameter distributed according to a gamma distribution yields a Lomax distribution [9]. The reference [9] is to Johnson, N. L.; Kotz, S.; Balakrishnan, N. (1994). "20 Pareto distributions". Continuous univariate distributions. 1 (2nd ed.). New ... 4 At the moment this is just a partial answer. I'm going to start by deriving the requirement for these two mixture forms to be equal. This will get you some of the way by at least showing the equation that your functions must solve. At the moment I can't see a full solution. We can see from the first mixture that the support of X is the non-negative ... 3 You can treat y as x z, where x and z are standard Gaussian variables. Thus y follows the Product Normal distribution. 3 So you assume a continuous mixture of Poisson distributions, say$$ X \mid \Lambda=\lambda \sim \mathcal{Pois}(\lambda),$$where \Lambda then has some distribution on the positive line. If we assume that \Lambda has a gamma distribution, results that X has a marginal negative binomial distribution. You asks what happens if \Lambda has a normal ... 3 Indeed the term compound is overloaded in statistics with both definitions. I prefer to describe the latter scenario as " a random sum of random variables" rather than a compound distribution and the former as a "continuous mixture" distribution but the term compound is also used and common for both. The only relationship between the two compound types I ... 3 I was missing the knowledge of the exponential series:$$ e^x=1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+\frac{x^4}{4!}+\cdots $$I also made a mistake when I separated the uniform in the expectation. Fixing these problems:$$ \begin{align} \mathbb{E}(e^{iuY_1})&=\sum_nP(N=n)\mathbb{E}(e^{iuY_1}\mid N=n)\\ &=\sum_nP(N=n)\prod_{j=1}^n\mathbb{E}(e^{iu\mathbb{1}...

2

Here's another approach that uses a common trick with characteristic functions to avoid having to work out the sums / integrals. I'll set $\lambda = 1$ without loss of generality, it simplifies notation and can be put back in in obvious ways in what follows. This means all the "$\lambda$"s below are not related to the $\lambda$ in the problem statement, ...

2

First, I will simplify your notation and let $Y = \sum_{i=1}^N D_i$ (with the understanding that the sum is zero if $N=0$.) The $D_i$ are iid geometric random variables and $N \sim \mathcal{Pois}(\lambda)$, independently of the $D_i$'s. This can be called a compound Poisson-geometric distribution, but is also known as the Polya-Aeppli distribution. You did ...

2

In some cases you can. A first example is $X|Y=y \sim N(y,1)$, that is, $f_X(x)$ is the convolution between $f_Y(y)$ and a standard normal density. The relationship between the characteristic functions of $X$ and $Y$ is then $$\varphi_X(t) = Ee^{itX} = EE(e^{itX}|Y)=E \varphi_{X|Y}(t)=Ee^{itY-t^2/2}=e^{-t^2/2}\varphi_Y(t).$$ Solving for $\varphi_Y(t)$ ...

2

You can use the law of total variance which is analogue to the double expectation theorem. If we have $$\DeclareMathOperator{\E}{\mathbb{E}} N \mid \Lambda=\lambda \sim \mathcal{Po}(\lambda) \\ \Lambda \sim \mathcal{logNormal}(\mu,\sigma^2)$$ we find using lognormal properties $$\E N=\E \left[ \E N\mid \Lambda\right] =\E \Lambda =e^{\mu+\sigma^2/2}... 2 I'm not really answering your question, but I think you can perform the Latin hypercube sampling quickly, and it does decrease your sampling error for many target metrics. Here is how I would perform the sampling in R: require(lhs) set.seed(1980) N <- 10000 k <- 40 # N and Y_i X <- randomLHS(N, k) Y <- X Y[,1] <- qpois(X[,1], 4) # check ... 2 This is a classic problem that arises in empirical Bayes theory. The problem of estimating g non-parametrically for a Poisson mixture was considered in the very first paper that coined the term "empirical Bayes": Robbins, Herbert. An empirical Bayes approach to statistics. Proceedings of the Third Berkeley Symposium on Mathematical Statistics and ... 2 Let$$ M_\theta(z)=E e^{z\theta} $$denote the moment generating function of \theta. Since X|\theta\sim \operatorname{Poisson}(\theta), the probability generating function (pgf) of X|\theta is$$ G_{X|\theta}(z)=Ez^X|\theta = e^{\theta(z-1)}. $$Hence, using the law of total expectation, the pgf of X is$$ G_X(z)=Ez^X=E(Ez^X|\theta)=Ee^{\theta(z-1)} ...

2

This follows from some fairly standard distribution theory. Define $Y_1 \sim \text{Poisson}(\pi \lambda)$ and $Y_2 \sim \text{Poisson}((1-\pi) \lambda)$ independently, and let $Y = Y_1 + Y_2$ and $Z = Y_1$. Then the following facts are quickly derived: $Y \sim \text{Poisson}(\lambda)$ (can be checked by computing the moment generating function). $[Z \mid Y ... 1 The second idea is the right one. I've already used it. 1 Its a bit of algebra, but here is my try The expression of the density after you pull out the terms not involving$y$are $$p(z) = \pi^z \exp(\lambda) \sum_{z \leq y} \binom{y}{z} (1-\pi)^{y-z} \dfrac{\lambda^y}{y!}$$ The$y!$cancels from the binomial coefficient $$= \pi^z \dfrac{\exp(\lambda)}{z!} \sum_{{z \leq y}} (1-\pi)^{y-z} \dfrac{\lambda^y}{(y-z)!... 1$$p(y=k) = \int_0^1 p(y=k|x)p(x)dx = \binom ny \int_0^1 x^y (1-x)^{n-y} dx.$$Since y and n are integers, we know via standard properties of the Beta function that B(\alpha, \gamma) = \int_0^1 t^{\alpha-1} (1-t)^{\gamma-1} dt = \frac{\alpha!\gamma!}{(\alpha+\gamma-1)!}. Then by letting \alpha = y + 1 and \gamma = n-y+1 we deduce that$$ \binom ny \... 1 Regarding your questions: I think there is a confusion: it does not really make sense to ask if the MLE is a "good way" to estimate$\theta$. As its name suggests, the MLE is your best estimate of$\theta$that maximizes the likelihood of your observation, so yes, it is pretty good ^^ But a more relevant question is how to obtain your MLE. Given that you ... 1 Your error is that you use precisely the same$42$probabilities (coins) in each of the$2^{20}$simulations, and so lose the element of sample variance which would come from these varying You would get the Beta-Binomial distribution if you chose new probabilities each time, for example putting coins = np.random.beta(alpha, beta, size=N) inside the for ... 1 Normal approximation One approach is to use a normal approximation by matching the moments. The compound Poisson distribution is a mixture distribution of Poisson distributions with weights distributed according to a binomial distribution$w_i = P_{binom}(i\vert n,p)$$$P(x) = \sum_{i=0}^n w_iP_{Poisson}(x\vert \lambda = i )$$ The mean of the distribution ... 1 The formulas you have given can be used to construct moment estimators. But you can also use maximum likelihood estimation in the marginal negative binomial distribution. The variance of the gamma distribution is a function of the negbin parameters, so just use the same function on the maximum likelihood estimates of$r,p\$ to get the maximum likelihood ...

Only top voted, non community-wiki answers of a minimum length are eligible