This question already has an answer here:

I have a rather simple problem that I'm having trouble deciding an answer upon. As a student studying Statistics I'm very familiar with terminology and theory but I suppose I'm stumped on my first real application of classroom teachings.

I have data on the size of database uploads that occur everyday. The database is ever increasing with no upper bound. Right now I'm working with about 2 months of information and we'll assume I want to keep collecting records indefinitely. eg:

03/06/13 - 239238

04/06/13 - 240594

05/06/13 - 256920


I want to generate an alert if either 1) the current day's file size is smaller than the previous day's file size 2) the current day's file size is unusually larger than expected compared to the previous day's file size

I want to stress that I merely only want an alert, or to know of when either case occurs, not to delete the record of this instance or do anything to it, as many of the searches I've tried to find of an existing question similar to mine has to do with how to handle the outlier itself.

So the problem for me is, what measure should be used to more rigorously determine if today's file size is an outlier as opposed to some arbitrary rule? I ideally want to use the given historical data rather than just saying 'if today's size is 10% bigger than yesterdays, alert me'.

Is the boxplot good enough? Is calculating and using the mean and standard deviation 'better' (browsing around would leave me to believe that the latter is outdated and the former is better)? It is entirely possible that the database would need to be cleaned leading to a large drop, or that the database would have a huge import leading to a large increase, both of which are acceptable but would throw off the mean and standard deviation.

Any help is appreciated. Thank you.


marked as duplicate by Rob Hyndman, gung, whuber Jun 26 '13 at 3:59

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.