represents a Bernoulli process with event probability p.
BernoulliProcess
represents a Bernoulli process with event probability p.
Details
- BernoulliProcess is a discrete-time and discrete-state process.
- BernoulliProcess at a fixed instant of time is a Bernoulli random variate with parameter p.
- BernoulliProcess can be used with such functions as Mean, PDF, Probability, and RandomFunction.
Examples
open all close allBasic Examples (3)
data = RandomFunction[BernoulliProcess[1 / 3], {0, 30}]ListPlot[data, Filling -> Axis]Mean[BernoulliProcess[p][t]]Variance[BernoulliProcess[p][t]]CovarianceFunction[BernoulliProcess[p], s, t]DiscretePlot3D[CovarianceFunction[BernoulliProcess[.3], s, t], {s, 1, 10}, {t, 1, 10}, ExtentSize -> 1 / 2, ColorFunction -> "Rainbow"]Scope (11)
Basic Uses (5)
Simulate an ensemble of paths:
data = RandomFunction[BernoulliProcess[1 / 3], {0, 30}, 4]ListPlot[data, Filling -> Axis, PlotStyle -> PointSize[Medium]]Compare paths for different values of the process parameter:
sample[p_] := (SeedRandom[3];RandomFunction[BernoulliProcess[p], {0, 30}])pars = {.1, .4, .7};ListPlot[sample[#], Filling -> Axis, PlotLabel -> StringJoin["p = ", ToString[#]]]& /@ parssample = RandomFunction[BernoulliProcess[.3], {0, 10 ^ 3}];Estimate the distribution parameter from sample data:
edist = EstimatedProcess[sample, BernoulliProcess[p]]CorrelationFunction[BernoulliProcess[p], s, t]Absolute correlation function:
AbsoluteCorrelationFunction[BernoulliProcess[p], s, t]Process Slice Properties (6)
Univariate SliceDistribution:
SliceDistribution[BernoulliProcess[p], t]Univariate slice probability density:
PDF[BernoulliProcess[p][t], x]Multi-time slice distribution:
SliceDistribution[BernoulliProcess[p], {1, 3, 7}]Higher-order PDF:
PDF[BernoulliProcess[p][{1, 3, 7}], {x, y, z}]Compute the expectation of an expression:
Expectation[x[t] + x[t] ^ 2, xBernoulliProcess[p]]Calculate the probability of an event:
Probability[3x[t] ^ 2 + 2x[t] < 3, xBernoulliProcess[p]]Skewness does not depend on time:
Plot[Skewness[BernoulliProcess[p][t]], {p, 0, 1}]Skewness[BernoulliProcess[p][t]]Limit[Skewness[BernoulliProcess[p][t]], p -> 0]Limit[Skewness[BernoulliProcess[p][t]], p -> 1, Direction -> 1]BernoulliProcess is symmetric for p=1/2:
Solve[Skewness[BernoulliProcess[p][t]] == 0, p]Kurtosis does not depend on time:
Plot[Kurtosis[BernoulliProcess[p][t]], {p, 0, 1}]Kurtosis[BernoulliProcess[p][t]]Limit[Kurtosis[BernoulliProcess[p][t]], p -> 0]Limit[Kurtosis[BernoulliProcess[p][t]], p -> 1, Direction -> 1]The minimum value of kurtosis:
FindMinimum[Kurtosis[BernoulliProcess[p][t]] && 0 < p < 1, {p, 1 / 3}]Moment[BernoulliProcess[p][t], r]CharacteristicFunction[BernoulliProcess[p][t], w]MomentGeneratingFunction[BernoulliProcess[p][t], w]CentralMoment and its generating function:
CentralMoment[BernoulliProcess[p][t], r]CentralMomentGeneratingFunction[BernoulliProcess[p][t], w]FactorialMoment has no closed form for symbolic order:
FactorialMoment[BernoulliProcess[p][t], 3]FactorialMomentGeneratingFunction[BernoulliProcess[p][t], w]Cumulant and its generating function:
Cumulant[BernoulliProcess[p][t], r]CumulantGeneratingFunction[BernoulliProcess[p][t], w]Applications (1)
Properties & Relations (5)
Bernoulli process is weakly stationary:
WeakStationarity[BernoulliProcess[p]]Bernoulli process has a well-defined StationaryDistribution:
StationaryDistribution[BernoulliProcess[p]]Transition probability does not depend on the current state:
Probability[(x[t2] == x2)(x[t1] == x1), xBernoulliProcess[p]]A BinomialProcess
is the sum of a BernoulliProcess
with
:
SeedRandom[3];bernoulli = RandomFunction[BernoulliProcess[p = 17 / 32], {20}];ListPlot[bernoulli, Filling -> Axis]accumulated = Accumulate[bernoulli]ListPlot[accumulated, Filling -> Axis]Compare to the BinomialProcess:
SeedRandom[3];
sample = RandomFunction[BinomialProcess[p], {1, 21}];binomial = TimeSeriesShift[sample, -1];ListPlot[{binomial, accumulated}, Filling -> Axis, PlotStyle -> {PointSize[.05], PointSize[0.02]}, PlotLegends -> {"binomial", "accumulated Bernoulli"}]Bernoulli process satisfies the law of large numbers:
proc = BernoulliProcess[1 / 3];The mean function is constant:
m = Mean[proc[t]]sample = Mean[RandomFunction[proc, {10 ^ 7}]["Values"]]m - %//NNeat Examples (1)
Simulate paths from a Bernoulli process:
data = RandomFunction[BernoulliProcess[.7], {20}, 500];Take a slice at 20 and visualize its distribution:
sd = data["SliceData", 20];cf = ColorData["DarkBands"];
sliced = BarChart[Last[#], Axes -> False, BarOrigin -> Left, AspectRatio -> 4, ChartStyle -> (cf /@ First[#]), ImageSize -> 40]&[HistogramList[sd, {-0.5, 1.5, 1}]];Plot paths and histogram distribution of the slice distribution at 20:
ListStepPlot[data, ImageSize -> 400, PlotRange -> All,
AspectRatio -> 3 / 4, Epilog -> Inset[sliced, {20.5, .5}, {0, 1.5}], PlotStyle -> (cf /@ sd), BaseStyle -> Directive[Thin, Opacity[0.5]], PlotRangePadding -> {{0, 10}, {.5, 1}}]See Also
Related Guides
History
Text
Wolfram Research (2012), BernoulliProcess, Wolfram Language function, https://reference.wolfram.com/language/ref/BernoulliProcess.html.
CMS
Wolfram Language. 2012. "BernoulliProcess." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/BernoulliProcess.html.
APA
Wolfram Language. (2012). BernoulliProcess. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BernoulliProcess.html
BibTeX
@misc{reference.wolfram_2026_bernoulliprocess, author="Wolfram Research", title="{BernoulliProcess}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/BernoulliProcess.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_bernoulliprocess, organization={Wolfram Research}, title={BernoulliProcess}, year={2012}, url={https://reference.wolfram.com/language/ref/BernoulliProcess.html}, note=[Accessed: 12-June-2026]}