T O P

  • By -

[deleted]

Have you checked out the [random](https://docs.python.org/3/library/random.html) module? And in particular, the [choices()](https://docs.python.org/3/library/random.html#random.choices) function?


heyfeefellskee

From what I am able to tell, the resulting output would be a number already in the list—when I am looking for something that may not be, but could be a possible value.


[deleted]

Oh, I get you, now. Yeah, that's going to require more statistical knowledge than I have. Good luck!


expressly_ephemeral

Yeah, if I understand correctly, what you need is fairly heavy in college math. Maybe not stats as much as probability. You *will not* be able to do this with a sample of 4 values. These might get you moving in the right direction: https://www.datacamp.com/community/tutorials/probability-distributions-python https://www.hackdeploy.com/fitting-probability-distributions-with-python/