Questions tagged [gamma-distribution]

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

Filter by
Sorted by
Tagged with
32
votes
4answers
16k 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 ...
16
votes
1answer
4k 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$,...
36
votes
4answers
11k 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 ...
41
votes
3answers
13k 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 ...
84
votes
4answers
68k 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 ...
28
votes
5answers
48k 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 ...
54
votes
4answers
32k 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 ...
10
votes
2answers
7k 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 ...
12
votes
1answer
49k 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^...
29
votes
2answers
16k 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 ...
3
votes
2answers
3k 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 ...
1
vote
1answer
4k 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{...
21
votes
2answers
31k 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: ...
13
votes
2answers
18k 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 ...
2
votes
1answer
4k 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: x <- test results ...
17
votes
3answers
111k 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 ...
13
votes
1answer
12k 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.
19
votes
3answers
838 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 ...
12
votes
3answers
17k 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 ...
7
votes
1answer
197 views

MLE of $f(x;\alpha,\theta)=\frac{e^{-x/\theta}}{\theta^{\alpha}\Gamma(\alpha)}x^{\alpha-1}$

Let $X_{1},X_{2},X_{3},...,X_{n}$ be a random sample from a distribution with pdf $$f(x;\alpha,\theta)=\frac{e^{-x/\theta}}{\theta^{\alpha}\Gamma(\alpha)}x^{\alpha-1}I_{(0,\infty)}(x ),\alpha,\theta&...
4
votes
1answer
2k 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 ...
12
votes
2answers
1k 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 ...
8
votes
1answer
4k 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 ...
2
votes
0answers
1k 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 ...
6
votes
1answer
3k 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)$ ...
5
votes
2answers
616 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.
24
votes
3answers
37k 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 ...
12
votes
1answer
12k 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 ...
19
votes
2answers
8k 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 ...
9
votes
1answer
24k views

How to draw fitted graph and actual graph of gamma distribution in one plot?

Load the package needed. library(ggplot2) library(MASS) Generate 10,000 numbers fitted to gamma distribution. ...
11
votes
2answers
42k 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 ...
4
votes
1answer
9k 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?
14
votes
2answers
4k 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 $\...
11
votes
2answers
6k 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. ...
5
votes
1answer
852 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: ...
3
votes
1answer
8k 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 $...
16
votes
2answers
1k 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]&=\...
8
votes
1answer
3k 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 ...
4
votes
1answer
663 views

Ratio of Gamma distributed variables with different parameters

I encounter a problem which I thought I can handle, however, I struggle a lot with finding a solution: The following setting applies: I want to compute the posterior probability of an event, which is ...
4
votes
1answer
389 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.
3
votes
2answers
249 views

Expectation of the ratio between Beta and Gamma random variables

Given \begin{equation}\label{eq:definition_of_z} \begin{split} \textbf{Z} = \left[\begin{array}{cccc} {z}_{11} & {z}_{12} & \cdots & {z}_{1P} \\ {z}_{21} & {z}_{22} & \cdots & {...
2
votes
1answer
288 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} \\ &...
2
votes
1answer
4k views

Test if two gamma distributed populations are different

I have data from two populations of different sizes. Both have Gamma distributions with different shapes and scales (as estimated in R): ...
5
votes
1answer
1k views

How do you estimate the predicted probability of an integer value from a negative binomial regression equation?

I'm trying to estimate the predicted probabilities of an observation being a particular integer, $y$, after a negative binomial regression model. Long's Regression models for categorical and limited ...
4
votes
3answers
775 views

Hypothesis test for correlation between Gamma random variables

I have two Gamma random variables. I need a hypothesis test to detect a possible correlation between them.
4
votes
0answers
2k views

Neyman-Pearson lemma: critical region and hypothesis testing

Let $X_1,X_2,...,X_n$ be i.i.d r.v's with common p.d.f. $$ \mbox f(x)=\frac{x^5e^{-x/\theta}}{5!\theta^6} $$ where $\theta$ > 0. Show that the Neyman-Pearson lemma produces a test of $H_0: \...
4
votes
1answer
84 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. ...
4
votes
2answers
4k views

Expected Value of Gamma Distribution

If X~Gamma(Alpha,Beta), how would I go about finding E[1/X^2]?
16
votes
3answers
9k views

Poisson is to exponential as Gamma-Poisson is to what?

A Poisson distribution can measure events per unit time, and the parameter is $\lambda$. The exponential distribution measures the time until next event, with the parameter $\frac{1}{\lambda}$. One ...
7
votes
2answers
7k views

How to use the SD of a normal sampling distribution to specify the gamma prior for the corresponding precision?

The gamma distribution is a commonly used prior distribution for the precision ($1/sd^2$) of a normal distribution in Bayesian hierarchical modeling. I want to use an informed prior for the variance ...