# Tagged Questions

The act of generating a sequence of numbers or symbols randomly, or (more often) pseudo-randomly; i.e., with lack of any predictability or pattern.

13 views

### Picking tuples from a list with low discrepancy

Given a list of m items, I am looking for a way to repeatedly pick a tuple of n distinct items from this list with low discrepancy. For example, suppose I have a list of 3d points, and I want to ...
43 views

### randomly generate either -1 or 1 [closed]

How do I generate values either -1 or 1 in R ? sample(0:1,10,replace=T) produces random 10 samples of either 1 or 0. If I modify this code to ...
37 views

### Is it possible to use runif() to generate a vector of random variables with different probabilities? [duplicate]

Here's the question I have to solve: Let X be a random variable with pmf as given: P(X = 1) = 0,1 P(X = 2) = 0,3 P(X = 3) = 0,6. Simulate this distribution ...
106 views

### How to create an arbitrary covariance matrix

For example, in R, the MASS::mvrnorm() function is useful for generating data to demonstrate various things in statistics. It ...
25 views

### Generating sample numbers at a spesific distribution from uniform distribution [duplicate]

It's a known fact that we can generate sample numbers at random (Uniform distribution) from any probability distribution, given its cumulative distribution function. But if we want to generate sample ...
38 views

### Where in R code should I us set.seed() function (specifically, before shuffling or after) ?

I've been using the set.seed() function to reproduce same results on multiple runs. However, I don't understand where to use the function. the reason I'm asking this is because if I use the function ...
34 views

### How to generate new random variables after using PCA for dimension reduction?

I want to be able to generate random variables, that (more or less) match the distribution of some observed data set. The data set is high dimension and I have reduced the dimension using PCA. Only ...
13 views

### Generating correlated uniform random variables [duplicate]

How can I generate two Uniform $(0,1)$ variables $U, V$ with correlation approximately .25?
34 views

### transitive dice in pseudorandom number sequences

Background: Transitive several dice that act individually as if they are uniformly random but they are built to work against each other. If you know which one your opponent chose, there is a ...
25 views

### Transformation from skewed to symmetric distribution

Let us consider a positive valued random variable $X$ which is following a positively skewed probability distribution. Is it possible to a get a function $f$ (one-to-one) for which $f(X)$ follow a ...
35 views

### Do normal random number generators give a specified sample mean or population mean?

Do normal random number generators like R's rnorm give a specified sample mean or population mean? For example does the mean argument in R's ...
16 views

### generating random matrix

My problem is this: I have a matrix with three columns. I created a second matrix with only two columns where column1 is the first column (col1) from the first matrix and column2 = 0.01*col1*col2*col3....
7 views

25 views

### Test for RVs with known probabilities?

I have written code that generates a sequence of distinct integers. The integers are assumed to occur in the sequence with fixed probabilities. For example, if the sequence contains the numbers [-1,0,...
19 views

### What are some randomness tests I can perform on a PRNG with arbitrary integral range?

I am working on developing a PRNG which transforms bits of source entropy into integers which are uniform over the range [1, N], where N is any integer greater than one. This is exactly what ...
41 views

### How to get Normal distibuted random numbers [closed]

I need to generate random numbers following Normal distribution. If X is a radius, and Y is an angle, how I can transform it into Descartes coordinates, and are they normally distributed?
48 views

### How can I output random points under a Laplacian density function in Matlab? [closed]

E.g. given a Standard Laplacian distribution: g = @(x) 1/(2*1)*exp(-(abs(x-0))/1); % Std Laplacian distribution How can I produce ...
How can you generate a sample multidimensional time series $X_{t,i}$ for $t \in \{1,2,...,T\}$ and $i \in \{1,2,...,M\}$ where: $E[X_{t,i}] = 0$ $E[X_{t,i}X_{t,j}] = \Sigma_{i,j}$ \$E[X_{t,i}|X_{t-1,...