Questions tagged [gamma-distribution]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
11 views

marketing hypothesis test sample size calculation

I am trying to design a coupon promotion test to measure the increase in the volume of orders from promotion versus no promotion. To do so, I want to calculate the pre-group sample size required to ...
0
votes
0answers
10 views

Sample Size Calculation - Two Gamma Distributed Mean

I have a similar question to Sample Size Calculation - Two Independent Means, in my case, I am measuring the number of orders our customer make which follows a gamma distribution I believe. How could ...
0
votes
0answers
15 views

Bayesian estimation of the variance

The mean of the Gamma distribution is $\alpha/\beta$, while the mean of the Inverse Gamma is $\beta/(\alpha-1)$. Similarly, the mode of the Gamma is $(\alpha-1)/\beta$, but the mode of the Inverse ...
0
votes
1answer
39 views

Improving a model for a positively skewed continuous data (no zeros)

I have a positively skewed continuous data (no zeros), representing transactions by amount. Variables age and income were ...
1
vote
1answer
30 views

glmer with gamma distribution - problem fitting model

I am trying to fit the gamma distribution to my data as the residuals are not normally distributed but it has been much more difficult than I anticipated. The dependent variable is response times and ...
5
votes
1answer
57 views

sampling from $\frac{1}{1+x}$ times Gamma distribution density

I am simulating a process by drawing many random variates $X$ from a Gamma distribution with parameters $\alpha$, $\beta$, $$f_X(x) = \frac{\beta^\alpha \, x^{\alpha-1} \, e^{-\beta x}}{\Gamma(\alpha)}...
3
votes
1answer
33 views

What length are some segments of a broken rod?

If a rod (of unit length) is broken into $n$ segments (assuming the $n-1$ breaks occur with uniform probability across the entire length) and $k$ of those segments are chosen at random and laid end to ...
0
votes
1answer
61 views

GLMM hurdle model for continuous data -Truncated negative binomial family in glmmTMB?

I am running a hurdle model using the glmmTMB function. My dependent variable is continuous and >= 0. I was looking for a function that would allow me to model the binary response in a logistic ...
1
vote
0answers
13 views

Gamma Regression as the Last Layer of the Neural Network

My current task involves predicting data that follows a Gamma distribution. To avoid confusion of notations, in the following discussion, the p.d.f will be $$\mathbb{P}(y|\alpha, \beta)=\frac{\beta^\...
0
votes
0answers
18 views

Validation metric for gamma regression

I have a regression task to predict the loan default amount in the case of a default (which is always positive). I am using Gamma regression for this in LightGBM. ...
0
votes
0answers
11 views

Posterior mean of $\mu$ in Bayesian Hierarchical model (Poisson-Gamma)

Chapter 7 of Jim Albert's book considers the case of using a hierarchical model, to estimate heart-transplant mortality rates ($\lambda_i$) from 94 hospitals, each with it's own exposure (# of ...
0
votes
0answers
27 views

Parameterization of gamma distribution in XGBoost 'reg:gamma'

I am looking into gamma regression using XGBoost in R. I am trying to understand the negative log-likelihood used in estimating the model. Github has the following ...
2
votes
0answers
17 views

Why are the AIC values returned by R's glm function incorrect for these families?

from the R documentation for the glm function: aic A version of Akaike's An Information Criterion, minus twice the maximized log-likelihood plus twice the number of parameters, computed via the ...
2
votes
1answer
35 views

How to scale gamma distribution to longer interval?

I'm trying to gain intuition for how to scale the parameters of the Gamma distribution when the desired variance is not known. I'll make up an example: Let $\lambda$ be the number of 100-degree days ...
1
vote
0answers
46 views

Poisson Counting Process over Variable Threshold

Let's consider a Poisson Counting Process $N(t)$ with generation rate $\lambda$ and a piece-wise constant threshold $M(t)$ that changes with time. $$ M(t)=m_i \ \ for \ \ t\in(t_{i-1},t_{i}],\ i\in \...
2
votes
2answers
21 views

best regression model for a percentage of function variable

I am trying to choose the best regression model for a dependent variable 'percentage of normal shoulder function'. This variable is non normal and clustered at the high end of the possible range, ie ...
0
votes
0answers
23 views

Use gamma distribution or log-transform with OLS?

I have blood levels of a chemical as the response or dependent variable. The minimum can be 0 and it has distribution as shown in figure below: I believe this is a gamma distribution. I have to ...
2
votes
0answers
56 views

GLMs with skewed distributions - why use mean and not mode?

There's something that's a bit troubling for me. The unit deviance in GLM is defined as $2[t(y,y) - t(y,\mu)]$, when $t(y,\mu) = y\theta(\mu) - b(\theta(\mu))$ (theta being the natural parameter). For ...
0
votes
1answer
28 views

Gamma-Poisson conjugate prior, posterior exploding?

I've been looking for simple code that can model ad clicks per day. Notionally, gamma-poisson would be a good conjugate prior. However, I'm finding that for slightly large daily click rate values, the ...
0
votes
0answers
33 views

How to use scipy stats gamma pdf to update the posterior distribution?

I'm trying to "get my bearings" performing bayesian analysis, specifically I'm exploring the Gamma-Poisson conjugate prior. The definition of the PDF is below If the prior takes the form of ...
1
vote
1answer
36 views

Robust SE clustered GLM Gamma Log Link to match GEE Robust SE

How do I get the robust standard errors/sandwich variance estimators for GLM using a Gamma family with a log-link to match the robust standard errors from the GEE output? ...
0
votes
0answers
9 views

F test and T test in GLM gamma Log link

We get both t-test and F-test for the estimation of GLM Gamma with a log link model. F-test: T-test: From my knowledge for ANOVA, I can report the main effect of League to use the F test(F4,53699=20,...
2
votes
1answer
73 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?
0
votes
1answer
13 views

Generalized Gamma Distribution in Lifetime Models

It seems to me that a version of generalized gamma distribution is often used in lifetime models. For example, survival analysis uses this distribution. Is there some intuition as to why this ...
0
votes
0answers
31 views

Box-Cox vs GLM for skewed non homoskedastic data

I need to do a regression on a variable Y that is skewed right (non normal) and heteroskedastic and therefore violates two assumptions of the normal linear model. The data is non negative (some 0 ...
0
votes
1answer
45 views

QQ Plot for GLM Regression Model in R with Family NOT Gaussian

I apologize if this has been asked and answered elsewhere -- I've tried to find the answer and could not. In R, if you use the normal plot() command on a ...
0
votes
1answer
28 views

Identifying the best distribution to this data?

I'm trying to fit an appropriate distribution to a data with 216 values and estimate parameters. From Cullen and Frey graph, it looks like lognormal could be a good fit. From q-q plot, Weibull seems ...
2
votes
2answers
41 views

Conditional expectation of a Gamma Distribution

$X$ a Gamma Distributed random variable. Calculate $E[X\mid X \in [a,b]]$, where $a>0$, $b>0$. Is there a closed form solution for this, and if so, how can I calculate it?
-1
votes
1answer
18 views

Citation for Gamma Probability Density Function?

Wondering if anyone has a reference for the Gamma PDF? I cannot find any leads. Thanks
1
vote
0answers
33 views

How to compute categorical probability given a continuous distribution?

I have a continuous target column that consists of IQ scores for kids of age 10. My main purpose is to forecast the probability that a kid is genius given 3 covariates. If a kid has IQ over 160 she/he ...
0
votes
0answers
13 views

fitting multiplicative non linear model in R

I have samples per month over several years (assuming stationary behavior). My data contains an independent variable: hours (representing available hours per month). The model to be fitted should ...
2
votes
0answers
30 views

Normal distribution with known mean and unknown variance (product of two variables)

Assume there is a data point $x$ sampled from a Normal distribution: $$\begin{align} x \sim \mathcal{N}(\mu,\frac{1}{yz}) \propto (yz)^{1/2} \exp [-\frac{1}{2} (x-\mu)^2yz] \end{align}$$ where $\mu$ ...
1
vote
1answer
24 views

Computing expected frequencies for gamma distribution R VS Python

I am tryng to "translate" from R to Python a code that computed expected frequencies from the Gamma distribution. More specifically, I have this line of code: ...
11
votes
2answers
702 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 ...
1
vote
1answer
72 views

product of two probability density functions

I have on one hand a z variable following a standard normal distribution N(0,1) and on the other hand a variable X following a Nakagami distribution. I am supposed to find a Gaussian distribution when ...
0
votes
0answers
11 views

Do I use the Poisson or the Gamma distribution to answer this question involving a Poisson process?

On average, 1 customer arrives every 2 minutes to purchase a ticket to an event. After 100 customers, tickets sell out. What is the probability that tickets sell out in less than 2 hours? I am ...
1
vote
0answers
25 views

Survivor function for generalized gamma from flexsurvreg output

I am trying to plot/generate a survival curve in Excel using the output from flexsurvreg in R. The below is a snapshot from R with the corresponding estimates (y axis values) for the time (x axis ...
4
votes
2answers
108 views

What is the distribution of a mixture of exponential distributions whose rate parameters follow a gamma distribution?

I want to know the theoretical distribution of a mixture of exponential distributions whose rate parameters are distributed according to a gamma distribution: $$ y\sim\text{Exp}(\theta), \quad\text{...
1
vote
0answers
20 views

Highly fluctuating value of test statistic in Anderson Darling test

I am trying to verify whether my sampled data is from a population with a Gamma density function. My plan is to do this by means of the Anderson-Darling test. Before doing so, I thought it would be ...
0
votes
1answer
115 views

Gamma distribution and hyperparameters

The formula for mean and variance of a gamma distribution is given by a/b and a/b^2 (hyperparameters) respectively.Are they estimates of the posterior gamma distribution? Can prior, likelihood and ...
0
votes
0answers
20 views

Comparing Gamma GLMS using Analysis of Deviance

Im new to stats/R and have just started a course on generalized linear models and am a little confused. Im comparing two gamma glms using analysis of deviance to see whether m0 is a reasonable ...
0
votes
0answers
9 views

How to scale the probability in the gamma probability density function for modeling infectious disease transmission's latent period?

I like to model infectious disease transmission between people over time. Usually there is a latent period (or delay) between the initial infection of person A and when person A becomes infectious to ...
0
votes
0answers
19 views

Differentiating the Log-Normalizer of the Gamma distribution

Converting the Gamma distribution to the Exponential family form, you get: $$f(x) = \frac{\beta^{\alpha}}{\Gamma(\alpha)}x^{\alpha-1}e^{-\beta x} = e^{(\alpha-1)\ln(x) -\beta x -(\ln(\Gamma(\alpha)-\...
0
votes
0answers
44 views

Using Python - scipy.optimize to fit a weighted sum of two distributions

I have been working at finding a statistical function that fits a set of empirical data in a project I'm working on. After having tried a number of statistical distributions by using scipy.stats I ...
0
votes
0answers
18 views

How to calculate variance of Y explained by my predictor X when using a gamma GLMM and an identity link?

I want to assess how well my variable X explains Y. As far as I know, I have to use mixed-effects models since what I have is data over time from 6 individuals. Below I show the relationship between X ...
0
votes
0answers
33 views

Obtaining distribution parameters from GLM

My question is part statistical and part coding. Say I have fitted a gamma log-link GLM. doc example ...
0
votes
0answers
30 views

Conditional distribution of complete sufficient statistics being ancillary of $\alpha$

Regarding the distribution and statistics as described here, I need to show that the conditional distribution of $\overline{X}$ given $X^*=x^*$ does not depend on $\alpha$. I remember my professor ...
1
vote
1answer
51 views

Gamma distribution: ratio of 2 CSS not containing $\beta$

Let $X_1,...,X_n$ be iid and follow $Gamma(\alpha, \beta)$, where $$f(x,\alpha, \beta)=\frac{x^{\alpha-1}e^{-x/\beta}}{\Gamma(\alpha)\beta^\alpha}$$ I already showed that $\overline{X}$ and $X^*=\...
0
votes
0answers
12 views

What is the distribution of a r.v. if the reciprocal is distributed gamma?

I want to find the posterior distribution of σ^2 when (X1, X2, ..., Xn) ~ N(μ,σ^2), μ is known, and 1/(σ^2) ~ Gamma(α,β), but I'm not sure how to find the prior of σ^2 given the prior of 1/(σ^2). ...
2
votes
1answer
55 views

Iterative solution to Gamma distribution MLE problem

I'm trying to follow the derivation for the MLE parameters of the gamma distribution in [1]. The standard approach is to derive an expression for the log likelihood, differentiate with respect to ...

1
2 3 4 5
14