Minimum samples for Z-Score calculation

Hello Everyone!
I had these 2 questions:

Q1. In order to calculate an accurate Z-Score what are the minimum number of readings to be taken to calculate a accurate Z-Score.

Q2. If i keep on increasing the reading values to calculate my z-score say every 10 seconds then is it a accurate reading or not. For example. Depending on the formula we are taught, Suppose if i keep my frame_size as the number of readings i record from temperature(every time increasing after 10 seconds). then is the z-score calculated reliable?

Any material on Z-Score will also be appreciated!

Thank you very much!

  1. Z-score is an anamoly detection algorithm and so the more the data samples over a range of time, the better. However, this can also lead to more delay.
  2. ‘Useful’ and ‘Correct’ data is the key. So, it is the user who has to decide the rate of sampling data based on the application and working conditions.
1 Like

yes, as for the first one i tried but the bounds are also increasing so i find that unreliable, as the value obtained by my reading is fairly low.

for the second one can you share some sample examples so that i can get an idea,


1.Firstly the Z-Score is calculated to make understand the program that a trend of the data(temperature,light etc) for a while and to detect a much bigger change in data and then inform it the user via some kind of notifications(email,sms,telegram etc). So, to detect the anomaly we need at least certain amount of reading ie, may be 10,20, etc.As much as the readings is taken that much will be accurate the anomaly detected.

2.The Z-score analysis will detect the anomaly as per the readings taken by it.So if we try to change the reading manually the anomaly detected will be logically unreliable.
ie, for example if we are reading the temperature inside the fridge using LM35 and we need to receive a message when the fridge door is opened by someone,using Z score analysis and while we are running the program,if we keep the door of the fridge opened while the readings are being taken for making the analysis.Then after when the fridge once more then it will not detect the anomaly,because the data taken for analysis is same as that when the door is opened.

Simply put, a z-score (also called a standard score) gives you an idea of how far from the mean a data point is. But more technically it’s a measure of how many standard deviations below or above the population mean a raw score is.

A z-score can be placed on a normal distribution curve. Z-scores range from -3 standard deviations (which would fall to the far left of the normal distribution curve) up to +3 standard deviations (which would fall to the far right of the normal distribution curve). In order to use a z-score, you need to know the mean μ and also the population standard deviation σ.