title: Creating fake data in Python
body: <p>I am trying to create a function that creates fake data to use in a separate analysis.  Here are the requirements for the function.</p>
  
  <p><strong>Problem 1</strong></p>
  
  <p>In this problem you will create fake data using numpy. In the cell below the function create_data takes in 2 parameters "n" and "rand_gen.</p>
  
  <ul>
  <li>The "rand_gen" parameter is a pseudo-random number generator. We are using a pseudo-random number generator to produce the same results.</li>
  <li>Use the numpy.random.randn function of the pseudo-random generator to create a numpy array of length n and return the array.</li>
  </ul>
  
  <p>Here is the function I have created.</p>
  
  <pre><code>def create_data(n, rand_gen):
  '''
  Creates a numpy array with n samples from the standard normal distribution
  
  Parameters
  -----------
  n : integer for the number of samples to create
  rand_gen : pseudo-random number generator from numpy  
  
  Returns
  -------
  numpy array from the standard normal distribution of size n
  '''
  
  numpy_array = np.random.randn(n)
  return numpy_array
  </code></pre>
  
  <p><strong>Here is the first test I run on my function.</strong></p>
  
  <pre><code>create_data(10, np.random.RandomState(seed=23))
  </code></pre>
  
  <p><strong>I need the output to be this exact array.</strong></p>
  
  <pre><code>[0.66698806, 0.02581308, -0.77761941, 0.94863382, 0.70167179,
                         -1.05108156, -0.36754812, -1.13745969, -1.32214752,  1.77225828]
  </code></pre>
  
  <p>My output is still completely random and I do not fully understand what the RandomState call is trying to do with the seed to create the above array rather than have it be completely random.  I know I need to use the rand_gen variable in my function, but I do not know where and I think it's because I just don't understand what it is trying to do.</p>