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.
更多回答(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!