private static XYDataset createDataset()
	{
		XYSeries actual = new XYSeries("Actual number of comparsions");
		XYSeries average = new XYSeries(
				"Calculated average number of comparsions  - 2N * ln(N)");

		for (int k = 100; k <= 10000; k *= 10)
		{
			Double a[] = new Double[k];
			for (int i = 0; i < k; i++)
				a[i] = StdRandom.uniform();
			int numCmp = sort(a);
			assert SortHelper.isSorted(a);
			actual.add(k, numCmp);

			// average number of accessses is 2N * ln(N)
			average.add(k,
					Math.floor(2 * a.length * Math.log((double) a.length)));
		}
		XYSeriesCollection dataset = new XYSeriesCollection();
		dataset.addSeries(actual);
		dataset.addSeries(average);
		return dataset;
	}