text: If you are actually referring to the so called binomial distribution (0 or 1 with a pre-defined propability for each) then you need a sample of 25 where for all samples independently p(0)=0.8, p(1)=0.2. There are many ways to achieve this using excel, statistics packages or a dice.\n\nTry, for example, rolling a die and assuming:\n1 -> 1\n2-5 -> 0\n6 -> reroll\n\nThat will generate a sample from the Binomial distribution. \n\nIf you really want what you exactly described (ie arbitrary arrangement of 20 0s and 5 1s) then you need a random permutation. This, too, is relatively easy to do with a computer. You can even simulate it with the a die with the\nfollowing change:\n\nIf you roll\n1 -> 1\n2-5 -> 0\n6 -> reroll\nBUT If you get a total of 5 ones, stop rolling and consider all the rest to be zeros.\n\nNote that the permutations obtained this way are not uniformly distributed (i.e. some are more propable than others) but they are randomly distributed. \n\nFinally, here's an arbitrary list, generated in a pseudo-random manner (using a computer):\n 0 0 1 1 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0