I am having trouble understanding the formal definition of the binomial distribution. $$f(k;n,p) = \Pr(X = k) = {n\choose k}p^k(1-p)^{n-k}$$
Or rather how I "transform" the definition to suit my needs. I randomly conduct 100 experiments in a Java programm with the binomial distribution. The probability of success is 40%. How would I formally write that the results are stored in a vector as is: $$(1,0,1,0,0,0,...,experiment_{100})$$