I’d like to see if there is a way to be able to use a formula which can:
Randomly choose an option amongst 3 options with an equal probability of 1/3 to be selected
Calculating a winning and loosing decisiob based on (1 draws, 1 as probability of winning loosing, chance as a percentage) for example binomial (1,1, 0.5)
Hello, random testing.xlsx (17.9 KB)
I created the attached sheet and I appreciate your feedback on the below:
Does the following expression: int(random() * 3) + 1 randomly choose between three options/groups (1, 2, 3) with equal probability for each option to be selected (1/3 probability for each)?
Does this expression if(random() <= 0.5, ‘Win’, ‘Loss’) calculate the winning/losing based on 1 drawing, same probability for winning and losing, and a specific chance?
Hint: random() as any calculation will be activated/updated any time you open/edit the case. Otherwise, you would need to pack the calculation with once(…).
If you want to simply randomize choices you can use the randomize=true appearance for the select. See (Question Types - ODK Docs).
I’m seeking a formula to randomly select among 3 options with equal 1/3 probabilities. Additionally, I aim to calculate outcomes based on a binomial model (1 draw, 1 win/loss probability) like binomial (1, 1, 0.5). Any guidance on achieving this would be greatly appreciated. Thank you.