I am solving a problem but I am having a hard time understanding the terminology. I have not been exposed to much statistics/probability before so please bear with me. I am considering a regression model $Y_i = f(x_i)+\epsilon_i$ for $i=1,2,\dots n$. We are given that $x_i$ are independently and identically distributed in [0,1] and that $\epsilon_i$ are independently and identically distributed normal random variables with standard deviation $\sigma$. We are of course given $\sigma$.
So the first thing I want to do is generate some random samples $\{(x_j,Y_j)\}$, but I am unsure how to do this. I feel like I am not understanding how to generate my $x_i$ and $\epsilon_i$, but once knowing this it should become simple I believe.
I know this may be simple, but any help is much appreciated.
Here is an example in R language