View Single Post
Old 09-19-2013, 04:09 AM
magdon's Avatar
magdon magdon is offline
Join Date: Aug 2009
Location: Troy, NY, USA.
Posts: 596
Default Re: Chapter 4 Problem 4.4

Originally Posted by GB449 View Post
a) what does selecting x_1, x_2, ... x_n 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 x may not be uniformly random over [-1,+1]. It is P(\mathbf{x}) that specifies the input probability distribution. For example, if P(x) is the Gaussian distribution with mean 0 and variance 1, then you would generate each x_n from that Gaussian distribution.

b) y_n is clear since it is f(x_n). Should we generate random numbers for each \epsilon_n? If so, what are the min and max values for the random numbers?
Note y_n=f(\mathbf{x}_n)+\sigma\epsilon_n. Each \epsilon_n should be an independent Gaussian random number with mean 0 and variance 1 (you then multiply this random number by \sigma).
Have faith in probability
Reply With Quote