Convolution of a CDF and a PDF

조회 수: 2 (최근 30일)
Jeremie Schutz
Jeremie Schutz 2018년 6월 19일
댓글: Jeremie Schutz 2018년 6월 20일
Good afternoon,
I come from Mathematica and I would like to compute a convolution (the function ANOF, below) thanks to MATLAB :
Can you help me?
The expected results are:
  • ANOF[50]=0.0772848
  • ANOF[100]=0.956483
Thanks, Jérémie
  댓글 수: 2
Jeff Miller
Jeff Miller 2018년 6월 20일
Is the expression inside the square brackets [] the upper tail probability of a random variable which is the sum of independent Weibull and normal RVs?
Jeremie Schutz
Jeremie Schutz 2018년 6월 20일
Dear Jeff,
For a better readability, I isolated the part that causes me problems.
  • The expression CDF[WeibullDistribution[2, 100] can be formulated as 'wblcdf(t-y,100,2)'
  • The expression 'PDF[NormalDistribution[2.2, 0.1], y]' can be formulated as '* The expression 'PDF[NormalDistribution[2.2, 0.1], y]' can be formulated as 'normpdf(y,2.2,0.1)'.
I tried to execute the code below but it returns many errors.
assume(y > 0)
y=sym('y');
t=sym('t');
% I = int(wblcdf(t-y,100,2)*normpdf(y,2.2,0.1),y,0,100)
I = int(wblcdf(t-y,100,2)*normpdf(y,2.2,0.1),y,0,t)

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

채택된 답변

Torsten
Torsten 2018년 6월 20일
ANOF=@(t)-log(1-integral(@(y)wblcdf(t-y,100,2).*normpdf(y,2.2,0.1),0,t,'ArrayValued',true));
ANOF(50)
ANOF(100)
Best wishes
Torsten.
  댓글 수: 2
Jeff Miller
Jeff Miller 2018년 6월 20일
FWIW, Torsten's answer looks right to me, but it gives
ANOF(50) = 0.22848
ANOF(100) = 0.95648
which are not the "expected values" stated in the original question.
Jeremie Schutz
Jeremie Schutz 2018년 6월 20일
Thank you Torsten and Jeff Miller!
It work fine. There was a mistake in my first post... It was ANOF[30]= 0.0772848

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Identification에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by