Questions tagged [gamma-distribution]

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

Filter by
Sorted by
Tagged with
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
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
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
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
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
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 ...
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
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
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
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
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
23 votes
1 answer
12k views

Is it possible to understand pareto/nbd model conceptually?

I am learning to use BTYD package that uses Pareto/NBD model to predict when will be a customer is expected to be back. However, all literature on this model is full of mathematics and there does not ...
user avatar
22 votes
2 answers
29k views

Estimating gamma distribution parameters using sample mean and std

I'm trying to estimate the parameters of a gamma distribution that fits best to my data sample. I only want to use the mean, std (and hence variance) from the data sample, not the actual values - ...
user avatar
  • 323
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
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
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
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
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
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
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
16 votes
3 answers
10k 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 ...
user avatar
  • 3,363
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
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
15 votes
1 answer
2k views

Why would they pick a gamma distribution here?

In one of the exercises for my course, we're using a Kaggle medical dataset. The exercise says: we want to model the distribution of individual charges and we also really want to be able to ...
user avatar
  • 297
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
15 votes
2 answers
14k views

Distribution for percentage data

I have a question about the correct distribution to use for creating a model with my data. I conducted a forest inventory with 50 plots, each plot measures 20m × 50m. For each plot, I estimated the ...
user avatar
  • 151
15 votes
1 answer
1k views

What is the intuition behind the expected transaction value for a customer in the gamma-gamma model?

Background and Motivation: I was reading the paper RFM and CLV: Using Iso-Value Curves for Customer Base Analysis by Peter S. Fader, Bruce G. S. Hardie and Ka Lok Lee, in an attempt to gain some ...
user avatar
14 votes
3 answers
5k views

Do test scores really follow a normal distribution?

I've been trying to learn which distributions to use in GLMs, and I'm a little fuzzled on when to use the normal distribution. In one part of my textbook, it says that a normal distribution could be ...
user avatar
14 votes
2 answers
43k 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. ...
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
14 votes
1 answer
4k views

Hyperprior density for hierarchical Gamma-Poisson model

In a hierarchical model of data $y$ where $$y \sim \textrm{Poisson}(\lambda)$$ $$\lambda \sim \textrm{Gamma}(\alpha, \beta)$$ it appears to be typical in practice to chose values ($\alpha, \beta)$ ...
user avatar
  • 80.3k
13 votes
2 answers
15k views

distribution of the ratio of two gamma random variables [duplicate]

Assume that $X \sim Ga(\alpha_1, \beta_1)$ and $Y \sim Ga(\alpha_2, \beta_2)$. Define $Z= X/Y$. What 's the distribution of $Z$?
user avatar
  • 1,324
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
13 votes
1 answer
9k views

Density of Y = log(X) for Gamma-distributed X

This question is closely related to this post Suppose I have a random variable $X \sim \text{Gamma}(k, \theta)$, and I define $Y = \log(X)$. I would like to find the probability density function of $...
user avatar
12 votes
3 answers
2k views

How do you calculate the expectation of $\left(\sum_{i=1}^n {X_i} \right)^2$?

If $X_i$ is exponentially distributed $(i=1,...,n)$ with parameter $\lambda$ and $X_i$'s are mutually independent, what is the expectation of $$ \left(\sum_{i=1}^n {X_i} \right)^2$$ in terms of $n$ ...
user avatar
  • 973
12 votes
2 answers
8k views

The identity link function does not respect the domain of the Gamma family?

I am using using a gamma generalized linear model (GLM) with an identity link. The independent variable is the compensation of a particular group. Python's statsmodels summary is giving me a warning ...
user avatar
  • 324
12 votes
1 answer
234 views

Name for a distribution between exponential and gamma?

The density $$f(s)\propto \frac{s}{s+\alpha}e^{-s},\quad s > 0$$ where $\alpha \ge 0$ is a parameter, lives between the exponential ($\alpha=0$) and $\Gamma(2,1)$ ($\alpha \to \infty$) ...
user avatar
  • 776
11 votes
2 answers
6k views

Expectation of a squared Gamma

If a Gamma distribution is parameterized with $\alpha$ and $\beta$, then: $$ E(\Gamma(\alpha, \beta)) = \frac{\alpha}{\beta} $$ I would like to calculate the expectation of a squared Gamma, that is: ...
user avatar
  • 2,023
11 votes
2 answers
784 views

What kind of distribution does this have?

Currently I'm trying to figure out the distribution of the following: $X \sim \frac{\sqrt{n}}{\sqrt{Gamma(n,\beta)}}$ where the denominator follows a $Gamma(n,\beta)$ distribution. I've checked out ...
user avatar
11 votes
2 answers
40k views

What are the mean and variance for the Gamma distribution?

There are two forms for the Gamma distribution, each with different definitions for the shape and scale parameters. Rather than asking what the form is used for the gsl_ran_gamma implementation, it's ...
user avatar
  • 886
11 votes
2 answers
27k views

Need help calculating poisson posterior distribution given prior

I have been attempting to figure this out for hours, but gamma distribution is somehow beyond me. I have a question where we are given α=5 and ...
user avatar
  • 213
11 votes
0 answers
3k views

How do I identify the "Long Tail" portion of my distribution?

I have a number of series that would typically be described as normal skewed or Gamma distributed. For example, say I have a group of customers and have calculated their spend over a fixed length of ...
user avatar
  • 111
10 votes
7 answers
2k views

What distributions have an undefined mean but are not symmetric?

What distributions have an undefined mean but are not symmetric? I'm looking for a probability distribution function (and CDF) for which the mean is undefined, but not symmetric like Cauchy, but a ...
user avatar
  • 203
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
10 votes
1 answer
1k views

Intuitive way to connect gamma and chi-squared distributions [duplicate]

I understand that a chi-squared distribution is a special case of the gamma distribution. However, I find claims of "the math just works out" to be an unhelpful in remembering or ...
user avatar
  • 253
9 votes
4 answers
1k views

How to create a markov chain with gamma marginal distribution and AR(1) coefficient of $\rho$

I want to generate a synthetic time series. The time series needs to be a markov chain with a gamma marginal distribution and an AR(1) parameter of $\rho$. Can I do this by simply using a gamma ...
user avatar
9 votes
1 answer
1k views

What's the practical meaning of alpha in a GLM with gamma family?

I am fitting several models of the form.. glm(DV ~ I(1/IV), family = Gamma(link = "log") .. and am looking for ways to compare the models obtained for different ...
user avatar

1
2 3 4 5
17