Definite Sum of density functions

I need to compute :
Sum (from n=1 to N) [dgamma(x,n)*(1-dgamma(k,n))]
Sorry for the form I don't managed to do something esthetic.
Have you got an idea ? I have tried this in vain :
% Try 1
N = 100;
S = 0;
for n = 1:N
S = S + (dgamma(x,n)*(1-dgamma(k,n)));
end
% Try 2
N = 100;
syms n m
S = symsum(dgamma(x,n)*(1-dgamma(k,n)),n,1,N);

2 Commenti

Your question is a bit unclear:
What is dgamma (function or array)? If it's an array, will N be the length of dgamma? What is x and k?
Sorry for this, dgamma is the gamma density function of variables x and k (support) and parameter n.

Accedi per commentare.

 Risposta accettata

Star Strider
Star Strider il 30 Gen 2015
Modificato: Star Strider il 1 Feb 2015

0 voti

See the documentation on the Gamma Distribution.

2 Commenti

Thank you very much. I had never suspected this problem !
My pleasure!

Accedi per commentare.

Più risposte (0)

Categorie

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by