TITLE: Techniques for determining how "random" a sample is?
QUESTION [9 upvotes]: What techniques exist to determine the "randomness" of a sample?
For instance, say I have data from a series of $1200$ six-sided dice rolls. If the results were 
1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, ...

Or:
1, 1, 1, ..., 2, 2, 2, ..., 3, 3, 3, ...

The confidence of randomness would be quite low.
Is there a formula where I can input the sequence of outcomes and get back a number that corresponds to the likelihood of randomness?
Thanks
UPDATE: awkward's answer was the most helpful. Some Googling turned up these two helpful resources:

Statistical analysis of Random.org - an overview of the statistical analyses used to evaluate the random numbers generated by the website, www.random.org
Random Number Generation Software - a NIST-funded project that provides a discussion on tests that can be used against random number generators, as well as a free software package for running said tests.

REPLY [2 votes]: Computer scientists have developed a large array of tests for testing pseudo-random number generators.  These can be adapted to testing other sources o random numbers, such as rolling dice.  One source of information is Section 3.3, "Statistical Tests", of The Art of Computer Programming, Volume 2 (Seminumerical Algorithms) by Donald Knuth.  It's too large a subject to be summarized concisely, but the tests discussed by Knuth include--
(1) Equidistribution test (frequency test): numbers are uniformly distributed.
(2) Serial test: pairs of successive numbers should be uniformly distributed in an independent manner.
(3) Gap test: gaps between occurrences of a given number should follow an appropriate distribution.
(4) Poker test (Partition test): if you use the random numbers to generate poker hands, they should follow the known distribution of poker hands.
(5) Permutation test: the input sequence is divided into groups of fixed length $t$; each ordering of the elements should appear with probability $1/t!$.
(6) Run test: the lengths of increasing or decreasing sequences should follow an appropriate distribution.
And several others ...
Many of these tests involve Chi-square or Kolomogorov-Smirnov tests for their computations.
I am sure you can find many resources on-line as well; just search for "testing random number generators".