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.

learn more… | top users | synonyms (2)

0
votes
1answer
28 views

Generate random number with normal distribution?

I encountered this question, where given it is a normal distribution, how do we go about it to generate a series of random numbers beside Monte Carlo? The clue given was using exponential function.
3
votes
1answer
91 views

What is this random number generation algorithm and why does it work (or does it)?

Found the following (Monte Carlo) RNG algorithm in a certain article. Let $f(x),f:\mathbb{R}^n \rightarrow \mathbb{R}$ be the function from which the samples are desired. Draw a random point $x \in ...
0
votes
0answers
19 views

Generating parallel series of random numbers

The problem: I have two data matrices (Y,X) and would like to pick random permutations of the rows in Y, to generate permuted data (Y_j, X) for j = 1,..., k. I have a computer cluster available and ...
0
votes
1answer
21 views

Poisson process to determine request arrival times in LTE network

I need some help with this problem. A Poisson process is generally used to describe the arrival of calls in a mobile network. Since I am developing a simulator for LTE, i need to implement such a ...
0
votes
0answers
34 views

Q: generating data with chi-square distribution in R

Could you give me some tips to generate data? I want to create variables X,Y and Z and the three variables follow x~$\chi^2(4)$, y~$\chi^2(2)$ and z~$\chi^2(5)$ respectively. Also, correlation of x,y ...
1
vote
1answer
42 views

Generate independent random values from a bivariate normal distribution

I am trying to independently select two sets of numbers (set 1 and set 2) from a bivariate normal distribution. I want the ...
0
votes
0answers
12 views

Realistic simulation of instrumental data

I want to simulate data collected by an instrument realistically. The problem is that if I use simple Gaussian deviates then an analysis program can guess the truth simply by computing the mean of a ...
1
vote
1answer
36 views

How do I obtain the uncertainty of a value generated from a known distribution?

I wish to semi-randomly generate values from the known distribution of a particular quantity. The distribution is represented in my data as a list of values with a probability for each value, where ...
2
votes
4answers
264 views

How to use the Cholesky decomposition, or an alternative, for correlated data simulation

I use Cholesky decomposition to simulate correlated random variables given a correlation matrix. The thing is, the result never reproduces the correlation structure as it is given. Here is a small ...
2
votes
1answer
60 views

Generating 2D different shapes with same mean and covariance matrix

Im trying to reproduce the synthetic data used in this article. The authors claim the data was generated from densities with the same mean and covariance matrix. Is there any principled way I to ...
7
votes
1answer
127 views

Generating samples from singular Gaussian distribution

Let random vector $x = (x_1,...,x_n)$ follow multivariate normal distribution with mean $m$ and covariance matrix $S$. If $S$ is symmetric and positive definite (which is the usual case) then one can ...
0
votes
0answers
23 views

dependent random number generation (if Condition1 is true, increase probability of Condition2 by X%)

In real life, a failure of an item increases the probability of failure of the next functional item in some cases. What I want to learn is how to reflect this situation in a MC simulation ...
5
votes
2answers
207 views

How to simulate censored data

I'm wondering how can I simulate a sample of n Weibull distribution lifetimes that include Type I right-censored observations. For instance lets have the n = 3, shape = 3, scale = 1 and the censoring ...
0
votes
0answers
23 views

Comparing Variance Ratio tests to Hurst exponents

I have used the Chow Denning test and the Hurst exponent (Peng, Whittle and R/S methods) to examine if a particular time series follows a random walk. My results are conflicting between the 2 tests. ...
9
votes
4answers
245 views

Is this correct ? (generating a Truncated-norm-multivariate-Gaussian)

If $X\in\mathbb{R}^n,~X\sim \mathcal{N}(\underline{0},\sigma^2\mathbf{I})$ i.e., $$ f_X(x) = \frac{1}{{(2\pi\sigma^2)}^{n/2}} \exp\left(-\frac{||x||^2}{2\sigma^2}\right) $$ I want an analogous ...
2
votes
2answers
51 views

averaging after n trials of monte carlo simulation or not? which is better statistically?

related to my job I want to code a realistic monte carlo simulation for availability, reliability and related sensitivity analysis. Scenario will be complex and there will be many parameters. What I ...
1
vote
0answers
48 views

Generation of data from a bivariate distribution

Let $X$ and $Y$ be non negative random variables with joint distribution \begin{equation} F(x,y)=1-e^{-x}-e^{-y}+e^{-x-y-\delta xy}; ~~~x\geq 0,~~y\geq 0. \end{equation} How to generate a bivariate ...
5
votes
1answer
62 views
2
votes
0answers
30 views

sample from a distribution raised to a power [closed]

If I know how to simulate the distribution $\pi(\mathbf{x})$, then is there a way to directly generate samples of $(\pi(\mathbf{x}))^\beta$ for some $\beta > 0$ ?(assume that it can be normalised ...
2
votes
1answer
55 views

Can I make a linear congruential generator with a lognormal distribution?

One of my class tasks is to make a simulation. I've gathered the data and done distribution fitting to it and the result of the distribution is log-normal. I have the code to generate random numbers ...
1
vote
0answers
20 views

How to aproach a presentation of information theory without solid background

I study first year of an applied statistics bachelor, in one of my courses i have to do a presentation of information theory and i would like to share with you my ideas about it in order that you ...
6
votes
3answers
410 views

Using Uniform Distribution to Generate Correlated Random Samples in R

[On recent questions I was looking into generating random vectors in R, and I wanted to share that "research" as an independent Q&A on a specific point.] Generating random data with correlation ...
-1
votes
1answer
67 views

rbinom() produces NA values. What's wrong?

I have to generate RV from a binomial distribution with R . I have a vector for $n$ and a vector for $p$ and for each component I have to generate a random variable. My idea was the following for ...
4
votes
3answers
132 views

Generating and Working with Random Vectors in R

I've been trying to understand random vectors and generate them in R to reproduce properties. Recently, I asked a similar question, and it was rightfully placed on-hold for being too general. Thanks ...
0
votes
1answer
63 views

How to randomize order by sets in r? [closed]

I need to randomize a list of words by sets. I have a list of 5 pairs of words and in each pair there are two words: one word in position 1 (1w1) and another word in position 2 (1w2). These pairs are ...
1
vote
1answer
71 views

beta-binomial distribution with R

I am studying an experiment of the kind: Let $n_{ij}$ be the number of fetuses, $X_{ij}$ the number of responses i.e. the number of fetuses with a malformation in the jth litter of the ith dose level ...
2
votes
1answer
57 views

Generate a random variable with a defined correlation to multiple existing variables

this question is strongly related to: Generate a random variable with a defined correlation to an existing variable. However I'm struggling to implement it in a more complex matter: Given X, a ...
2
votes
0answers
32 views

Generating random number based on random samples [duplicate]

I have a bunch of samples ~500 from a continuous distribution. The objective is to generate new random samples from this distribution. How to approach this problem? Can someone give me a pointer. I am ...
3
votes
0answers
106 views

simulating birth death process with random numbers from negative binomial

I am trying to generate random deviates for the population size at time $t$ for a birth-death process with constant birth and death rates per individual and initial size $N_0 \gt 0$. For the simple ...
2
votes
0answers
29 views

Pseudo-random numbers generators references

I am looking for a good reference to read about pseudorandom number generators. (I do not even know the difference between random and pseudorandom numbers.) Could you please offer some introductory ...
4
votes
1answer
137 views

How to generate uniformly random orthogonal matrices of positive determinant?

I've got probably a silly question about which, I must confess, I'm confused. Imagine repeated generating of uniformly distributed random orthogonal (orthonormal) matrix of some size $p$. Sometimes ...
6
votes
1answer
106 views

Simulate from a truncated mixture normal distribution

I want to simulate a sample from a mixture normal distribution such that $$p\times\mathcal{N}(\mu_1,\sigma_1^2) + (1-p)\times\mathcal{N}(\mu_2,\sigma_2^2) $$ is restricted to the interval $[0,1]$ ...
0
votes
0answers
26 views

Generating a random field from given power spectrum

How can I generate a random field in configuration space from a given power spectrum P(k)? I guess the variance of the distribution from which I extract the values of the field should be related in ...
1
vote
0answers
76 views

rnorm vs numpy.random.randn

For a regression example, I constructed some artificial data and ran ols, ...
2
votes
0answers
40 views

Generating Random Sample to Fit LM Output

I am trying to reverse generate a dataset that led to a certain R lm() output, l I tried to generate random sample like this, and ran lm() ...
2
votes
0answers
50 views

Uniformly distributed numbers (between boundaries) that sum to unity

Suppose I want to sample N values (uniformly) between 0 and 1, subject a sum-to-one constraint. One possibility would be to use a reject-step: ...
0
votes
0answers
170 views

Generate complex random vectors distributed as $\textit{proper}$ Complex Gaussian

This is different from this and this question. How can we generate (in Matlab) complex random vectors which are distributed according to the proper complex distribution $\mathcal{CN}(\vec\mu, ...
2
votes
1answer
111 views

How to draw a random sample from a Generalized Beta distribution of the second kind

For microsimulations, I (i) want to estimate parameters of an empirical distribution and (ii) draw a random sample based on the estimations. My random variable $Y$ seems to follow a Generalized Beta ...
3
votes
2answers
217 views

Given a series of numbers, generate new numbers that are “similar” to the original numbers

I'm a programmer but I don't know much about stats, so please excuse me if this question sounds naive. I have two computers that are in different locations. I have made N measurements for the ...
3
votes
0answers
42 views

Generating column stochastic random matrix with target row sums

I want to populate a 0-1 matrix, which is an adjacency matrix, corresponding to a directed graph, with weights on the elements that are 1. In other words, I want to generate an $N\times N$ matrix $A$ ...
-1
votes
1answer
108 views

generate random exponentially distributed X data between zero and a max value [closed]

For my work issues, I need to generate random exponential distributed X data between zero and a max value. In my specific case range is (0,750) I know about inverse distribution function (IDF) for ...
-1
votes
3answers
108 views

random whole number generation for a vector size 1 to 10

I am using the sample function in R -- x <- sample(1:10, 3, replace=F) -- to generate random numbers. I want to generate ...
2
votes
1answer
114 views

How do I generate two correlated Poisson random variables?

How would I simulate observations from a bivariate Poisson distribution such that they have a nonzero covariance? The hint I was given is that I need to use the fact that the sum of two Poisson random ...
0
votes
0answers
18 views

Method or Algorithm to produce near-accurate probability selection

Are there any known algorithms or methods to accurately identify, using random occurrences, the most probable next occurrence(s) as a pre-determined length of number set, by providing an already ...
8
votes
1answer
506 views

Does Monte Carlo == apply a random process?

I never had a formal statistics course but due to my line of research I'm constantly coming across articles which apply several statistical concepts. Often I'll see a description of a Monte Carlo ...
11
votes
3answers
568 views

How to generate sorted uniformly distributed values in an interval efficiently?

Let's say I want to generate a set of random numbers from the interval (a, b). The generated sequence should also have the property that it is sorted. I can think ...
4
votes
2answers
130 views

How can I generate random numbers from any given copula?

Suppose that I have a 2-dim copula function C(x_1,x_2). How can I generate bivariate numbers from this copula? For specific types of copulas, I can use 'rCopula' function of 'copula' package in R. ...
1
vote
2answers
212 views

Generating random samples with bivariate t-copula

I'm trying to generate a bivariate random sample of the t-copula (using rho = 0.8), without using the "copula" package and its function "rCopula" with method "tCopula". I'm using the following R-code: ...
1
vote
1answer
32 views

Simulating r.v.'s $X, Y, X \in [0,1]: X+Y+Z = 1\;a.s.$ given we know $E[X],E[Y],E[Z]$ and $E[X]+E[Y]+E[Z]=1$ with marginal variances $\sigma^2$

I think my title says most of my question, but let me re-state: I am trying to simulate variable percentages (i.e., X,Y,Z) on the above simplex without using the Dirichlet distribution. The reason ...
0
votes
0answers
39 views

Statistical method to prove the influence of Random Number Generators in Evolutionary Algorithms

Evolutionary algorithms (EAs) that simulate the effects of "mutation, reproduction, selection, replacement, etc." often incorporate the use of Random Number Generators (RNGs). Different EAs were ...