mardi 3 novembre 2020

Is the probability density for c = np.random.random() and d = 30 * np.random.random() same?

import numpy as np

c = np.random.random()

Then we know c is uniformly distributed over the half-open interval [0,1) and the probability density function (pdf) of c is given by, p(c) = 1/(1-0) for 0 <= c < 1.

Now, if generated d as follows:

scalar = 30

d = scalar * np.random.random()

then what is the pdf of d i.e. p(d)?




Aucun commentaire:

Enregistrer un commentaire