Questions tagged [gamma-function]

Anything related to the mathematical gamma function, also known as generalized factorial function.

Anything related to the mathematical gamma function, also known as generalized factorial function.

See Wikipedia page on gamma function.

72 questions
0
votes
1 answer

Roots of digamma function in R

I am working on a maximum likelihood estimator, and one of the parameters is estimated using the digamma function. I'm trying to use uniroot to solve the equation but am unable to do so. Here's my code: dig = function(alpha){ digamma(2 +…
sqlck
  • 87
  • 1
  • 7
0
votes
0 answers

Division of two incomplete gamma function

I am working on an equation that needed to divide two incomplete gamma functions. They are just different by the first term as they are IG(a,b) and IG(2a,b). Is there any closed form or simple approximation for the division?
TPArrow
  • 1,518
  • 18
  • 25
0
votes
1 answer

Decode a gamma encoded image

I am working on a project, where the user can specify a gamma function on a image, for example: y=(pow(10,(1023*x-681)/444)-.0408)/(1-.0408)) The image is then encoded with this gamma curve, and then my code must be able to return this image back…
Malu05
  • 119
  • 2
  • 3
  • 10
0
votes
1 answer

Estimate pi with Gamma function in Python Monte Carlo method

I'm trying to write a code in python using the Monte Carlo method to estimate pi (where pi = gamma(1/2)**2). I should write a code saying that sqrt(pi) is the area of a square enclosing the function gamma(x=1/2) times the total number of random…
JadeChee
  • 89
  • 1
  • 17
0
votes
2 answers

Gamma function approximation

I'm trying to write a three-parameter method that approximates the gamma function over a certain interval. The approximation should be a right-endpoint Riemann sum. The gamma function is given by: GAMMA(s) = inf INT x^(s-1) * exp(-x) dx 0 The…
Ice101781
  • 105
  • 10
0
votes
1 answer

Fast incomplete gamma function

What is a fast way to calculate the incomplete gamma function, or at least a "good" approximation of it, in C++? Background What I ultimately need to calculate Given a number of Bernoulli trails N, with probability p of success, I'm ultimately…
Museful
  • 6,711
  • 5
  • 42
  • 68
-1
votes
1 answer

scipy gamma distribution doesn't match formula on wikipedia

According to Wikipedia the expected value of a Gamma distribution is k * theta. However, when I plug that into the CDF for the gamma distribution I don't get 0.5 as expected. k = 1.5 theta = 2.1 expected_value = k *…
Aaron
  • 2,354
  • 1
  • 17
  • 25
-1
votes
1 answer

Is there a function in R which finds z if I know y in gamma(z)=y

I am looking to know if there is any function in R which finds z if I know y and gamma(z)=y Uniroot might be useful but not sure how I can use this. Thanks
Mohsen Sichani
  • 1,002
  • 12
  • 33
-1
votes
1 answer

Database structure is from newer Gammu version

i get error when run gammu-smsd Log filename is "/var/log/gammu-smsd" gammu-smsd[11271]: Database structure is from newer Gammu version gammu-smsd[11271]: Initialisation failed, stopping Gammu smsd: Unknown error. (UNKNOWN[27]) Failed to run SMSD:…
kputri
  • 63
  • 1
  • 5
  • 18
-1
votes
1 answer

MATLAB strange error Gamma function numerical integration

i try to run the following in order to integrate numerically: nu = 8; psi=-0.2; lambda = 1; git = @(u) tpdf((0 - lambda * skewtdis_inverse(u, nu, psi)), nu); g(t,i) = integral(git,1e-10,1-1e-10,'AbsTol',1e-16); where tpdf is a matlab function and…
-2
votes
2 answers

Error:identifier tgamma is undefined in c++ although is included

Im trying to use tgamma function in c++ 10.It's running on a 32-bit machine. I've included , but still getting the error "identifier tgamma is undefined ". what could be the reason?
NavidAmin
  • 3
  • 3
-5
votes
1 answer

Exponential integral and gamma function

In order to solve this problem, without iteration: Recursion: Sum of series of n terms calculating for a given n: 1 + 2*3 + 3*4*5 + 4*5*6*7 + ... + n*(n+1)...(2n-1) with this mathematical…
1 2 3 4
5