Generate all possible group scores based on combinations of individuals
이전 댓글 표시
I want to compare actual group scores to hypothetical scores cosnidering all possible combinations of individuals.
I'd like to plot out the actual group scores to that of all possible combinations (i.e., Actual scores for groups vs possible scores of nCr groups) for each item.
Is there a function to generate possible groupings and plot their scores?
Thank you!
댓글 수: 5
Jeff Miller
2022년 6월 15일
Do I understand correctly that you want to consider all possible ways of forming 20 groups of size 3 that can be formed out of 60 individuals? There are something like 10^66 different ways of doing that, which seems like an impractically and unnecessarily large number to look at.
David Goodmanson
2022년 6월 15일
HI Jeff,
I'm getting 'only' factorial(60)/factorial(20)/factorial(3)^20 = 9.3546e+47 which still seems to be a challenge for my hard drive.
Jeff Miller
2022년 6월 15일
Hi David,
I was thinking that the group ID mattered, so I computed:
log10sum = 0;
totalN = 60;
for iGroup = 1:20
nChoices = nchoosek(totalN - (iGroup-1)*3,3);
log10sum = log10sum + log10(nChoices);
end
log10sum
log10sum =
66.357
But maybe that's wrong and the OP doesn't want to distinguish between (say) [group 1 = {1,2,3} & group 2 = {4,5,6}] versus [group 1 = {4,5,6} & group 2 = {1,2,3}], in which case my count is too high.
David Goodmanson
2022년 6월 15일
Hi Jeff,
good point, I had not considered group ID so either you would or would not have a factor of factorial(20).
Morgan
2022년 6월 15일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!