how can i estimate parameters of two independent gamma distributed variables with one same parameter in matlab?

2 Ansichten (letzte 30 Tage)
Suppose we have two independent random variables $X_1$ and $X_2$ where $X_1 \sim (\alpha_1, \beta)$ and $X_2 \sim (\alpha_2, \beta)$. how can i estimate three parameters $(\alpha_1, \alpha_2, \beta)$ from given data for $X_1$ and $X_2$?

Akzeptierte Antwort

Akira Agata
Akira Agata am 9 Mär. 2018
I think one possible way to do this is to use maximum likelihood estimation method, like:
% Sample data
X1 = gamrnd(2,10,1000,1);
X2 = gamrnd(5,10,1000,1);
% Fit each data to Gamma distribution
pd1 = fitdist(X1,'Gamma');
pd2 = fitdist(X2,'Gamma');
% Assume beta = (beta1 + beta2)/2, and estimate alpha1 and alpha2
beta = (pd1.b + pd2.b)/2;
alpha1 = mle(X1,'pdf',@(X1,alpha1) gampdf(X1,alpha1,beta),'start',pd1.a);
alpha2 = mle(X2,'pdf',@(X2,alpha2) gampdf(X2,alpha2,beta),'start',pd2.a);
  7 Kommentare
xosro
xosro am 9 Mär. 2018
Bearbeitet: xosro am 9 Mär. 2018
I'm sorry. As it is mentioned above (Walter Roberson and Torsten), conditions 1 and 2 are correct. I was trying to describe the question in the form of simple, But it is possible that b is replaced with (1-a) but this is not used in general form (l1*X1+l2*X2+...+ln*Xn).
I may use the following form:
y=l(1)/sum(l)*X1+...+l(n)/sum(l)*Xn
I should try this.
Torsten
Torsten am 9 Mär. 2018
You shouldn't do that since it makes your problem nonlinear in the l's.
You should work with
Y = l1*X1+...+ln*Xn
sum(li) = 1
li >= 0
and use lsqlin to estimate the li's.
Best wishes
Torsten.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by