Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °
| |
|
|
You are not logged in. #1 2010-04-25 11:14:22
how to integrate using pythonis there a way to integrate without going through an entire list of numbers (Riemann sums and the like) or using symbolic integration while still getting an accurate answer? Visit calccrypto.wikidot.com for detailed descriptions of algorithms and other crypto related stuff (not much yet, so help would be appreciated). #2 2010-04-25 11:33:24
Re: how to integrate using pythonHi calccrypto; In mathematics, you don't understand things. You just get used to them. Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means. 90% of mathematicians do not understand 90% of currently published mathematics. #3 2010-04-25 13:42:24
Re: how to integrate using pythonim trying to write Cumulative distribution functions, like normalcdf, χ2cdf, tcdf Last edited by calccrypto (2010-04-25 16:04:44) Visit calccrypto.wikidot.com for detailed descriptions of algorithms and other crypto related stuff (not much yet, so help would be appreciated). #4 2010-04-25 16:13:51
Re: how to integrate using pythonHi; In mathematics, you don't understand things. You just get used to them. Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means. 90% of mathematicians do not understand 90% of currently published mathematics. #5 2010-04-26 04:12:37
Re: how to integrate using pythonthanks! Visit calccrypto.wikidot.com for detailed descriptions of algorithms and other crypto related stuff (not much yet, so help would be appreciated). #6 2010-04-26 04:42:00
Re: how to integrate using pythonIf you need any help with them just post back. In mathematics, you don't understand things. You just get used to them. Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means. 90% of mathematicians do not understand 90% of currently published mathematics. #7 2010-05-09 11:54:52
Re: how to integrate using pythonim having a little trouble. when doing normalcdf (using simpson's rule), the values are off slightly, but since the real values are small to begin with, the errors are pretty big. i need 2 values 0.219194 and 0.114866, but im getting 0.22649523318724421 and 0.13293551413661003 Visit calccrypto.wikidot.com for detailed descriptions of algorithms and other crypto related stuff (not much yet, so help would be appreciated). #8 2010-05-09 15:31:29
Re: how to integrate using pythonHi cal; In mathematics, you don't understand things. You just get used to them. Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means. 90% of mathematicians do not understand 90% of currently published mathematics. #9 2010-05-11 08:30:24
Re: how to integrate using pythonim trying to do ∫ normalpdf(x) (which i believe is e^(-.5x^2)/sqrt(2pi)) dx for: Code:n = 100, z = 1.6 | 1.9 1 - ∑ k from (-n/z+1)/4 to (n/z+1)/4 of [normalcdf(-100,(4k+1)z/sqrt(n)) - normalcdf(-100,(4k-1)z/sqrt(n))] + ∑ k from (-n/z-3)/4 to (n/z-1)/4 of [normalcdf(-100,(4k+3)z/sqrt(n)) - normalcdf(-100,(4k+1)z/sqrt(n))] this is from nist's statistical tests for randomness Visit calccrypto.wikidot.com for detailed descriptions of algorithms and other crypto related stuff (not much yet, so help would be appreciated). #10 2010-05-11 12:42:26
Re: how to integrate using pythonHi cal; Is this what you want? In mathematics, you don't understand things. You just get used to them. Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means. 90% of mathematicians do not understand 90% of currently published mathematics. #11 2010-05-11 20:21:16
Re: how to integrate using pythonno. 1.6/1.9 are the 2 values to use for z in that big mess i have in the code block Visit calccrypto.wikidot.com for detailed descriptions of algorithms and other crypto related stuff (not much yet, so help would be appreciated). #12 2010-05-11 20:24:33
Re: how to integrate using pythonHi calccrypto; In mathematics, you don't understand things. You just get used to them. Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means. 90% of mathematicians do not understand 90% of currently published mathematics. #13 2010-05-12 06:13:49
Re: how to integrate using pythonfrom -100 to the z scores, like normalcdf(-100,1.6) (using -100 because -infinity is a little too much), except the formula is a sum of normalcdfs Visit calccrypto.wikidot.com for detailed descriptions of algorithms and other crypto related stuff (not much yet, so help would be appreciated). #14 2010-05-12 06:35:07
Re: how to integrate using pythonHi calccrypto; As you can see from above that your cutoff of -100 for - infinty is introducing a small but noticeable error in the CDF Below is a closed form for the CDF, If you put 1.6 in there you will get the value produced by the second integral 0.945200708300442. But for the life of me, I cannot determine how he is getting those 2 numbers. In mathematics, you don't understand things. You just get used to them. Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means. 90% of mathematicians do not understand 90% of currently published mathematics. #15 2010-05-12 08:09:25
Re: how to integrate using pythonthanks bobbym! Last edited by calccrypto (2010-05-12 08:21:37) Visit calccrypto.wikidot.com for detailed descriptions of algorithms and other crypto related stuff (not much yet, so help would be appreciated). #16 2010-05-12 11:45:18
Re: how to integrate using pythonHi calccrypto; In mathematics, you don't understand things. You just get used to them. Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means. 90% of mathematicians do not understand 90% of currently published mathematics. #17 2010-05-12 12:16:02
Re: how to integrate using pythonim just trying to get a more accurate answer, to at least the thousandths place since for p values, they are usually between .01 and .1 ... Visit calccrypto.wikidot.com for detailed descriptions of algorithms and other crypto related stuff (not much yet, so help would be appreciated). #18 2010-05-12 13:29:56
Re: how to integrate using pythonHi calccrypto; In mathematics, you don't understand things. You just get used to them. Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means. 90% of mathematicians do not understand 90% of currently published mathematics. #19 2010-05-12 13:47:40
Re: how to integrate using pythonoh deary me... ive gotten myself into more complicated stuff than ive attempted to learn. oops. i think i'll hold off asking more about this for a few more months, when i finally get into college and have a better background in calc Visit calccrypto.wikidot.com for detailed descriptions of algorithms and other crypto related stuff (not much yet, so help would be appreciated). #20 2010-05-12 13:56:55
Re: how to integrate using pythonHi calccrypto; In mathematics, you don't understand things. You just get used to them. Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means. 90% of mathematicians do not understand 90% of currently published mathematics. #21 2010-05-12 20:19:58
Re: how to integrate using pythoni try to teach myself here and there and i have learned quite a bit since 2 years ago, but ive had limited experience with polynomials other than using polynomial division to write the AES algorithm in python (a big jump from having a lookup table). i still dont understand so much about polynomials that i would love to know, but are too advanced to learn by skipping around to something interesting that i see Visit calccrypto.wikidot.com for detailed descriptions of algorithms and other crypto related stuff (not much yet, so help would be appreciated). #22 2010-05-12 20:47:14
Re: how to integrate using pythonHi calccrypto; In mathematics, you don't understand things. You just get used to them. Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means. 90% of mathematicians do not understand 90% of currently published mathematics. #24 2011-08-15 21:05:26
Re: how to integrate using pythonHi carol33; In mathematics, you don't understand things. You just get used to them. Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means. 90% of mathematicians do not understand 90% of currently published mathematics. #25 2011-09-03 10:32:50
Re: how to integrate using pythonCode:from scipy import integrate def myfunc(x, a, b): return (x**b) + a args = (1.0, -2.0) results = integrate.quad(myfunc, 0.5, 1.5, args) print 'Integral = ', results[0], ' with error = ', results[1] Give me a lever long enough and a fulcrum on which to place it, and I shall move the world. -Archimedes My maturity level depends on the people I am around. |