Try to search your question here, if you can't find : Ask Any Question Now ?

# random sampling and lists

HomeCategory: stackoverflowrandom sampling and lists

I am trying to take the standard deviation of some data that is part of a sheet without getting an error. Then, I can take the standard deviation of all the standard deviations. See below for further details:

I have the sheet imported.
There are 20 columns to the sheet of various sizes, Size1,Size2…Size20, i.e. each column is a size: size1, size2, size20.
Each of the columns/sizes contains values like:
.0456
.0356
.0756
the many rows are dates, but that’s not that important other than to provide an image of what’s going on.

Each column represents an original sample.
Let’s take Size1 as an example. From that original sample, I am looking to draw a random sample without replacement, which I will name x1. Then I will draw again, and when I draw again, I will do it with replacement and name it x2.
I draw again and again until I have done so 10,000 times (in sample size of (n=1000)). Each sampling gives me the ability to get an estimate of a statistic, so I will have 10,000 estimates of a statistic ( in this case, standard deviation). Subsequently, I will take a standard deviation of those 10,000 estimates.

So far I have:

``````#where a,b,c, etc. represent original sample/column
#where a1,b1,c1, etc. represent random sample for each original sample/column (not sure if the code listed below takes into account with and without replacement aspect as noted above)

a=data.Size1
a1= random.sample(list(a),1000)*10000
stdev(a1)
stdev1 = a.std()

b=data.Size2
b1= random.sample(list(b),1000)*10000
stdev(b1)
stdev2 = b.std()

c=data.Size3
c1= random.sample(list(c),1000)*10000
stdev(c1)
stdev3 = c.std()
``````

all the way up to Size20

but this yields a “type error: float is not callable” with regard to stdev(sample1forpop1)

At the end, I expect to simply do a standard deviation of all 20 columns by doing something like
stdev(list(stdev1, stdev2, stdev2…stdev20)