I have set of 1000 samples. each sample represents MEAN of X amount transactions response time.

Now I have a running transaction , I know it's current response time but I want to know if this particular transactions elapsed time is normal relative to my all previously collected sample.

is there a statistical method that is a good fit for this case ?

  • $\begingroup$ I don't think the question is answerable without additional information. What is the distribution of transaction response time? Is it Gaussian? Can you edit the question to add a histogram of response times? (not a histogram of means; a histogram of the individual transaction response times) $\endgroup$ – D.W. Apr 13 '17 at 20:41
  • $\begingroup$ thank you for answering. data is like 80 ms 81 ms 84 ms 79 ms 86 ms .... it is a normal distribution. in other words. data is not skewed. $\endgroup$ – deb Apr 13 '17 at 20:49
  • 1
    $\begingroup$ @deb, could you clarify what you meant by 'is normal relative to my all previously collected sample'? $\endgroup$ – fade2black Jun 13 '17 at 2:29

You can't, from the information listed.

You say in the comments that the distribution of transaction times is Gaussian. A Gaussian distribution has two parameters: $\mu$ (its mean) and $\sigma^2$ (its variance). Based on the 1000 observed values, you can make a good estimate of what the underlying value of $\mu$ is. However, there is no way to infer $\sigma^2$, the variance. Consequently, when you observe a new transaction time, you can't tell whether it is normal or abnormal.

Suppose $\mu = 100$ and you observe a transaction whose response time is $105$. Is that abnormal? There's no way to know. If the variance of the Gaussian distribution is $0.1$, it is highly abnormal. If the variance is $10$, it is entirely typical/normal.

  • $\begingroup$ @deb has 1000 samples. He may visualize the data, and infer mean and variance. Also the graph can suggest whether or not the data is distributed according to the normal distribution. $\endgroup$ – fade2black Jun 12 '17 at 23:59
  • $\begingroup$ @deb, Also "normality" may depend on what bounds you choose on the normal curve. For example you may consider the running time to be "abnormal" if it is two times standard deviation beyond the mean (out of 95%). Read about z-scores. $\endgroup$ – fade2black Jun 13 '17 at 0:05
  • $\begingroup$ @fade2black please, visualizing data requires to calculate it. Also if this is automatic detection, it would require some human to gaze at the plot and manually tag it. Reading the plot is not the best idea possible. Deb is gone for some time, buf you have an answer, by all means please write it. $\endgroup$ – Evil Jun 13 '17 at 0:10

Generally, data gathered from natural phenomena obeys normal distribution, I think your data should obey the normal distribution as well. The more you have data the better you may do estimation or prediction. Wikipedia says:


There are many methods to do the test.


But if your sample data is fixed ( I mean does not change with time) then you can precompute necessary statistics and later compare and draw conclusion in $O(1)$ time. But I would update my sample data once a day or hour, and then check it visually (for example you may detect outliers) and recompute statistics on a regular base.

  • $\begingroup$ @Evil, do you understand exactly what OP means by "normal" in his original sentence "elapsed time is normal relative to my all previously collected sample"? What do you mean by "fit" in your comment? => "...OP asks about testing if the sample fits the collected samples" $\endgroup$ – fade2black Jun 13 '17 at 2:13

Your Answer

