To get started with StatCrunch on your server, follow the instructions listed below. Please note that no technical expertise is required for installation.
- Download StatCrunch 5.0
Download statcrunch5.0.zip, and unzip this file in a Web accessible location on your server. This will create a new statcrunch5.0 directory on your Web server. Please note that the latest update was made to StatCrunch 5.0 on March 9th 2010. If you are working with an earlier version, you will need to update your installation for the techniques mentioned below to work properly.
- Create a free demo license
To get started, update the contents of the license.txt file in the statcrunch5.0 directory on your server by creating a free demo license using this form. The demo license lasts for 10 days from the point of creation. Once a demo license is created your domain will not be eligible for a new demo license for 20 days.
- Purchase a site license
Both academic and commercial StatCrunch site licenses are available with the price depending on the type of organization and the anticipated number of users. To start the purchasing process for a site license, use this form. A Pearson sales representative will then contact you with a quote for the site license with detailed payment information. When payment is received, the license will be activated and a notification will be sent to the email specified below. After receiving confirmation, follow the instructions below to update your license file.
- Updating the license.txt file
Once you have purchased a new StatCrunch license or if you would like to change the passcode required for accessing StatCrunch on your site, then you will need to update the contents of the license.txt file in the statcrunch5.0 directory using this form.
To access StatCrunch on your Web server simply open the statcrunch5.0 directory from the proper location in your server hierarchy. For example, if you installed statcrunch5.0 in the top level directory of your Web server, you would open a url of the form
where www.myserver.com is replaced with the name of your Web server. Note that some Windows servers require you to also include the file name index.html at the end of the above address. The location of this directory and the index.html file will be very important when considering the options for connecting data to StatCrunch described below.
One of the biggest advantages of StatCrunch over other statistics packages is that it is very easy to load data into the package on the fly. For example, one might want to have a listing of data sets that are linked to StatCrunch so that when a user clicks one of the links, the associated data set will open in StatCrunch. As another example, one might want to randomly generate data for an exercise so that each student works with a different data set. Detailed instructions for three techniques for including data with StatCrunch are given below.
- Loading data from statcrunch.com
Data sets from statcrunch.com can be easily accessed from the StatCrunch tool installed on a remote server. This exciting new feature opens up a world of data to the StatCrunch users on remote sites. Under the Data > Load data > from statcrunch.com menu, one can choose to load data sets from the following statcrunch.com sources:
- Shared Data Sets: The statcrunch.com web site contains a number of shared data sets posted by the siteŐs users
which can be viewed and searched by choosing the Explore > Data option at the statcrunch.com site. These data sets
are also accessible in a similar manner to remote StatCrunch users using this option. A remote user is not required to have a
statcrunch.com account to access these data sets.
- Public Groups: The statcrunch.com site also features a number of public groups with data sets that are openly
available. For example, the data sets from the 11th edition of Elementary Statistics by Marty Triola can be found in
this group. Collections of data sets from
additional textbooks and other sources can be found by searching the groups available under the Explore > Groups
listing at the statcrunch.com site. The data sets shared via these public groups are accessible to remote StatCrunch users
using this option. A remote user is not required to have a statcrunch.com account to access these data sets.
- My Data: Each statcrunch.com user has a My Data listing which displays all of the data sets the user has
loaded at the statcrunch.com site. If a remote StatCrunch user is logged in at the statcrunch.com site, access to this
listing of the userŐs personal data sets is available with this option. Otherwise, choosing this option will open a new
window for the user to log in at the statcrunch.com site.
- My Groups: Each statcrunch.com user has a My Groups listing displaying all of the groups (both public
and private), which the user has joined. If a remote StatCrunch user is logged in at the statcrunch.com site, the data sets
within each of the userŐs groups are accessible with this option. Otherwise, choosing this option will open a new window
for the user to log in at the statcrunch.com site. The first time a user chooses this option within a StatCrunch session
they will be prompted to select a group, which contains data sets of interest.
- My Surveys: One of the latest and greatest features of the statcrunch.com site is the ability to conduct surveys. Each statcrunch.com user has a My Surveys listing containing the surveys they have created on the statcrunch.com site. If a remote StatCrunch user is logged in at the statcrunch.com site, the data collected from each of theses surveys is accessible using this option. Otherwise, choosing this option will open a new window for the user to log in at the statcrunch.com site.
The connection to statcrunch.com data sources outlined above may be most useful in an academic setting. Many academic institutions license and install StatCrunch on their own server for use by their students, faculty and staff. In this sort of situation, instructors have free access to statcrunch.com for loading data sets, which they can then access from any classroom. Also, these instructors may also survey students in the classroom and have immediate access to the resulting data for instructional purposes. A statcrunch.com account is not required for completing a survey so students can participate in this manner at no cost to them. Another option for such instructors is to create a public group at the statcrunch.com site that contains all of the data sets required for a specific course. Their students can then freely access these data sets using the Public Groups option described above.
- Shared Data Sets: The statcrunch.com web site contains a number of shared data sets posted by the siteŐs users which can be viewed and searched by choosing the Explore > Data option at the statcrunch.com site. These data sets are also accessible in a similar manner to remote StatCrunch users using this option. A remote user is not required to have a statcrunch.com account to access these data sets.
- Embedding the StatCrunch applet in a Web page
Once StatCrunch has been licensed for a particular domain, the applet may be included on any web page within that domain. Please note, however, that the StatCrunch applet should only be included on a web page that is password protected. For institutions that do not wish to use their own password protection scheme, a passcode can be required as part of the StatCrunch license installation. StatCrunch users on a remote server are only required to enter the passcode once per browser session.
StatCrunch can be easily embedded in a web page using the applet tag shown below with the codebase argument updated to point to the local installation of StatCrunch 5.0. The width and height parameters can be expressed as integer values (as shown below) or with percent signs (e.g. 90%) so that the applet will be sized using the appropriate percentages of the browser window's width and height.<APPLET code="webstat.class" codebase="http://www.myserver.com/statcrunch5.0/" archive="statcrunch.jar,SX.jar" width=600 height=300>
By adding the three additional parameters described below, the StatCrunch applet can also be embedded with a specific data set loaded:
- dataurl - this parameter for the StatCrunch applet is used to specify the Web address of the data file to be
loaded. The StatCrunch applet can load both text and Excel (xls or xlsx) files, but text is preferred for faster loading.
The data file itself is not required to be on the same web server that hosts StatCrunch.
- dlim - this parameter designates the delimiter which separates data values in the file.
Data values that contain the delimiter need to be placed in double quotes to be read into StatCrunch properly.
This parameter is not required for Excel files. The options for this
- any - (meaning any combination of whitespace characters: space, tab, etc...)
- comma (for csv files).
- ft - this parameter specifies whether or not the first row in the data file contains column names. Set the value to true if the first row contains column names or false otherwise. In general, the first row should contain column names for linked data sets so that the data set has the proper setting.
As an example, consider the data file from the second edition of Michael Sullivan's Statistics: Informed Decisions Using Data with the Web address shown below:
This data file is a text file with a tab delimiter where the first row contains column names. The html code to include StatCrunch on a web page with this data set loaded is shown below. Note this code will require the codebase arguement to be updated to the proper location on your server.<APPLET code="webstat.class" codebase="http://www.myserver.com/statcrunch5.0/" archive="statcrunch.jar,SX.jar" width=600 height=300>
<PARAM name="dataurl" value="http://www.statcrunch.com/sullivan/3_1_26.txt">
<PARAM name="dlim" value="tab">
<PARAM name="ft" value="true">
For loading smaller data sets or data sets that are randomly generated, the dataurl method described above may not be very convenient since the data sets must be stored as or generated from separate files on a web server. In this case, the addColumn method described below may work better. For each column to be added to StatCrunch, the three parameters below should be specified where # is replaced with the integer value representing the location of the column within StatCrunch, 1 for the first column, 2 for the second column, etc...:
- addColumn# - this parameter contains a listing of the data values for this column
- addColumn#name - this optional parameter specifies the name of this column. If it is not specified, the
name var# will be used for the column.
- addColumn#dlim - this parameter designates the delimiter to be used for the values listed under the addColumn# parameter. This parameter is optional with default value of any. See the discussion of the dlim parameter above for other possible delimiter values. Using the tab delimiter with the addColumn technique is strongly discouraged because of cross browser implementation issues. Note also that it is not possible to load values that contain the delimiter with this approach since double quotes are not allowed inside an applet param statement.
To load a two column data set with the first column named digits containing the values 1, 2, 3 and 4 and the second named letters containing the values A, B, C, and D, use the html code shown below.<APPLET code="webstat.class" codebase="http://www.myserver.com/statcrunch5.0/" archive="statcrunch.jar,SX.jar" width=600 height=300>
<PARAM name="addColumn1Ó value="1 2 3 4">
<PARAM name="addColumn1name" value="digits">
<PARAM name="addColumn2Ó value="A B C D">
<PARAM name="addColumn2name" value="letters">
This approach can be easily used in conjunction with a scripting language to load random data into StatCrunch.
- dataurl - this parameter for the StatCrunch applet is used to specify the Web address of the data file to be loaded. The StatCrunch applet can load both text and Excel (xls or xlsx) files, but text is preferred for faster loading. The data file itself is not required to be on the same web server that hosts StatCrunch.
- Linking data sets to the index.html file
Many content management systems do not allow users to input raw html as required with the applet tags described above. As an example, the Blackboard course management system does not allow instructors to enter raw html code when creating exercises. In such cases, links to the index.html file located within the local installation of StatCrunch 5.0 can be used to connect data sets to StatCrunch. Parameters can be passed to the StatCrunch applet via the query string of such a link. The query string is the part of the link after the question mark as indicated below.http://www.myserver.com/statcrunch5.0/index.html?query_string
The parameters within the query string are constructed as a set of name/value pairs with each parameter name and value separated by an equal sign. The value itself may need to be URL encoded. For example, the value of the dataurl parameter is a Web address that contains characters that need to be URL encoded. For example, modifying the link below to point to the index.html file on a remote Web server will connect the Sullivan data set described above to StatCrunch.http://www.myserver.com/statcrunch5.0/index.html?dataurl=http%3A%2F%2Fwww.statcrunch.com%2Fsullivan%2F3_1_26.txt&dlim=tab&ft=true
This query string approach described above can also be used in conjunction with the addColumn method to avoid creating a separate file for each data set to be linked. For example, a modified version of the link below can be used to open the data set of digits and letters described above. Note that the spaces separating the values are URL encoded as %20.http://www.myserver.com/statcrunch5.0/index.html?addColumn1=1%202%203%204&addColumn1name=digits&addColumn1dlim=any&addColumn2=A%20B%20C%20D&addColumn2name=letters&addColumn2dlim=any
For more information on URL encoding, see http://www.w3schools.com/TAGS/ref_urlencode.asp. The StatCrunch software itself can generate URL encoded links such as the one above using the Data > Link data menu option.
Please note that different Web browsers place different limits on the maximum length of a link such as the one above. Microsoft's Internet Explorer limits the length to 2083 characters while other browsers have much higher limits. These limits should be considered when linking data sets to StatCrunch using this technique.