Friday, August 13, 2010

Finite sampling demonstator

This is a mirror of an article in our

Given a finite population S with N elements which may not be unique (some elements are repeated),
we extract a finite sample X with n elements where n < N. The way we extract the n elements may be done in the following manner:

  1. Permutions without replacement.
  2. The ordering of the sample elements is important and a sample element once chosen in the sample may NOT be chosen again.
  3. Permutations with replacement.
  4. The ordering of the sample elements is important and a sample element once chosen in the sample may be chosen again.
  5. Combinations without replacement
  6. The ordering of the sample elements is NOT important and a sample element once chosen to be in the sample is not available again.
  7. Combinations with replacement
  8. The ordering of the sample elements is NOT important and an element chosen to be in the sample may still be chosen again.

The total number of samples for each type of finite sampling above is given in the following table:

Number of Samples
sampling CombinationsPermutations
without replacement $$\frac{N!}{n! (N-n)!}$$ $$\frac{N!}{(N-n)!}$$
with replacement \frac{(N+n-1)}{n!(N-1)!} $$N^n$$

Let $$S = [s_0, s_1, s_2, ....,s_{N-1}]$$. Our generated sample X is actually X = $$[s_{i_0}, s_{i_1}, ...., s_{i_{n-1}}]$$
where the indices $$i_0 to i_{n-1}$$ is sequentially generated by a combinatorial algorithm.

We may be interested in one the following statistic which is a random variable for the totality of all samples:

  1. sample mean
  2. sample sum or total
  3. sample s.d.(standard deviation) (divisor is n-1)
  4. populaton s.d(divisor is n)
  5. sample var (sample variance)(divisor is n-1)
  6. population variance(population variance) (divisor is n)
  7. sample vaiance(sample variance) (divisor is n-1)
  8. sample max (maximum value)
  9. sample min (minimum value)
  10. range (max - min )

We wish to gather data on ALL possible finite samples for the desire statistic,
the mean and standard deviation and of course the distribution table for the statistic which contain the
Columns for statistic, frequency, (rf) relative frequency, (crf) cumulative relative frequency. x rf

Here is a complete example for the sum of the numbers which show up in a throw of three dice:
The population consists of [1,2,3,4,5,6].
The population size is 6.
The sample size is 3.
The ordering is considered important, for example [1,3,2] will be considered different from [3,1,2]. Thus it
is a permutation with replacement.
The "first" sample is [1,1,1] with a total of 3 and the "last" sample is [6,6,6] with a total of 18.
To help with our computations, we use our solvers hosted at www.extreme. to do it for us!

We will only show the generated frequency distribution table as the 216 generated samples is too long for this page.

Sampling Statistic Frequency Distribution Table
xfrf crfx rf(x-mu)^2 rf
Finite Population Parameters, Correction factor=0.774596669241
(6, 3) 3.5 2.91666666667 1.70782512766 3.5 1.87082869339

Visit the solver Extreme Solvers: Stats sampling

Be sure to specify the right parameters for the solver for the above example, see the screen below:

No comments:

Post a Comment