title: Statistics test on dictionary values
body: <p>I have some basic code below which tests for normal distribution:</p>
  
  <pre><code>import numpy as np
  import scipy.stats as stats
  results = stats.normaltest([various numbers manually inputted])
  z,pval = results
  if(pval &lt; 0.05):
      print "Data is not normally distributed"
  if(pval &gt; 0.05):
      print "Data is normally distributed"
  </code></pre>
  
  <p>However I'd like to add it to the end of a script which creates values and puts them into a dictionary (named 'result') so I dont have to copy the values in manually, but when I use 'result' instead of the numbers for the stats test I get </p>
  
  <pre><code> 34 print("%f seconds" % (time.time() - start_time)) #completes measuring time taken for script to run
  ---&gt; 35 results = stats.normaltest([result])
   36 z,pval = results
   37 if(pval &lt; 0.05):
  
  TypeError: unsupported operand type(s) for /: 'dict' and 'long'
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>Here is the code for the values going into the dictionary:</p>
  
  <pre><code>new_dictionary = {}
  count = 0
  for m, n in result.items():
      count += 1
      new_dictionary['month_{}'.format(count)] = result
  </code></pre>
  
  <p>m is a file name (as the code draws from a file for each value) and n is the computed value for that file</p>