Random process of binary (boolean) random variables
In probability and statistics, a Bernoulli process (named after Jacob Bernoulli) is a finite or infinite sequence of binary random variables, so it is a discrete-time stochastic process that takes only two values, canonically 0 and 1. The component Bernoulli variables "X""i" are identically distributed and independent. Prosaically, a Bernoulli process is a repeated coin flipping, possibly with an unfair coin (but with consistent unfairness). Every variable "X""i" in the sequence is associated with a Bernoulli trial or experiment. They all have the same Bernoulli distribution. Much of what can be said about the Bernoulli process can also be generalized to more than two outcomes (such as the process for a six-sided die); this generalization is known as the Bernoulli scheme.
The problem of determining the process, given only a limited sample of Bernoulli trials, may be called the problem of checking whether a coin is fair.
Definition.
A "Bernoulli process" is a finite or infinite sequence of independent random variables "X"1, "X"2, "X"3, ..., such that
In other words, a Bernoulli process is a sequence of independent identically distributed Bernoulli trials.
Independence of the trials implies that the process is memoryless. Given that the probability "p" is known, past outcomes provide no information about future outcomes. (If "p" is unknown, however, the past informs about the future indirectly, through inferences about "p".)
If the process is infinite, then from any point the future trials constitute a Bernoulli process identical to the whole process, the fresh-start property.
Interpretation.
The two possible values of each "X""i" are often called "success" and "failure". Thus, when expressed as a number 0 or 1, the outcome may be called the number of successes on the "i"th "trial".
Two other common interpretations of the values are true or false and yes or no. Under any interpretation of the two values, the individual variables "X""i" may be called Bernoulli trials with parameter p.
In many applications time passes between trials, as the index i increases. In effect, the trials "X"1, "X"2, ... "X"i, ... happen at "points in time" 1, 2, ..., "i", ... That passage of time and the associated notions of "past" and "future" are not necessary, however. Most generally, any "X"i and "X""j" in the process are simply two from a set of random variables indexed by {1, 2, ..., "n"}, the finite cases, or by {1, 2, 3, ...}, the infinite cases. 
One experiment with only two possible outcomes, often referred to as "success" and "failure", usually encoded as 1 and 0, can be modeled as a Bernoulli distribution. Several random variables and probability distributions beside the Bernoullis may be derived from the Bernoulli process:
The negative binomial variables may be interpreted as random waiting times.
Formal definition.
The Bernoulli process can be formalized in the language of probability spaces as a random sequence of independent realisations of a random variable that can take values of heads or tails. The state space for an individual value is denoted by formula_2
Borel algebra.
Consider the countably infinite direct product of copies of formula_3. It is common to examine either the one-sided set formula_4 or the two-sided set formula_5. There is a natural topology on this space, called the product topology. The sets in this topology are finite sequences of coin flips, that is, finite-length strings of "H" and "T" ("H" stands for heads and "T" stands for tails), with the rest of (infinitely long) sequence taken as "don't care". These sets of finite sequences are referred to as cylinder sets in the product topology. The set of all such strings forms a sigma algebra, specifically, a Borel algebra. This algebra is then commonly written as formula_6 where the elements of formula_7 are the finite-length sequences of coin flips (the cylinder sets).
Bernoulli measure.
If the chances of flipping heads or tails are given by the probabilities formula_8, then one can define a natural measure on the product space, given by formula_9 (or by formula_10 for the two-sided process). In another word, if a discrete random variable "X" has a "Bernoulli distribution" with parameter "p", where 0 ≤ "p" ≤ 1, and its probability mass function is given by 
formula_11 and formula_12. 
We denote this distribution by Ber("p"). 
Given a cylinder set, that is, a specific sequence of coin flip results formula_13 at times formula_14, the probability of observing this particular sequence is given by 
formula_15
where "k" is the number of times that "H" appears in the sequence, and "n"−"k" is the number of times that "T" appears in the sequence. There are several different kinds of notations for the above; a common one is to write 
formula_16
where each formula_17 is a binary-valued random variable with formula_18 in Iverson bracket notation, meaning either formula_19 if formula_20 or formula_21 if formula_22. This probability formula_23 is commonly called the Bernoulli measure.
Note that the probability of any specific, infinitely long sequence of coin flips is exactly zero; this is because formula_24, for any formula_25. A probability equal to 1 implies that any given infinite sequence has measure zero. Nevertheless, one can still say that some classes of infinite sequences of coin flips are far more likely than others, this is given by the asymptotic equipartition property.
To conclude the formal definition, a Bernoulli process is then given by the probability triple formula_26, as defined above.
Law of large numbers, binomial distribution and central limit theorem.
Let us assume the canonical process with formula_27 represented by formula_28 and formula_29 represented by formula_30. The law of large numbers states that the average of the sequence, i.e., formula_31, will approach the expected value almost certainly, that is, the events which do not satisfy this limit have zero probability. The expectation value of flipping "heads", assumed to be represented by 1, is given by formula_32. In fact, one has
formula_33
for any given random variable formula_17 out of the infinite sequence of Bernoulli trials that compose the Bernoulli process.
One is often interested in knowing how often one will observe "H" in a sequence of "n" coin flips. This is given by simply counting: Given "n" successive coin flips, that is, given the set of all possible strings of length "n", the number "N"("k","n") of such strings that contain "k" occurrences of "H" is given by the binomial coefficient 
formula_35
If the probability of flipping heads is given by "p", then the total probability of seeing a string of length "n" with "k" heads is
formula_36
where formula_37.
The probability measure thus defined is known as the Binomial distribution.
As we can see from the above formula that, if n=1, the "Binomial distribution" will turn into a "Bernoulli distribution". So we can know that the "Bernoulli distribution" is exactly a special case of "Binomial distribution" when n equals to 1.
Of particular interest is the question of the value of formula_38 for a sufficiently long sequences of coin flips, that is, for the limit formula_39. In this case, one may make use of Stirling's approximation to the factorial, and write
formula_40
Inserting this into the expression for "P"("k","n"), one obtains the Normal distribution; this is the content of the central limit theorem, and this is the simplest example thereof.
The combination of the law of large numbers, together with the central limit theorem, leads to an interesting and perhaps surprising result: the asymptotic equipartition property. Put informally, one notes that, yes, over many coin flips, one will observe "H" exactly "p" fraction of the time, and that this corresponds exactly with the peak of the Gaussian. The asymptotic equipartition property essentially states that this peak is infinitely sharp, with infinite fall-off on either side. That is, given the set of all possible infinitely long strings of "H" and "T" occurring in the Bernoulli process, this set is partitioned into two: those strings that occur with probability 1, and those that occur with probability 0. This partitioning is known as the Kolmogorov 0-1 law.
The size of this set is interesting, also, and can be explicitly determined: the logarithm of it is exactly the entropy of the Bernoulli process. Once again, consider the set of all strings of length "n". The size of this set is formula_41. Of these, only a certain subset are likely; the size of this set is formula_42 for formula_43. By using Stirling's approximation, putting it into the expression for "P"("k","n"), solving for the location and width of the peak, and finally taking formula_39 one finds that
formula_45
This value is the Bernoulli entropy of a Bernoulli process. Here, "H" stands for entropy; not to be confused with the same symbol "H" standing for "heads".
John von Neumann posed a question about the Bernoulli process regarding the possibility of a given process being isomorphic to another, in the sense of the isomorphism of dynamical systems. The question long defied analysis, but was finally and completely answered with the Ornstein isomorphism theorem. This breakthrough resulted in the understanding that the Bernoulli process is unique and universal; in a certain sense, it is the single most random process possible; nothing is 'more' random than the Bernoulli process (although one must be careful with this informal statement; certainly, systems that are mixing are, in a certain sense, "stronger" than the Bernoulli process, which is merely ergodic but not mixing. However, such processes do not consist of independent random variables: indeed, many purely deterministic, non-random systems can be mixing).
Dynamical systems.
The Bernoulli process can also be understood to be a dynamical system, as an example of an ergodic system and specifically, a measure-preserving dynamical system, in one of several different ways. One way is as a shift space, and the other is as an odometer. These are reviewed below.
Bernoulli shift.
One way to create a dynamical system out of the Bernoulli process is as a shift space. There is a natural translation symmetry on the product space formula_46 given by the shift operator
formula_47
The Bernoulli measure, defined above, is translation-invariant; that is, given any cylinder set formula_48, one has
formula_49
and thus the Bernoulli measure is a Haar measure; it is an invariant measure on the product space.
Instead of the probability measure formula_50, consider instead some arbitrary function formula_51. The pushforward 
formula_52
defined by formula_53 is again some function formula_54 Thus, the map formula_55 induces another map formula_56 on the space of all functions formula_54 That is, given some formula_51, one defines
formula_59
The map formula_56 is a linear operator, as (obviously) one has formula_61 and formula_62 for functions formula_63 and constant formula_64. This linear operator is called the transfer operator or the "Ruelle–Frobenius–Perron operator". This operator has a spectrum, that is, a collection of eigenfunctions and corresponding eigenvalues. The largest eigenvalue is the Frobenius–Perron eigenvalue, and in this case, it is 1. The associated eigenvector is the invariant measure: in this case, it is the Bernoulli measure. That is, formula_65
If one restricts formula_56 to act on polynomials, then the eigenfunctions are (curiously) the Bernoulli polynomials! This coincidence of naming was presumably not known to Bernoulli.
The 2x mod 1 map.
The above can be made more precise. Given an infinite string of binary digits formula_67 write
formula_68
The resulting formula_69 is a real number in the unit interval formula_70 The shift formula_55 induces a homomorphism, also called formula_55, on the unit interval. Since formula_73 one can see that formula_74 This map is called the dyadic transformation; for the doubly-infinite sequence of bits formula_75 the induced homomorphism is the Baker's map.
Consider now the space of functions in formula_69. Given some formula_77 one can find that
formula_78
Restricting the action of the operator formula_56 to functions that are on polynomials, one finds that it has a discrete spectrum given by 
formula_80
where the formula_81 are the Bernoulli polynomials. Indeed, the Bernoulli polynomials obey the identity
formula_82
The Cantor set.
Note that the sum
formula_83
gives the Cantor function, as conventionally defined. This is one reason why the set formula_84 is sometimes called the Cantor set.
Odometer.
Another way to create a dynamical system is to define an odometer. Informally, this is exactly what it sounds like: just "add one" to the first position, and let the odometer "roll over" by using carry bits as the odometer rolls over. This is nothing more than base-two addition on the set of infinite strings. Since addition forms a group (mathematics), and the Bernoulli process was already given a topology, above, this provides a simple example of a topological group.
In this case, the transformation formula_55 is given by
formula_86 
It leaves the Bernoulli measure invariant only for the special case of formula_87 (the "fair coin"); otherwise not. Thus, formula_55 is a measure preserving dynamical system in this case, otherwise, it is merely a conservative system.
Bernoulli sequence.
The term