Defining the 95% of data which are around the mean value
조회 수: 2 (최근 30일)
이전 댓글 표시
For a given set of data, how can I define which of those correspond to the 95% of the data which are around the mean value?
댓글 수: 0
채택된 답변
추가 답변 (2개)
Image Analyst
2013년 7월 31일
I'd sort the data using sort(). Then use cumsum() to get the cdf. Normalize the CDF then go from the 2.5% element to the 97.5% element using find() to find the elements (values) where the data starts and stops. It's pretty easy, but let me know if you can't figure it out.
댓글 수: 0
Giorgos Papakonstantinou
2013년 7월 31일
댓글 수: 1
Tom Lane
2013년 8월 1일
It sounds like Image Analyst is talking about the cumsum of a vector that assigns probability 1/N to each of N points. However, you could take the 0.025*N and 0.975*N values from the sorted vector directly, converting the index to an integer as you see fit.
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!