Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
stats[statplots, boxplot] - Box Plot
Calling Sequence
stats[statplots, boxplot](data, , ...)
statplots[boxplot(data, , ...)
boxplot(data, , ...)
Parameters
data
-
statistical list(s)
shift=x
(optional, default=0) plot center shifted to x
width=w
(optional, default=1) width of the box plot
format=notched
optionally format as a notched-box plot
plotargs
additional plot options
Description
Important: The stats package has been deprecated. Use the superseding package Statistics instead.
The function boxplot of the subpackage stats[statplots, ...] gives a box plot summarizing the data in data.
A box plot comprises these elements:
1) A box with
- a central line showing the median,
- a lower line showing the first quartile,
- an upper line showing the third quartile;
2) Two lines extending from the central box of maximal length 3/2 the interquartile range but not extending past the range of the data;
3) Outliers, points that lie outside the extent of the previous elements.
Using the parameter format=notched will create a box plot with one additional feature. The sides of the box are indented, or notched, at the median line. This notch has a maximal width of 3.14 times the interquartile range divided by the square root of the total weight of the data. The notch is constrained inside the first and third quartiles.
When there is more than one statistical list in data, a box plot will be produced for each data set. Each box will be plotted on the same axes, side by side.
Box plots are quite useful to compare similar data sets. For example, one can quickly compare the monthly mid-day temperature over the period of one year by producing one boxplot per month, and displaying them side by side.
Notched-box plots can be used to determine if two random samples were drawn from the same population. If the notches of each plot overlap, it is acceptable to say that both data sets have the same distribution. However, overlapping notches do not guarantee that the data sets are identically distributed.
Another use of box-plots is as a one-dimensional summary that is inserted in the edge of a scatter plot.
Classes are assumed to be represented by the class mark, for example has the value . Missing data are ignored.
The command with(stats[statplots]) allows the use of the abbreviated form of this command.
Examples
change axes to frame:
Usually, there are more than one box plot in a statistical plot. Two sets of data can be compared in this manner:
Plotting data1 versus data2 with box plots in the margin of a scatter plot:
One of the box plots above x=14
The other box plots above x=6
Flip that one so that it is now on its side, centered at y=6
Display the composite plot.
Examples of notched box plots (use the abbreviated command):
In the following plot, one could conclude that data3 and data4 are samples from the same population, and that data5 was drawn from a different population. This is exactly the situation, since data3 and data4 come from a random sample of a chi-square distribution with three degrees of freedom, whereas data5 comes from a Student's t distribution with three degrees of freedom.
See Also
describe(deprecated)[median], describe(deprecated)[quartile], Statistics, Statistics[BoxPlot], statplots(deprecated)[xyexchange], stats(deprecated)[data]
Download Help Document