|
SOLUTIONS
|
Mathematica
>
Data Manipulation
>
Statistical Data Analysis
>
Probability & Statistics
>
Random Variables
>
RandomVariate
BUILT-IN MATHEMATICA SYMBOL
RandomVariate
RandomVariate[dist]
gives a pseudorandom variate from the symbolic distribution dist.
RandomVariate[dist, n]
gives a list of n pseudorandom variates from the symbolic distribution dist.
RandomVariate[dist, {n1, n2, ...}]
gives an
array of pseudorandom variates from the symbolic distribution dist.
Details and OptionsDetails and Options
- RandomVariate can generate random variates for continuous, discrete, or mixed distributions specified as a symbolic distribution.
- RandomVariate gives a different sequence of pseudorandom numbers whenever you run Mathematica. You can start with a particular seed using SeedRandom.
- With the setting WorkingPrecision->p, random numbers of precision p will be generated.
ExamplesExamplesopen allclose all
Basic Examples (5)Basic Examples (5)
Simulate a continuous probability distribution:
| In[1]:= |
| Out[1]= |
| In[2]:= |
| In[3]:= |
| Out[3]= | ![]() |
Simulate a discrete probability distribution:
| In[1]:= |
| Out[1]= |
| In[2]:= |
| In[3]:= |
| Out[3]= | ![]() |
Simulate a multivariate continuous distribution:
| In[1]:= |
| Out[1]= |
| In[2]:= |
| In[3]:= |
| Out[3]= | ![]() |
Simulate a multivariate discrete distribution:
| In[1]:= |
| Out[1]= |
Generate random numbers from a mixture distribution:
| In[1]:= |
| In[2]:= |
| In[3]:= |
| Out[3]= | ![]() |
| In[4]:= |
| Out[4]= |
| In[5]:= |
| Out[5]= |
New in 8
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »








