A
A
AnnyB_0092022-03-07 14:48:43
excel
AnnyB_009, 2022-03-07 14:48:43

How to generate results for a test randomly, with a given probability of each result?

It is necessary to write a function that will fill in the scores for the test randomly, so that the probabilities are: score < 50% - 12.5%, score < 75% - 37.5%, score < 90% - 37.5%, score <= 100% - 12.5%. In this case, the estimate can only be an integer percentage of a given interval, and if possible, this should be done without using additional tables.
Help, I don't know how to do this

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wataru, 2022-03-07
@AnnyB_009

The odds are 1:3:3:1. Generate a random number from 0 to 7. For 0, give a random number < 50. For 1-3, a random number from 50 to 74, for 4-6, give an answer from 75 to 89, for 7, give a number from 90 to 100.
What numbers from the interval to give out in the task is not said. You can somehow randomly equally probable or somehow normally generate or even throw out the middle of the interval always.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question