B
B
BMaks_N12019-03-21 14:31:32
Python
BMaks_N1, 2019-03-21 14:31:32

Random number generation in Python?

The distribution function and mat expectation are known, it is necessary to generate N random numbers, how to implement this in python? I found a SciPy package that seems to do something similar. is there anything else or any tips?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
longclaps, 2019-03-21
@BMaks_N1

  1. We are looking for a function G, the inverse of the distribution function.
  2. Take N evenly distributed on [0, 1] random numbers x (they are given by the usual random()).
  3. G(x) will have the desired distribution.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question