On May 18, 12:29 am, mhampton <hampto...@gmail.com> wrote:
> Here at Sage Days 15, William Stein gave a presentation on the future
> of Sage in which one of the issues was improved statistics support.
> While we include statistics functionality vis R, rpy, and scipy.stats,
> that functionality is not unified and has usability problems (for
> example, plots in R are somewhat difficult to get working correctly
> within Sage).
>
> So I have started a file basic_stats.py in the stats directory, with a
> ridiculously simple start:
>
> http://trac.sagemath.org/sage_trac/ticket/6058
>
> Before moving forward too much I think it would be useful to have some
> thoughts on some issues with this:
>
> 1) What functions should be in the namespace by default?  I am
> starting with mean, variance, and standard deviation (std), but it is
> unclear to me what else should be there.
>
> 2) How much code should we reuse from scipy.stats and R?  Presumably
> the code in R is more robust, but scipy is more python- and sage-
> friendly.
>
> 3) Related to 1), what are the most commonly used statistics
> functions?  What is needed to teach most undergraduate statistics and
> probability courses?

I just wanted to mention a far-out -- it's likely not something that
will be implemented soon but if you like it it could affect how one
gives name in the API etc.

Basically I can see Sage being a great place to merge symbolic
calculations in statistics and data analysis. Simple example:

sage: a, b = var('a,b')
sage: sigmasq = Gamma(a, b); sigmasq
Gamma distribution with parameters a, b
sage: y = Normal(0, var=sigmasq); y
Normal distribution with gamma distributed variance
sage: y.mle(data) # generic maximum likelikehood on arbitrary
distributions
{"a":2.32, "b": 12}
sage: y.draw(10) # draw 10 random samples through e.g. automatic MCMC
through symbolics
...
sage: z = given(y, [sigmasq, 2]); z
Normal distribution with variance 2

Or perhaps some syntax candy
sage: y | sigmasq=2
Normal distribution with variance 2


I don't know whether something like this could be made powerful enough
to be useful above a teaching level, but it would definitely be useful
there. At least it would allow natural operations on what I learnt in
my Bayesian statistics coure :-)

Dag Sverre
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to