RE: [Edu-sig] teaching Python
I've always wanted to teach myself *inferential* statistics through programming, but most of the examples of statistics being taught through programming are *descriptive* statistics. Most of the simple programs that you see in old BASIC books that deal with statistics are, descriptive statistics. Most *inferential* statistics algorithms are overly technical or boring, and don't contribute to the understanding of inferential statistics. Eg, chi-square-distribution algorithm. I'm thinking that the problem arises because inferential statistics deal with population with an infinite number of members, or infinite many samples. Daniel On 28 Nov 2004 at 12:00, edu-sig-request@python.org wrote:
For example, when doing stats, it's common to want a list of random numbers. It'd be useful to have a function with three parameters: min and max to specify the range for the random integers, and a howmany.
from random import randint def getrand(min, max, howmany): return [randint(min,max) for i in range(howmany)]
mylist = getrand(0,100,10) mylist [0, 58, 53, 47, 89, 61, 60, 87, 12, 18]
Then we could do stuff like:
def mean(somelist): return sum(somelist)/float(len(somelist)) # or use truedivision
mean(mylist) 48.5
Then on to standard deviation, divergence, and so on. Very short programs. Lots of command line exploration. Then save the short programs in a module for reuse later.
I'm thinking that the problem arises because inferential statistics deal with population with an infinite number of members, or infinite many samples.
Daniel
I'd think there'd be a way to fill this niche, even with Python. Surely there's a digital/discrete approach which mimics the idea of infinite data, if the discipline is at all real worldly -- because in practice, we never have infinite data. Kirby
participants (2)
-
Daniel Ajoy -
Kirby Urner