# Generate White Noise Based on Any Distribution

Define a family of white noise processes using different distributions.

 In[1]:= X\[ScriptCapitalP]1 = WhiteNoiseProcess[]; \[ScriptCapitalP]2 = WhiteNoiseProcess[2]; \[ScriptCapitalP]3 = WhiteNoiseProcess[UniformDistribution[{-2, 2}]]; \[ScriptCapitalP]4 = WhiteNoiseProcess[DiscreteUniformDistribution[{-2, 2}]]; \[ScriptCapitalP]5 = WhiteNoiseProcess[LaplaceDistribution[0, 1]]; \[ScriptCapitalP]6 = WhiteNoiseProcess[ MixtureDistribution[{2, 3}, {NormalDistribution[], UniformDistribution[{-1, 1}]}]];

Generate white noise based on each of these distributions.

 In[2]:= Xprocs = {\[ScriptCapitalP]1, \[ScriptCapitalP]2, \[ScriptCapitalP]3, \ \[ScriptCapitalP]4, \[ScriptCapitalP]5, \[ScriptCapitalP]6}; data = RandomFunction[#, {0, 50}] & /@ procs;
 In[3]:= XTable[ListPlot[data[[i]], Filling -> Axis, PlotRange -> {-4, 4}, PlotLabel -> Row[{"\[ScriptCapitalP]", i}]], {i, Length[procs]}]
 Out[3]=

## Mathematica + Mathematica Online

Questions? Comments? Contact a Wolfram expert »