Sage is great software that I rave about in pretty much all of my classes except for probability theory. I’d like to get some info on a few topics to clear some things up so that I can use these for classes and to post to an examples worksheet. Thanks in advance to anyone that replies.
I am wondering how to do a few things. Is there a better (built-in) way to do simple combinations/ permutations than writing a function like def choose(n,k): return factorial(n)/(factorial(k)*factorial((n-k))) or equivalent for permutations? ----- Is there a way to get the Standard Normal CDF other than writing the function explicitly like below? def normalCDF(z): t = var('t') return N(integrate((1/sqrt(2*pi))*e^((-t^2)/2), t, -infinity, z)) ----- Also, are there any distributions built into sage? I don’t quite know what working with a distribution symbolically would be like, but as an example, perhaps being able to do something like X ~ BIN(n, p) and then get the expected value, variance, or PDF of X? Assume that n and p are given. Thanks, -Matthew J --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---