Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [gamma-distribution]

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

Filter by
Sorted by
Tagged with
8
votes
2answers
6k 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$?
0
votes
0answers
268 views

Calculate log-odds posterior distribution

Given a gamma-posterior distribution $p(\theta|y)$ I want to compute the posterior distribution for the log-odds: $log\frac{\theta}{1-\theta}$ I tried to solve it with the change of variables (...
2
votes
2answers
2k 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 ...
0
votes
1answer
1k views

Gamma distribution with shape and scale parameter related to its skewness [closed]

I have two set of gamma distribution . standard deviation is related to its population mean Given unequal standard deviation, how do I make sure the population mean is equal (null hypothesis is ...
1
vote
1answer
1k views

P.d.f for Gamma posterior with Exponential data

I am trying to perform a simple exercise: Sample $N$ points from $\text{Exponential}(\lambda=0.1)$ Assume a $\text{Gamma}(\alpha,\beta)$ prior for the parameter $\lambda$ above Build a p.d.f for the ...
4
votes
0answers
956 views

Distribution for Sum of Square Normal Variables with Arbitrary Variance [duplicate]

Let $X_1\sim N(0,\sigma_1^2), X_2\sim N(0,\sigma_2^2),\dots,X_n\sim N(0,\sigma_n^2)$ where generally $\sigma_1\neq\sigma_2\neq\sigma_3\dots\neq\sigma_n$. What is the distribution of the statistic $$Y =...
2
votes
0answers
70 views

Transformation of sum of Gammas into Chi-squared with a Casella Bergian twist

My question is very similar to the ones asked before (I have looked at all of them on Cross-Validated) but it is more about house-keeping and making sure it matches precisely transformation theorems ...
2
votes
0answers
117 views

optim() convergence in fitting gamma distribution to separate peaks of time series data

Trying to fit gamma distribution to each separate peak of time series data (chromatography). As a peak i take local minimum-maximum-minimum part of the data each time. Since the peaks values do not ...
4
votes
1answer
6k views

Link function in a Gamma-distribution GLM

In a GLM, if the response variable has a Gamma distribution, why is the inverse used as the link function, i.e.: $\mu = -(X\beta)^{-1}$? In particular, why is the inverse the canonical link? Does it ...
1
vote
1answer
124 views

Generate Example data for which it is difficult to distinguish between Gamma, Weibull and log-normal fit using R?

I'm trying to generate a data set, as a demonstration case, to show a case in which it is difficult to distinguish between Gamma, Weibull and log-normal distribution. To do this I generate some data: ...
1
vote
1answer
631 views

Multiple peak fit - decomposing a graph into visible and hidden peaks of the same probability distribution

I have a graph as a set of coordinates (x, y), where x is a progressing time and y is proportional to an amount of molecules (chromatography results). Visible peaks on the graph look like of gamma ...
0
votes
1answer
179 views

How to sample from a truncated CDF that is a tranformation of a gamma distribution? [closed]

I would like to sample from a cumulative distribution function $G$, which is a transformation of a 2-parameter Gamma : $G = q * F_{\gamma} + (1-q)$ where $F_{\gamma}$ is the Gamma CDF. In my case, it ...
4
votes
2answers
5k views

Expected Value of Gamma Distribution

If X~Gamma(Alpha,Beta), how would I go about finding E[1/X^2]?
2
votes
1answer
971 views

GLM - which probability distribution to use for abundance data?

I'm fitting a generalized linear model to try to understand how the abundance of a species of freshwater fish varies in response to some environmental variables. I'm using the AIC to choose between ...
1
vote
1answer
524 views

Bayesian estimate of a Gamma distribution scale parameter

I saw a material showing Bayesian estimation on a Gamma distribution scale parameter. As shown below. I think in the 2nd formula, the denominator should be integrated by theta, which is the formal ...
4
votes
1answer
635 views

Posterior distribution for Gamma scale parameter under the Jeffreys prior

What is the posterior distribution for parameter $b$ with $X \sim Gamma(a,b)$, under the Jeffreys prior? We can assume that $a$ is known. The Jeffreys prior is the square of the Fisher information ...
1
vote
2answers
232 views

Inverse gamma convergence in probability

I am trying to prove the consistency of MLE for a beta distribution. The problem now reduces to the following: Assume $Y=\frac n X$ and $X$ ~ Gamma(n,$\frac 1 \theta$), prove that $Y$ converges to $\...
2
votes
1answer
158 views

Statistics guessing game

This is a game that I wanted to know the answer for. The Game There are many players in the game, who each get a guess. There is a loss distribution, $L$, where: $L$ ~ Gamma($\alpha$, $\beta$) i....
1
vote
1answer
215 views

Limiting distribution of $\frac{\sqrt{n}\left(\bar{X_n}-\mu\right)}{\sqrt{\bar{X_n}}}$ from mean of Gamma$\left(\mu,1\right)$?

Given $\bar{X_n}$ is mean of random sample with size $n$ from Gamma distribution with parameter $\alpha=\mu$ and $\beta=1$. I wanna find the limiting distribution of $\frac{\sqrt{n}\left(\bar{X_n}-\mu\...
4
votes
1answer
2k views

How can I determine Gamma distribution parameters from data

I have a time series of weekly retail sales data that I would like to model for an inventory control simulation I am working on. From my research it looks like weekly retail sales like this are best ...
4
votes
2answers
798 views

How to test H0: “this sample is drawn from a gamma distribution” against HA: “this sample is drawn from two different gamma distributions”

This is a targeted follow-up to " all of these data points come from the same distribution." How to test? I have a sample of strictly positive data. I fit a gamma distribution to it and ...
2
votes
2answers
548 views

Is Gamma distribution appropriate for sales transaction data?

I have a sales data for a certain type of grocery products at stores' transaction-level (sales data gathered through cashiers' scanners). As you can imagine, for the most part, the number of units ...
2
votes
2answers
629 views

Interpretation of a negative price coefficient in a log model with gamma distribution

Usually demand models have negative price coefficients, which means that the higher the price, the lower the demand. Many researchers in business look at price coefficients for a "sanity check", i.e. ...
0
votes
1answer
947 views

PDF and CDF of sum of two independent $\Gamma$-distributed random variables [duplicate]

Let $X \sim \Gamma(m, p)$ with a shape parameter $m$ and a scale parameter $p$ and $Y \sim \Gamma(m, q)$ with a shape parameter $m$ and a scale parameter $q$, and let $X$ and $Y$ be independent. ...
9
votes
1answer
26k 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. ...
3
votes
1answer
1k views

What distributions are possible for an arrival rate?

I'm really struggling to find a good statistical distribution. I've tried Poisson and Gamma so far, but without success (best I've got was a p-value of 0,00005 with a Pearson Chi-Square test). So I ...
3
votes
0answers
219 views

Fitting a non-linear model where observations at each time are random variables drawn from a different (non-Gaussian) distribution

I have a non-linear (and not clearly linearizable) function of a few parameters that models a response over an independent variable (time): $$ f(t;\lambda_1,\lambda_2,\lambda_3). $$ The function $f$ ...
1
vote
1answer
169 views

Inverse gamma distribution definition

Wikipedia says the pdf for the gamma function is: \[ X \sim \operatorname{Gamma}(\alpha,\beta) \implies \Pr(X=x) \propto x^{\alpha-1}e^{-\beta x} \] If $Y = 1/X$, then \[ \Pr(Y=y) = \Pr(X=1/y) \...
3
votes
0answers
416 views

Problem with Newton--Raphson Implementation of Inverse-Linked Gamma GLM in R

Recently, I've been trying to implement functions in R that use Newton--Raphson to find the MLE of parameters for various GLMs. My focus has (thus far) been on data with responses $y$ that are ...
0
votes
1answer
1k views

Relationship between Gamma and chi squared distributions [duplicate]

What is the relationship between the Gamma distribution and the chi-squared distribution?
6
votes
3answers
1k views

Which parameter should be considered as “scale” parameter for Gamma distribution?

From Wikipedia and probably all statistics textbooks, we know that in the density of a Gamma random variable $$f(x; k, \theta) = \frac{1}{\Gamma(k)\theta^k}x^{k - 1}e^{-\frac{x}{\theta}}, \quad x > ...
6
votes
1answer
239 views

Ancillary statistics:Beta distribution is free of $\beta$?

I am reading Robert V. Hogg Introduction to Mathematical Statistics 6th Version page 409, second paragraph. $X_1, X_2$ is a random sample from a Gamma $\text{G}(\alpha,\beta)$ distribution with ...
0
votes
0answers
28 views

Help with transformations

I am working with these transformations and I'm not sure why I can't solve this problem. It's pretty easy but my math isn't working out...I may fundamentally misunderstand something. $X1, X2, X3$ are ...
1
vote
1answer
641 views

Diagnostics for quasipoisson glm for continuous data

I'm a little confused about how to use the quasipoisson family in the glm function. It was recommended by someone that I use it for my analysis, even though the data are continuous - and as such, I ...
1
vote
0answers
332 views

Proper approach to Gamma-distributed data prediction with measurement errors in outliers

My task is to predict Gamma-distributed data with a large number of extreme-valued outliers caused by measurement error (i.e. the machine that records the values intermittently malfunctions). My ...
1
vote
0answers
23 views

What is the distribution of a parameter which is expressed as a difference between constant and a Gamma distribution?

I have a variable $x_0$ which is an initial value of a process, it is a constant. The change in the process $\Delta x_t$ follows a Gamma distribution with parameter $(\alpha_t, \beta)$. What will be ...
3
votes
0answers
298 views

Conjugate Gamma Prior

If I have a normal distributed variable $N(\mu,\sigma^2)$ so with fixed $\mu$ the conjugate prior for $\lambda:=\frac{1}{\sigma^2}$ is given by the gamma distribution $\propto \lambda^{\alpha-1}exp{-\...
11
votes
0answers
687 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 ...
1
vote
0answers
60 views

How to find the UMPT for Gamma distribution

I have the gamma distribution given by; $$f_{\theta} (x) = \frac{1}{\Gamma(\theta)} x^{\theta -1} e^{-x}; x > 0 , \theta > 0$$ How can I obtain a UMPT for this function? I have tried using the ...
0
votes
1answer
55 views

How to find full gamma function from the result?

I have a data set and fitted this data as a gamma distribution in R. Below is me code and result: ...
2
votes
1answer
221 views

Multivariate generalization of Poisson-Gamma model?

I actually assumed it would be easy to find a multivariate version of the Poisson distribution, but couldn't find any concrete solution (in terms of a well cited publication). It seems that ...
1
vote
0answers
75 views

conjugate prior for my model parameter

This question is related to the another thread that I posted: Help with Variational Bayes on a weighted linear regression model To reiterate, I have the model as follows: $$ y_i \sim \mathcal{N}(T(...
1
vote
2answers
685 views

what problems can occur when substituting zeros for gamma regression

It is common practice to substitute the zeros of an outcome variable for a gamma GLM with a very small number like 1 or 0.1 if the number of these zero observations does not exceed say 10% of all data....
5
votes
1answer
213 views

Help with Variational Bayes on a weighted linear regression model

I am trying to setup VB to do a weighted linear regression for vector observations. My setup is that I have $N$ numbers of $d$-dimensional vector observations. I would like to model the noise as being ...
2
votes
0answers
153 views

Appropriate random effects GLMM analysis for mean count data? R

I'm trying to find the right way of using a mixed effects approach on some mean count data (animal visits per day to a feeder) in R. I have two interacting fixed effects (both factors) and 2 random ...
2
votes
0answers
135 views

Beta of transformed gamma variable

I'm trying to transform a gamma distributed variable with $\alpha=n$ and $\beta=15$ using the following formula: $$U=\frac{2S}{\beta}$$ S is actually a summation of n exponential variables ($Y_i$), ...
2
votes
0answers
519 views

Bayesian inference on gamma distribution

The likelihood of an observation $x$ under a gamma distribution is $$L(x | \alpha, \beta) \propto \beta^\alpha x^{\alpha-1} \frac {\exp(-x\beta)} {\Gamma(\alpha)}$$ Suppose I have some observations ...
1
vote
0answers
647 views

Farlie-Gumbel-Morgenstern copula

I have the Farlie-Gumbel-Morgenstern copula and I want to generate two gamma marginals and find an expression for the linear correlation. I understand that to get the random variates $(u,v)$ I need to ...
2
votes
1answer
431 views

GLM vs least squares with Gamma errors

To illustrate the usefulness of GLMs in comparison to the least square method I did a simple program in which I add random noise to a straight line (Y=m*x + b; red line in the attached plot). The ...
3
votes
1answer
167 views

Max n for which sum of exponential distribution is bigger then gamma variable

I am currently preparing to the actuarial exam and it is one of the exercises from previous years I encountered and have no idea how to deal with: Let us assume that $X_1, X_2, ..., X_n$ are ...