# Random Data¶

Generate random data sample.

**Inputs**

- None

**Outputs**

- Data: randomly generated data

**Random Data** allows creating random data sets, where variables correspond to the selected distributions. The user can specify the number of rows (samples) and the number of variables for each distribution. Distributions from the Scipy’s stats module are used.

- Normal: A normal continuous random variable. Set the number of variables, the mean and the variance.
- Bernoulli: A Bernoulli discrete random variable. Set the number of variables and the probability mass function.
- Binomial: A binomial discrete random variable. Set the number of variables, the number of trials and probability of success.
- Uniform: A uniform continuous random variable. Set the number of variables and the lower and upper bound of the distribution.
- Discrete uniform: A uniform discrete random variable. Set the number of variables and the number of values per variable.
- Multinomial: A multinomial random variable. Set the probabilities and the number of trials. The probabilities should sum to one. The number of probabilities corresponds to the final number of variables generated.
*Add more variables…*enables selecting new distributions from the list and with that adding additional variables. Distributions can be removed by pressing an X in the top left corner of each distribution.- Define the sample size (i.e. number of rows, default 1000) and press
*Generate*to output the data set.

- Hypergeometric: A hypergeometric discrete random variable. Set the number of variables, number of objects, positives and trials.
- Negative binomial: A negative binomial discrete random variable. Set the number of variables, number of successes and the probability of a success.
- Poisson: A Poisson discrete random variable. Set the number of variables and the event rate (expected number of occurrences).
- Exponential: An exponential continuous random variable. Set the number of variables.
- Gamma: A gamma continuous random variable. Set the number of variables, the shape and scale. The larger the scale parameter, the more spread out the distribution.
- Student’s t: A Student’s t continuous random variable. Set the number of variables and the degrees of freedom.
- Bivariate normal: A multivariate normal random variable where the number of variables is fixed to 2. The number of variables is set to two and cannot be changed. Set the mean and variance of each variable and the covariance matrix of the distribution.

## Example¶

We normaly wouldn’t create a data set with so many different distributions but rather, for instance, a set of normally distributed variables and perhaps a binary variable, which we will use as the target variable. In this example, we use the default settings, which generate 10 normally distributed variables and a single binomial variable.

We observe the generated data in a **Data Table** and in **Distributions**.