Box Plot using R

Box Plot using R

0 المراجعات

What is Boxplot 

The Box and Whisker plot, also known as Boxplot, is used to visualise distribution and skewness of numerical data by means of displaying data quartiles and means

Boxplot represents, for a set of data, the five-number summary; namely, minimum and maximum values, first and third quartiles and median. The below figure represents the elements of Boxplot

The minimum value lies at the end of the left whisker; however, the maximum value lies at the end of the right whisker

25% percentages of the data are found before the lower quartile value, while 75% of the data fall below upper quartile value. In other words, 25% of the data lies after the upper quartile value

The line that divides the box into two parts is the median. Data before this value represent the half of the total values and data after these points represent the second half

Boxplot Importance

The Boxplot divides the data into four equal portions (each portion represent 25% of the data). This fact provides us a visual insight on the summary of data in order to facilitate understanding the dispersion of data and skewness

Boxplot shows the skewness of dataset whether the skewness is positive or negative. When the median is in the middle and the distance between two whiskers are the same. Thus, the distribution is symmetric

When the median is closer to the left side and the whisker is shorter on the left side; thus, the distribution is positively skewed

When the median is closer to the right side and the whisker is shorter on the right side; thus, the distribution is negatively skewed

The smallest and largest values found at the end of whiskers are useful to provide an indication concerning the range of data. The Interquartile Range (IQR) shows 50% of dataset and can be calculated by subtracting Q1 from Q3

Boxplot Using R

Boxplot can be done by R programming by using boxplot() function. The below figure shows an example for dataset of ages. The function written is as follows:

Text Box: boxplot(Medical$AGE,main="Boxplot for AGE",xlab="AGE",ylab="Medical Data",col="blue",border="red",horizontal=TRUE,notch=TRUE)
التعليقات ( 0 )
الرجاء تسجيل الدخول لتتمكن من التعليق
مقال بواسطة

المقالات

13

متابعين

196

متابعهم

6

مقالات مشابة