Does this single value match that distribution? this feels like a very naive question but I'm having difficulty seeing the answer. 
I have one set of 30 values. Independently I obtained a 31st value. Null hypothesis is that the 31st value is part of the same distribution. Alternative is that its different. I want some kind of p-value or likelihood measure. 
Some thoughts I've had: 


*

*This is similar to wanting to do a two-sample t-test - except that for the second sample I only have a single value, and the 30 values aren't necessarily normally distributed.

*If instead of 30 measurement I had 10000 measurement, the rank of the single measurement could provide some useful information. 


How can I calculate this likelihood or p-value? 
Thanks!
Yannick
 A: In the unimodal case the Vysochanskij-Petunin inequality can give you a rough prediction interval. Here is the wikipedia site: http://en.wikipedia.org/wiki/Vysochanski%C3%AF%E2%80%93Petunin_inequality 
Using $\lambda = 3$ will result in an approximate 95% prediction interval. 
So you estimate the mean and standard deviation of your population and just use the sample mean $\bar x $ plus or minus $3s$ as your interval. 
There are a couple of problems with this approach. You don't really know the mean or standard deviation; you are using estimates. And in general you won't have unimodal distributions meaning you will have to use specialized versions of Chebyshev's inequality. But at least you have a starting point. 
For the general case, Konijn (The American Statistician, February 1987) states the order statistics may be used as a prediction interval. So $ \left[ x_{(i)},x_{(j)} \right]$ is a prediction interval for $X$ with what Konijn calls size ${{j-i} \over {n+1}}. $ Size is defined as "the greatest lower bound (with regard to the set of joint distributions that are admitted) of the probability that the interval will cover the value that $X$ is to take on." With this approach a 93.6% prediction interval would be $ \left[ x_{(1)},x_{(30)} \right].$ 
He also gives an approach attributed to Saw, Yang, and Mo: $$\left[ \bar x -\lambda \left(1 + {1 \over n}\right)^{1/2}s \ , \  \bar x + \lambda \left(1 + {1 \over n}\right)^{1/2}s \right],$$ with details on the coverage given in the article. 
For example with $n=30,$ using $\lambda = 3.2$ would give coverage exceeding 90%. 
