The Mathematica programming language has basic commands and subroutines which implement all basic statistics (and many other things). A general introduction to Mathematica use and how Mathematica can be accessed at UMBC can be found in a separate document.
The most natural way to represent a statistical data set is as a list, for example mydata = {1.2, 2.1, 1.1, 2.3, 0.2, 1.2}.
The Mean, Median, StandardDeviation, Variance and Quantile commands implement basic summary statistics.
Examples:
mydata = {-3.1, 3.6, 0.5, 0.5, 4.8, -2.2, 2.0, -2.2, -4.1, -4.6}Mean[mydata]Median[mydata]Commonest[mydata]{-2.2, 0.5} - similar to mode function)Quantile[mydata,1/2]Quantile[mydata,1/4]StandardDeviation[mydata]Note that if the data is all integers, the results will be a fraction,
not a floating point number. Thus Mean[{1,2,3,4}] returns
5/2, while Mean[{1.0,2,3,4}] and N[Mean[{1,2,3,4}]]
both return 2.5.
The use of Mathematica for Basic Statistics is well documented on the Wolfram.com
website at [http://reference.wolfram.com/mathematica/tutorial/BasicStatistics.html].
Mathematica and its various standard packages implement a variety of graphs useful for exploratory data analysis.
Histogram command can be loaded with
a standard package - before Mathematica 6.0 it was in the package
Graphics`Graphics`, and in Mathematica 6.0 it is in
the package Histograms`.
Needs["Histograms`"]
Histogram[mydata]Histogram[mydata,HistogramCategories->5]Histogram[mydata,HistogramCategories->{-5,-3,-1,1,3,5}]http://reference.wolfram.com/mathematica/Histograms/ref/HistogramCategories.html]
BoxWhiskerPlot command can be loaded with
a standard package - before Mathematica 6.0 it was in the package
Statistics`StatisticsPlots`, and
in Mathematica 6.0 it is in the package StatisticalPlots`.
Needs["StatisticalPlots`"]
BoxWhiskerPlot[mydata]http://reference.wolfram.com/mathematica/StatisticalPlots/ref/BoxWhiskerPlot.html]
ListPlot command.
ListPlot[{{x0,y0},{x1,y1},{x2,y2},{x3,y3}}]
ListPlot command.
ListPlot[{{x0,y0},{x1,y1},{x2,y2},{x3,y3}}]
Fit[{{x0,y0},{x1,y1},{x2,y2},{x3,y3}},{1,x},x]
Covariance[{x0,x1,x2,x3},{y0,y1,y2,y3}]
Correlation[{x0,x1,x2,x3},{y0,y1,y2,y3}]