In: Statistics and Probability
You work in the marketing department of a perfume company. You completed a survey of people who purchased your perfume, asking them how many times a week they used it. Find the outliers if exist. (Note: the data contains 24 records)Data = {7, 2, 5, 4, 7, 5, 7, 2, 5, 4, 3, 5, 7, 7, 9, 8, 5, 6, 5, 3, 15, 8, 7, 5}.
We will use R to find outliers in the data. Attached is the command marked in BOLD
x <- c(7, 2, 5, 4, 7, 5, 7, 2, 5, 4, 3, 5, 7, 7, 9,
8, 5, 6, 5, 3, 15, 8, 7, 5)
quantile(x,probs = c(0.25,0.75))
q1 <- 4.75 # First quartile
q3 <- 7 # Third quartile
iqr <- q3-q1 # inter -quartile range
lcl <- q1-1.5*r # lower limit for outlier
ucl <- q3+1.5*r # upper limit for outlier
boxplot(x)
The outlier limits are 1.375 & 10.375 . Any value outside these limits is an outlier. Also, this can be viewed from the Boxplot as well.
The outlier value is 15