Questions tagged [gamma-distribution]

A non-negative continuous probability distribution indexed by two strictly positive parameters.

Filter by
Sorted by
Tagged with
49 votes
5 answers
30k views

Generic sum of Gamma random variables

I have read that the sum of Gamma random variables with the same scale parameter is another Gamma random variable. I've also seen the paper by Moschopoulos describing a method for the summation of a ...
user avatar
  • 1,067
25 votes
1 answer
8k views

Construction of Dirichlet distribution with Gamma distribution

Let $X_1,\dots,X_{k+1}$ be mutually independent random variables, each having a gamma distribution with parameters $\alpha_i,i=1,2,\dots,k+1$ show that $Y_i=\frac{X_i}{X_1+\cdots+X_{k+1}},i=1,\dots,k$,...
user avatar
  • 2,010
52 votes
3 answers
20k views

Which has the heavier tail, lognormal or gamma?

(This is based on a question that just came to me via email; I've added some context from a previous brief conversation with the same person.) Last year I was told that the gamma distribution is ...
user avatar
  • 262k
41 votes
4 answers
16k views

Good methods for density plots of non-negative variables in R?

plot(density(rexp(100)) Obviously all density to the left of zero represents bias. I'm looking to summarize some data for non-statisticians, and I want to avoid ...
user avatar
  • 12.3k
122 votes
4 answers
113k views

When to use gamma GLMs?

The gamma distribution can take on a pretty wide range of shapes, and given the link between the mean and the variance through its two parameters, it seems suited to dealing with heteroskedasticity in ...
user avatar
  • 12.3k
61 votes
4 answers
37k views

Choosing between LM and GLM for a log-transformed response variable

I'm trying to understand the philosophy behind using a Generalized Linear Model (GLM) vs a Linear Model (LM). I've created an example data set below where: $$\log(y) = x + \varepsilon $$ The ...
user avatar
34 votes
7 answers
60k views

Real-life examples of common distributions

I am a grad student developing an interest for statistics. I like the material over-all, but I sometimes have a hard time thinking about applications to real life. Specifically, my question is about ...
2 votes
1 answer
10k views

What to do with GLM (Gamma) when residuals are not normally distributed?

Until now I have only done very basic/simple simple stats, but now I got stuck in all the literature/tips/forums ... It's about the following problem: I have the following data: ...
user avatar
  • 123
15 votes
3 answers
13k views

Difference of Gamma random variables

Given two independent random variables $X\sim \mathrm{Gamma}(\alpha_X,\beta_X)$ and $Y\sim \mathrm{Gamma}(\alpha_Y,\beta_Y)$, what is the distribution of the difference, i.e. $D=X-Y$? If the result ...
user avatar
  • 307
18 votes
1 answer
72k views

Relationship between gamma and chi-squared distribution

If $$Y=\sum_{i=1}^{N}X_i^2$$ where $X_i \sim \mathcal{N}(0,\sigma^2)$, i.e. all $X_i$ are i.i.d. normal random variables of zero mean with same variances, then $$Y \sim \Gamma\left(\frac{N}{2},2\sigma^...
user avatar
  • 687
24 votes
2 answers
47k views

How to interpret parameters in GLM with family=Gamma

I have a question regarding parameter interpretation for a GLM with a gamma distributed dependent variable. This is what R returns for my GLM with a log-link: ...
user avatar
33 votes
3 answers
69k views

The relationship between the gamma distribution and the normal distribution

I recently found it necessary to derive a pdf for the square of a normal random variable with mean 0. For whatever reason, I chose not to normalise the variance beforehand. If I did this correctly ...
user avatar
  • 433
6 votes
1 answer
2k views

How do gamma distributions add and what would that model?

Density distributions add by convolution, and the result is also a density distribution. So writing this in the time domain, w.l.o.g., the question becomes how do we take a faster gamma distribution: ...
user avatar
  • 11.9k
5 votes
2 answers
9k views

Expected Value of Gamma Distribution

If $X \sim \text{Gamma}(\alpha,\beta)$, how would I go about finding $E\left(\frac 1{X^2}\right)$?
user avatar
  • 51
2 votes
1 answer
8k views

sampling from a mixture of two Gamma distributions

Assuming that all the mixture parameters are known, how can one sample from a mixture of $\texttt{Gamma}(\alpha,\beta)$ distributions: $$\theta \sim \pi \texttt{Gamma}(\alpha_1,\beta_1)+(1-\pi)\texttt{...
user avatar
  • 1,072
45 votes
2 answers
27k views

Gamma vs. lognormal distributions

I have an experimentally observed distribution that looks very similar to a gamma or lognormal distribution. I've read that the lognormal distribution is the maximum entropy probability distribution ...
user avatar
  • 1,067
27 votes
3 answers
165k views

Sum of exponential random variables follows Gamma, confused by the parameters

I've learned sum of exponential random variables follows Gamma distribution. But everywhere I read the parametrization is different. For instance, Wiki describes the relationship, but don't say what ...
user avatar
  • 273
4 votes
3 answers
6k views

What are the assumptions of a Gamma GLM or GLMM for hypothesis testing?

What are the assumptions when doing hypothesis testing using a Gamma GLM or GLMM? Are the residuals suppose to be normally distributed and is heteroscedasticity a concern like the Gaussian (normal) ...
user avatar
4 votes
2 answers
9k views

Is my data gamma distributed?

I have some data which looks like this when I plot a normalized histogram. The full data set is available here and here (the second link is pastebin). It is 20,000 lines long. My guess is that it ...
user avatar
  • 1,889
8 votes
2 answers
1k views

What is the convolution of a normal distribution with a gamma distribution?

Is there a closed form expression for the convolution of a normal distribution (ND) with a gamma distribution (GD)? There does not seem to be a direct method of solving this convolution.
user avatar
  • 11.9k
5 votes
2 answers
464 views

What is the best point forecast for gamma distributed data?

I believe that the values I am forecasting are gamma distributed with shape $k>0$ and scale $\theta>0$. I need a point forecast (i.e., a one-number summary) that minimizes the expected error. ...
user avatar
15 votes
2 answers
22k views

How to test whether a sample of data fits the family of Gamma distribution?

I have a sample of data which was generated from a continuous random variable X. And from the histogram I draw using R, I guess that maybe the distribution of X obeys a certain Gamma distribution. But ...
user avatar
  • 151
17 votes
3 answers
32k views

The sum of two independent gamma random variables

According to the Wikipedia article on the Gamma distribution: If $X\sim\mathrm{Gamma}(a,\theta)$ and $Y\sim\mathrm{Gamma}(b,\theta)$, where $X$ and $Y$ are independent random variables, then $X+Y\sim ...
user avatar
  • 173
6 votes
1 answer
17k views

Expected value of Y = (1/X) where $X \sim Gamma$

I'm having some confusion over this statement here. Let $T_i \sim Exp(\lambda + \theta)$ and if they are all iid then $\sum_n T_i \sim Gamma(\alpha = n, \beta = 1/(\lambda + \theta))$ I want to find $...
user avatar
  • 303
7 votes
1 answer
6k views

Probability Interval for Gamma Distribution

There is something that I am doing wrong in the exercise below and I would appreciate some help figuring it out. Let $X_1, X_2, \ldots, X_5$ be a random sample from a $\Gamma \left(3,3 \right)$ ...
user avatar
  • 18.7k
18 votes
1 answer
25k views

Log-linked Gamma GLM vs log-linked Gaussian GLM vs log-transformed LM

From my results, it appears that GLM Gamma meets most assumptions, but is it a worthwhile improvement over the log-transformed LM? Most literature I've found deals with Poisson or Binomial GLMs. I ...
user avatar
  • 948
21 votes
2 answers
75k views

Using R for GLM with Gamma distribution

I currently have a problem understanding the syntax for R for fitting a GLM using the Gamma distribution. I have a set of data, where each row contains 3 co-variates ($X_1, X_2, X_3$), a response ...
user avatar
  • 565
23 votes
1 answer
19k views

Weibull Distribution v/s Gamma Distribution

What is the difference between the intuition behind Gamma and Weibull distributions? Is there any relationship between the two densities ? Kindly help.
user avatar
  • 591
20 votes
3 answers
1k views

How to sample from $c^a d^{a-1} / \Gamma(a)$?

I want to sample according to a density $$ f(a) \propto \frac{c^a d^{a-1}}{\Gamma(a)} 1_{(1,\infty)}(a) $$ where $c$ and $d$ are strictly positive. (Motivation: This could be useful for Gibbs ...
user avatar
  • 828
8 votes
1 answer
4k views

How to derive Poisson distribution from gamma distribution?

Let $T_1, T_2, \dots$ be iid sequence of exponential random variables with parameter $\lambda$. The sum $S_n = T_1 + T_2 + \dots + T_n$ is a Gamma distribution. Now as I understand the Poisson ...
user avatar
  • 2,409
5 votes
1 answer
2k views

Square root of an inverse gamma distributed random variable

I work on the grouped t copula and try to replicate part of the following paper: "The t copula with Multiple Parameters of Degrees of Freedom: Bivariate Characteristics and Application to Risk ...
user avatar
  • 53
4 votes
1 answer
3k views

Analysis of variance with Weibull or Gamma distributions

I have been trying to find a method to analyse variance on Weibull and/or Gamma distributions but a Google search for anovar Weibull "gamma distribution" yields ...
user avatar
13 votes
2 answers
2k views

How to quickly sample X if exp(X) ~ Gamma?

I have a simple sampling problem, where my inner loop looks like: v = sample_gamma(k, a) where sample_gamma samples from the ...
user avatar
  • 750
5 votes
2 answers
1k views

What is the distribution of the ratio between independent Beta and Gamma random variables?

What would be the distribution of the following equation: $$y = \frac{a}{(a+d)^2}$$ where $a, d$ $\sim$ $\Gamma(M,c)$. Additionally, $a$ and $d$ are independent random variables.
user avatar
3 votes
1 answer
2k views

Is the canonical parameter (and therefore the canonical link function) for a Gamma not unique?

Consider $Y_1, \dots, Y_n$ independent from the Gamma distribution. For $y > 0$: $$\begin{align} f(y \mid \alpha, \beta) &= \dfrac{1}{\beta^{\alpha}\Gamma(\alpha)}y^{\alpha-1}e^{-y/\beta} \\ &...
user avatar
  • 3,973
3 votes
0 answers
2k views

Is there a distribution appropriate for a continuous variable skewed toward zero and able to include zero?

I am interested in modelling the impact of some environmental parameters on a concentration of measured phytoplankton pigment. The concentration of pigment is skewed so that low concentrations are ...
user avatar
9 votes
1 answer
5k views

Maximum Likelihood Estimation of Inverse Gamma Distribution in R or RPy

I am trying to fit a three parameter inverse gamma distribution to my data in either R or Python. I would like to do this using maximum likelihood estimation (MLE). The pdf of the three parameter ...
user avatar
  • 137
2 votes
2 answers
3k views

Calculate posterior distribution (gamma-prior, poisson-likelihood)

I want to calculate the posterior distribution given a gamma-prior and a poisson likelihood. The task is from a textbook and I just have the solutions (without a walkthrough). Please find all given ...
user avatar
  • 37
20 votes
2 answers
9k views

Which diagnostics can validate the use of a particular family of GLM?

This seems so elementary, but I always get stuck at this point… Most of the data I deal with are non-normal, and most of the analyses based on a GLM structure. For my current analysis, I have a ...
user avatar
  • 341
19 votes
2 answers
9k views

What is the expected value of the logarithm of Gamma distribution?

If the expected value of $\mathsf{Gamma}(\alpha, \beta)$ is $\frac{\alpha}{\beta}$, what is the expected value of $\log(\mathsf{Gamma}(\alpha, \beta))$? Can it be calculated analytically? The ...
user avatar
14 votes
2 answers
10k views

Proper use and interpretation of zero-inflated gamma models

Background: I am a biostatistician presently wrestling with a dataset of cellular expression rates. The study exposed a host of cells, collected in groups from various donors, to certain peptides. ...
user avatar
7 votes
1 answer
24k views

Confidence Interval for a Random Sample Selected from Gamma Distribution

Working on a homework question and having some trouble... Any help would be greatly appreciated. Based on a sample 1.23, 0.36, 2.13, 0.91, 0.16, 0.12 from the GAM$(2,\theta)$ distribution, find an ...
user avatar
  • 315
7 votes
1 answer
3k views

Deviance for Gamma GLM

I was wondering why the Gamma deviance formula is given as: $$2 \sum [ -log(\frac{y_i}{\mu_i}) + \frac{y_i-\mu_i}{\mu_i} ] $$ Shouldn't the 2nd term become zero after the summation is conducted?
user avatar
16 votes
1 answer
1k views

What is the expected value of modified Dirichlet distribution? (integration problem)

It is easy to produce a random variable with Dirichlet distribution using Gamma variables with the same scale parameter. If: $ X_i \sim \text{Gamma}(\alpha_i, \beta) $ Then: $ \left(\frac{X_1}{\...
user avatar
  • 1,332
4 votes
1 answer
11k views

Does my data come from a gamma or beta distribution? [closed]

I have data and I want to ascertain whether it is beta or gamma distribution. Once I know what the distribution is, how do I find out what the parameters are?
user avatar
  • 87
17 votes
2 answers
6k views

Kullback–Leibler divergence between two gamma distributions

Choosing to parameterize the gamma distribution $\Gamma(b,c)$ by the pdf $g(x;b,c) = \frac{1}{\Gamma(c)}\frac{x^{c-1}}{b^c}e^{-x/b}$ The Kullback-Leibler divergence between $\Gamma(b_q,c_q)$ and $\...
user avatar
16 votes
2 answers
2k views

Skewness of the logarithm of a gamma random variable

Consider gamma random variable $X\sim\Gamma(\alpha, \theta)$. There are neat formulas for the mean, variance, and skewness: \begin{align} \mathbb E[X]&=\alpha\theta\\ \operatorname{Var}[X]&=\...
user avatar
  • 95.7k
10 votes
3 answers
466 views

Independence of statistics from gamma distribution

Let $X_1,...,X_n$ be a random sample from the gamma distribution $\mathrm{Gamma}\left(\alpha,\beta\right)$. Let $\bar{X}$ and $S^2$ be the sample mean and sample variance, respectively. Then prove ...
user avatar
6 votes
3 answers
1k views

Predicting with a GLM

I wanted to check my understanding of predicting with a GLM: A binomial/logistic regression model predicts the binomial parameter = p = P(success). To convert the probability into classes, we have to ...
user avatar
  • 185
5 votes
1 answer
1k views

Conditional Density of an Exponential Given Gamma

Suppose $X, Y$ are iid. $\exp(2)$. Let $T$ = $X + Y$. Find $f_x (x | T = t)$. This is a problem from a practice exam. I know that $T\sim\mathrm{Gamma}(2, 2)$ since $T$ is a sum of 2 independent ...
user avatar
  • 151