A language called Resampling Stats and a program by the same name were developed by Dr. Julian Simon and Peter Bruce as a new way to teach Statistics to social science students. The history, description, and application of the Resampling method to a vast range of statistical problems from simple to most complex are described fully in Dr. Simon's book Resampling: The New Statistics, which is available free online.
The original Resampling Stats program has been discontinued, but the language lives on in Statistics101. Statistics101 is a clone of the Resampling Stats program, in that it implements most of Resampling Stats' commands and adds many new commands. But Statistics101 is not a clone from the viewpoint of its user interface, which is an independently created, very powerful program development system complete with full debugging support. Statistics101 is written in 100% Java and will run on Microsoft Windows, UNIX, Linux, and Apple Macintosh - any operating system that supports Java 1.4 or better.
Statistics101 executes programs written in a greatly expanded version of the Resampling Stats language. Resampling Stats is a statistical simulation language. The language is used to describe the process behind a probability or statistics problem. That process description, when executed by Statistics101 computes probability and statistics solutions without using arcane formulas or tables. Statistics101 takes advantage of the power of the personal computer to quickly run your Resampling Stats model thousands of times, each time with different random numbers or samples, keeping track of the results. When the program completes, you have your answer.
This document describes how to use Statistics101 and lists and describes in detail each of the commands supported by Statistics101.
As a very simple example, say you wanted to know the probability of getting exactly two heads in a toss of three coins. You could toss three coins many times, counting the number of times you got exactly two heads and dividing by the number of tosses. That would take considerable effort and time. You could also calculate it precisely if you knew the correct formula. Instead, with Statistics101, you could model that process as follows (text following a single quote to end of line is a comment):
URN (0 1) coin ' let 0=tails, 1=heads REPEAT 1000 ' repeat the following 1000 times SAMPLE 3 coin toss ' simulate toss of 3 coins COUNT toss =1 heads ' count number of heads SCORE heads results ' store heads count in "results" END ' end of repeat COUNT results =2 successes ' count how many results were exactly 2 DIVIDE successes 1000 probability ' probability = successes/1000 PRINT probability
The program simulates 1000 tosses of three coins and prints out the resulting probability. The output looks like this:
Here's what the above program is doing:
Put the numbers 0 and 1, representing tails and heads, into an "urn" named "coin".
Repeat the following three commands 1000 times:
Take three samples at random, with replacement, from the "urn". This is equivalent to three tosses of a coin.
Count how many of the tosses were equal to 1 (i.e., heads).
Record the number of heads in the "results" vector or list.binomialprob
Count how many of the 1000 results in the results vector were equal to two, i.e., two heads.
Calculate the probability by dividing the number of successes by the number of trials (1000).
Print the probability.
There are several example Resampling Stats programs included in the package. Some you'll recognize from Dr. Simon's book (http://www.resample.com/content/text/index.shtml) and/or the Resampling Stats website (http://www.resample.com). You can access them through the Help>Example Programs menu of the Statistics101 program. Many more examples are available from http://www.resample.com/content/examples/index.shtml. All the examples will run in Statistics101.