UNIVERSITY OF BAHRAIN COLLEGE OF APPLIED STUDIES STATA231 LAB 4 Creating A boxplot Or whisker diagram DESCRIPTION: A boxplot, or box and whisker diagram provides a simple graphical summary of a set of data. It shows a measure of central location (the median), two measures of dispersion (the range and inter-quartile range), the skewness (from the orientation of the median relative to the quartiles) and potential outliers (marked individually). Boxplots are especially useful when comparing two or more sets of data. Regrettably, there is currently no boxplot facility in Microsoft Excel. For simplicity, many recent statistics textbooks omit the fences used to identify possible outliers. These simplified boxplots, displaying most of the important features, can be drawn quite easily in Excel. In the absence of any fences, a simple rule is that a whisker which is longer than three times the length of the box probably indicates an outlier. Edited by: Alaa Alsaadoon Page 1
Activity 1: How to create a multiple boxplot 1. Create folder on the desktop and name it Myboxplot. 2. Go to Start All Programs Microsoft Office Microsoft Excel 2010. 3. Enter the following Data in Sheet 1: East West north jan 47 1 5 feb 23 3 2 mar 25 6 5 apr 28 3 4 may 19 12 8 jun 24 10 9 jul 38 9 5 aug 22 80 6 4. In the same sheet do the following (see the figure) : To calculate the Minimum use the function min. To calculate the 25th percent use the Percentile function (= PERCENTILE (cell range, percentage out of 1). To calculate the Median use the function Median function (=MEDIAN(cell range) To calculate the 75th percent use the function max function. min 19 1 2 Q1 22.75 3 4.75 median 24.5 7.5 5 Q3 30.5 10.5 6.5 max 47 80 9 Edited by: Alaa Alsaadoon Page 2
5. Calculate the following using these formulas and the data from the previous table( Q1, Q2, Q3, max, min): Box-hidden = Box-lower = Box-upper = Top whisker = Bottom whisker = Q1 Median-Q1 Q3-median max-q3 Q1-min Chart Data East West north box-hidden 22.75 3 4.75 box-lower 1.75 4.5 0.25 box-upper 6 3 1.5 Top 16.5 69.5 2.5 Bottom 3.75 2 2.75 6. From the Chart Data Table Select the Column titles (west, East, north) and the numbers for (box-hidden, box-lower, box-upper with headings) See next figure. Edited by: Alaa Alsaadoon Page 3
7. Go to insert and select Column chart and select the Stacked column. Edited by: Alaa Alsaadoon Page 4
Note1: You will have only 3 columns since you have 3 sets of data column titles(east, West & North). In general you will have a number of columns corresponding the data input series. Note2: if the data series is only two you have to select only two titles for the input. Otherwise you should select all the input column titles with the first column heading( which is not a data column). Note3: If your chart contain wrong number of columns this means that your selection is wrong 8. Select box-hidden and go to Format tab in chart tools then fill No fill Edited by: Alaa Alsaadoon Page 5
9. Click the Chart Elements button 10. Click the arrow next to Error Bars More options 11. Select box-hidden Edited by: Alaa Alsaadoon Page 6
12. Select Minus from Direction and select Custom then specify value for negative and select the last data from data for chart table (bottom) 13. Do the same steps click the Chart Elements button then click the arrow next to Error Bars More options and select box-upper Edited by: Alaa Alsaadoon Page 7
14. Select Plus from Direction and select Custom then specify value for Positive and select the last data from data for chart table (Top) Edited by: Alaa Alsaadoon Page 8
15. Delete the Title and the Legend. 16. You Finish your Chart. Edited by: Alaa Alsaadoon Page 9
ADDING MORE STATISTICS CALULATIONS: For the First table (data input) in the sheet1 do the following: 1. Calculate Mean (Hint: use Average function). 2. Calculate Median (Hint: use median function). 3. Calculate standard deviation (Hint: use STDEV function). Good Luck Edited by: Alaa Alsaadoon Page 10