Questions tagged [gamma-distribution]

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

Filter by
Sorted by
Tagged with
94
votes
4answers
77k 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 ...
56
votes
4answers
33k 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 ...
41
votes
3answers
14k 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 ...
39
votes
4answers
18k 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 ...
38
votes
4answers
12k 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 ...
30
votes
2answers
18k 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 ...
29
votes
5answers
51k 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 ...
26
votes
3answers
44k 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 ...
21
votes
2answers
35k 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: ...
19
votes
3answers
903 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 ...
19
votes
1answer
5k 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$,...
19
votes
3answers
124k 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 ...
19
votes
2answers
18k 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 - ...
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 ...
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]&=\...
16
votes
1answer
14k 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.
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 ...
15
votes
2answers
5k 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 $\...
15
votes
1answer
54k 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^...
14
votes
1answer
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 ...
14
votes
3answers
3k 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 ...
14
votes
2answers
48k 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 ...
14
votes
1answer
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}{\...
13
votes
3answers
20k 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 ...
13
votes
1answer
15k 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 ...
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 ...
12
votes
3answers
901 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$ ...
12
votes
2answers
3k 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 ...
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 ...
12
votes
1answer
6k 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 ...
12
votes
1answer
8k 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 $...
12
votes
0answers
708 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 ...
11
votes
2answers
3k 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: ...
11
votes
2answers
10k 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 ...
11
votes
2answers
7k 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. ...
11
votes
1answer
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)$ ...
10
votes
2answers
8k 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 ...
10
votes
2answers
7k 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$?
10
votes
1answer
30k 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. ...
10
votes
1answer
190 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$) ...
9
votes
1answer
697 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 ...
9
votes
2answers
3k 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 ...
9
votes
3answers
206 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 ...
9
votes
1answer
595 views

Is there another interpretation for a Gamma distribution with non-integer shape parameter?

It is well known that a random variable being Gamma distributed with integer shape parameter $k$ is equivalent to the sum of the squares of $k$ normally distributed random variables. But what can I ...
9
votes
0answers
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 ...
8
votes
2answers
32k 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 ...
8
votes
2answers
6k views

How to Transform a Folded Normal Distribution into a Gamma Distribution?

Let the random variable $X$ have the folded Normal pdf $$f(x)=\frac{2}{\sqrt{2\pi}}e^{\frac{-x^2}{2}}$$ with $0\lt x \lt \infty$. What is the transformation $g(X)=Y$ and values of $\alpha$ and $\...
8
votes
3answers
2k views

PDF of sum of truncated exponential distribution

Let $x_i$ represent samples from a Truncated Exponential distribution between $0$ and $1$, with rate parameter $\lambda$. Defining $\tilde x = \dfrac{\sum_{i=1}^{n}x_i}{n}$ What is the PDF of $\...
8
votes
2answers
19k 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 ...
8
votes
4answers
812 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 ...

1
2 3 4 5
13