How to find PDF, CDF and the probability at a certain point from histogram ?
조회 수: 17 (최근 30일)
이전 댓글 표시
Suppose that I have an array of random numbers, e.g.
X=randn(1,1000);
hist(X,100);
Using the histogram ,I want to find and plot the PDF and CDF of X, and for a constant value a, I also want to find the probabilities P(X=a) and P(X<=a).
Any help would be appreciated. Thank you.
댓글 수: 0
채택된 답변
Image Analyst
2013년 9월 18일
Is this homework? Hint: just take the counts return argument from hist() and normalize the counts array by the total number of counts. Then get cdf by using cumsum() on the normalized counts.
댓글 수: 7
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Histograms에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!