how can i estimate parameters of two independent gamma distributed variables with one same parameter in matlab?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
xosro
am 8 Mär. 2018
Kommentiert: Torsten
am 9 Mär. 2018
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$?
0 Kommentare
Akzeptierte Antwort
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
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.
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!