Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Choose Language Hide Translation Bar

Create a Box Plot from a Five-Number Summary

Problem

Instead of a full data set, you have a summarized version that contains the five numbers needed to define a box plot.

Solution

You can use frequencies to mimic a full data set based on the five-number summary. If you enter the five data points in a data table and then create a second column with frequencies that force your data points to be at the appropriate quantiles, you can use that data table as if it were the raw data. For a box plot with endpoints at the 5% and 95% quantiles, you could use the five-point summary 3, 15, 20, 40, 42 with frequencies of 5, 20, 25, 25, and 20, respectively. The following JSL gives an example:

Names Default To Here( 1 );
dt = New Table( "Boxplot",
	Add Rows( 5 ),
	New Column( "Summary Point",
		Numeric,
		"Continuous",
		Format( "Best", 18 ),
		Set Values( [3, 15, 20, 40, 42] )
	),
	New Column( "Freq",
		Numeric,
		"Continuous",
		Format( "Best", 18 ),
		Set Values( [5, 20, 25, 25, 20] )
	)
);

dt << Graph Builder(
	Variables( Y( :Summary Point ), Frequency( :Freq ) ),
	Elements( Box Plot( Y, Legend( 7 ) ) )
);

Discussion

The summarized values above are for illustration purposes and can be replaced by other values.

See Also

Discussion Post

Article Labels

    There are no labels assigned to this post.

Article Tags
Contributors