필터 지우기
필터 지우기

how to calculate integral pdf ?

조회 수: 7 (최근 30일)
Priscilla Schmitz
Priscilla Schmitz 2019년 5월 30일
댓글: the cyclist 2019년 5월 30일
Hi,
I have pdf (probability density function) of my outputs but i dont know how to determine the probability that x1<x<x2 by calculating Integral(P(x)) between x1 and x2 on MATLAB...
ANY HELP? :D

채택된 답변

the cyclist
the cyclist 2019년 5월 30일
The probability is the integral of the PDF over a range. You can approximate that integral as a sum:
pdf = @(x) 2*x;
x1 = 0;
x2 = 1;
dx = 0.0001;
xrange = x1 : dx : (x2-dx);
probability = sum(pdf(xrange)*dx)
Note that I have done the approximation very crudely, just to keep things simple. Better approximations are possible.
  댓글 수: 2
Priscilla Schmitz
Priscilla Schmitz 2019년 5월 30일
what is dx?
the cyclist
the cyclist 2019년 5월 30일
It represents the width of a tiny slice of the area under the curve, as you do the integral.
In the limit that dx --> 0, you get the integral (rather than the sum).
[Real mathematicians, please do not shoot me! I know that I am being a bit loose here. But I can't explain all of calculus!]

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by