I have a dataset including 100 numbers.
And I have a test number.
My purpose is to decide weather this test number belongs to my dataset or not.
For this, I have to calculate a max, a min and a margin of error , these will indicate the interval of my dataset. But I don’t know how to calculate those values. Is there anyone who can help me?
In the image below

black point are my dataset.
From these data, I will calculate the blue line and a margin —> so that I can accept green ones and refuse red ones.
I suggest looking into these few examples. I think you will find all answers.
Basic things you need – Standard Deviation and Statistics:
http://algs4.cs.princeton.edu/stdlib/StdStats.java.html
Linear Regression:
http://introcs.cs.princeton.edu/java/97data/LinearRegression.java.html