Quote:
Originally Posted by GB449
a) what does selecting  independently with P(x) mean? In earlier homework, we selected the points at random from [-1,1] which was clear to me - I used a random function with min = -1 and max = +1 but I am not clear what to do with P(x)
|
In this problem P(x) is the uniform probability distribution on [-1,+1] and so what you did in the earlier homework is exactly what this means -- generate a random number between -1 and +1. In general, the way to generate

may not be uniformly random over [-1,+1]. It is

that specifies the input probability distribution. For example, if

is the Gaussian distribution with mean 0 and variance 1, then you would generate each

from that Gaussian distribution.
Note

. Each

should be an independent Gaussian random number with mean 0 and variance 1 (you then multiply this random number by

).