How to select a random sample without replacement with imposed condition?
이전 댓글 표시
Hi,
I'd like to draw a random sample from my population. My population is a vector x of size (N x 1). My sample should satisfy
sum(x(sample)) = 0.7*sum(x);
So I do not care how many observations I draw from the sample, but I just want to make sure that the resulting sample covers 70 percent of total x in terms of value, not in terms of number.
Thanks, Christian
댓글 수: 2
Walter Roberson
2015년 10월 24일
Is that exactly 0.7 ? If so then it might not be possible to satisfy the condition.
Christian
2015년 10월 24일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Random Number Generation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!