Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. """
  3. Created on Thu Feb 17 21:09:59 2011
  4.  
  5. @author: Kronos
  6. """
  7. import scipy.integrate
  8. import math
  9.  
  10. def myfunc(x):
  11.        
  12.     return((1/(2*math.pi))*(math.e**((-.5)*(x**2))))
  13.    
  14. test = scipy.integrate.quad(myfunc, -1, 1)
  15.  
  16. print test
  17.  
  18. test = test[0]
  19.  
  20. new = (1-test)
  21. print new
  22.  
  23. final = (new/2)
  24.  
  25. print final
  26.  
  27. shouldb = 0.841345-0.158655
  28.  
  29. print shouldb
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement