Probability that a set of numbers is non-random?


I'm wondering if anyone knows the answer to this:

For a set of X numbers with a median of Y and a standard deviation of Z, where a set determined randomly according to a Gaussian distribution would have a median of 0, what is the probability that the median Y indicates that the set of numbers is non-random? In other words, based on knowing how many numbers are in the set, what the median is, and what the standard deviation is, can one know the percent chance that the distance of the median from 0 reflects a non-random distribution of the set, versus the percent chance that the set could have been generated randomly? What would be the formula to determine this probability?

I'm asking because of an interest in analyzing financial data to determine non-random patterns.

The thing you describe is called a one-sample t-test. Basically, given your measured sample mean mu and sample standard deviation sigma, you form the quantity

t = \frac{\mu - \mu_0}{\sigma / \sqrt{n}}

where mu-naught is the assumed mean of the population, which in your case you are saying is zero. For large n, t is approximately normally distributed, so the probably of getting t as large as you measure it to be is just the tail probability of a Gaussian distribution for |z| > |t|.

By the way, if you want to test not just that the mean is compatible with a standard normal, but that the whole of the distribution is compatible with a standard normal, you want a more sophisticated test than the t-test, such as a Kuiper or Andersen-Darling test.