Post Reply 
Maths/Stats challenge - 1 of 2 - polls
05-25-2022, 10:39 AM (This post was last modified: 05-25-2022 10:43 AM by Joe Horn.)
Post: #13
RE: Maths/Stats challenge - 1 of 2 - polls
(05-25-2022 06:54 AM)Thomas Klemm Wrote:  The result is:

[14. 25. 22.] / 61 ~ [0.23 0.41 0.36]
[10. 15. 38. 21.] / 84 ~ [0.12 0.18 0.45 0.25]
[15. 2. 48. 29.] / 94 ~ [0.16 0.02 0.51 0.31]
[34. 13. 19. 10. 0.] / 76 ~ [0.45 0.17 0.25 0.13 0. ]

My 50g program finds these smaller denominator solutions:

[5. 9. 8.] / 22 ~ [0.23 0.41 0.36]
[6. 9. 23. 13.] / 51 ~ [0.12 0.18 0.45 0.25]
[7. 1. 23. 14.] / 45 ~ [0.16 0.02 0.51 0.31]
[24. 9. 13. 7. 0.] / 53 ~ [0.45 0.17 0.25 0.13 0. ]

Program:
<< 0 DO 1 + UNTIL DUP2 * 0 RND OVER / 2 RND PICK3 SAME END DUP2 * 0 RND SWAP >>

Input: List of percentages as decimals, e.g. { .23 .41 .36 }
Output:
3: Input list
2: List of numerators
1: Denominator

<0|ΙΈ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Maths/Stats challenge - 1 of 2 - polls - Joe Horn - 05-25-2022 10:39 AM



User(s) browsing this thread: 1 Guest(s)