필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
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$?

채택된 답변

Akira Agata
Akira Agata 2018년 3월 9일
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
xosro
xosro 2018년 3월 9일
편집: xosro 2018년 3월 9일
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 2018년 3월 9일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by