How to select from groups with a specific probability?

I have 4 groups (A, B, C, and D). Each group has 3 items in them. However, each group has a different probability of being selected from (i.e. 10%, 20%, 50% and 20% respectively).

How would I go about setting up something like this (which selects from a group of items by using a specific probability)?

Please see the image below to see what I mean:

Hey @jackwemery93

I guess you mean statistically, right? i.e. in your example, out of 10 times, Group A was chosen once?

If so - an easy way to do this would be to have a field “Count” (type number) in your Group data type. Every time the Group is selected, you add +1 to that Count.

Then, in a simple text element, you can reference that percentage with a simple formula like (This Group's Count / All Groups' Count:sum) *100%

I’m using a simple number field here but you could also store the Group selection in a “Selected Groups” field (list of Groups) in the User data type, or in any other field that makes the most sense for your app.

Let me know if that helps

This topic was automatically closed after 70 days. New replies are no longer allowed.