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)

1
vote
0answers
9 views

How do i generate variables that are relevant only for some classes?

I want to generate data for classification. I've generated data with 10 variables with two are relevant for all classes and 8 noise. now, I want to generate variables that are relevant just for some ...
1
vote
1answer
31 views

R: random sampling for multivariate normal and log-normal distributions

I want to generate random monthly (m) temperature (T) and Precipitation (P) data considering that both variables are intercorrelated (rTP[m]) The tricky thing is that my random variables that have ...
4
votes
1answer
39 views

Generate pseudo-random overdispersed Poisson numbers

I have multiple sets of data which conform to overdispersed Poisson distributions which I can model with the alternative parameterization of a negative binomial distribution ($\mu$ and $D$ instead of ...
0
votes
0answers
15 views

Finding extreme values in a normal distribution [migrated]

I want to find extreme values (anything greater or less than three times standard deviation from the mean) after generating a set of random numbers using: ...
1
vote
0answers
9 views

How is the constant in Marsaglia's xorshift* RNG determined?

I get Marsaglia's basic xorshift RNG. For further randomness he suggests multiplying the result by a "suitable constant." This is some code I've found that does just that: ...
2
votes
1answer
41 views

Are all sequences of of random (uniform) numbers also uniformly distributed?

If I take some sequences of random numbers generated by a random number generator with uniform distribution, will the resulting sequences be uniformly distributed as well? By example, if I have a ...
6
votes
1answer
229 views

Generate random numbers following a distribution within an interval in R

I need to generate random numbers following Normal distribution within the interval $(a,b)$. I know the function rnorm(n,mean,sd) will generate random numbers ...
1
vote
0answers
12 views

Generating hyperbolic variates

How do you simulate from the hyperbolic distribution? The Wikipedia article on it does not describe how to do so. I know that the hyperbolic distribution is a special case of the generalized ...
1
vote
1answer
67 views

Sampling from a lognormal distribution

Suppose we are given $\mu$ and $\sigma$ for a lognormal distribution with random variable $X$. $\mu$ is the mean of the variable's logarithm and $\sigma$ is the standard deviation of the variable's ...
2
votes
1answer
40 views

Misconceptions about random numbers in a range

I am currently working on a project the includes fitting. For the fitting I would like to try uniform random starting parameters. The possible fit parameters can lie in quite a large range, for ...
3
votes
2answers
65 views

Generate random number from a piecewise exponential distribution

I would like to generate a random number from a piecewise exponential distribution. I consider that the time-scale is divided in $J$ intervals with bounds $(s_{j-1},s_j]$, for $j=1,...,J$, and ...
0
votes
1answer
54 views

Generate data from a bivariate power-law distribution in R

I need to generate data from a random vector that follows a bivariate power-law: $$ f_{X,Y}(x,y) = \frac{C}{XY} \left(\frac{X}{X_0} \right)^{-\alpha} \left(\frac{Y}{Y_0} \right)^{-\beta} , $$ where ...
2
votes
0answers
59 views

What kinds of PRNG exist outside Linear congruential generators?

I'm kinda running out of words, Linear congruential generator are really low quality PRNG but it was all I needed for some basic stuff, now I need to fill the blank and get to know other families of ...
1
vote
4answers
64 views

Are integer results from random number generators unlikely?

If I generate a random float value between 0…1, say to 40 digits, or n digits, aren't the chances of getting a true zero (0) or a true one (1) incredibly small? On the zero condition, every 0–9 digit ...
3
votes
1answer
38 views

How to get only positive values when imputing data?

Suppose age is normally distributed with mean 20 and standard deviation 5. How do you ensure that you get only positive values when you sample age from this distribution? I am trying to impute ...
0
votes
1answer
35 views

How can I do a chi-square test without being given the critical value table?

I have a random number generator that generate integers within [0, r). I want to write a piece of code to test whether the numbers from it are truly uniformly ...
6
votes
1answer
131 views

Is there a name for this process/ distribution?

Does the equation below have a name, or is it similar to some other well-known process/ equation? Equation of interest: $$S_c = S_{c-1} + S_{c-1}\omega_c\delta_c$$ $\delta\sim\mathcal{N}(0,1)$ is a ...
0
votes
1answer
28 views

R-commander. Generate random data depending on the means and SDs of different populations

I have 3 different populations, represented by their specific means and SDs. So I have 3 means with their 3 SDs: Mean1 = 5.5 SD1 = 0.65 Mean2 = 5.9 SD2 = 0.32 Mean3 = 5.4 SD3 = 0.49 If I want ...
2
votes
3answers
101 views

impossible distribution statistics?

I'm currently reviewing an article where authors presented distribution statistics that look erroneous to me. But I'm not able to find a way to ascertain it. The article presented results with a mean ...
1
vote
1answer
64 views

Creating data that follows a specific data distribution

I have a variable z which has around 3000 values between 0.0 and 0.5. I have plotted here z in the y-axis and 3000 evenly spaced numbers over the interval 0.0 and 0.5 in the x-axis so that one can ...
4
votes
1answer
207 views

Simulate regression data with dependent variable being non-normally distributed

For regression analysis, it is often useful to know the data generating process to check how the used method works. While it is fairly simple to do this for a simple linear regression, this is not the ...
0
votes
1answer
38 views

Generating gamma random field with given covariance matrix

I have to generate multivariate gamma distributions with given positive-definite covariance matrix. Anyone can suggest me a method? Thanks,
4
votes
1answer
44 views

Best way to generate Gaussian Field

I have to generate a homogeneous Gaussian Field with given correlation function of each points on a three dimension grid (500 x 500 x 500). A Cholesky decomposition method fails because of huge number ...
0
votes
0answers
19 views

Generating random field

I want to learn how to generate a random field with long-range spatial correlations and the underlying distribution being a beta distribution. EDIT: Is it possible to take a random Gaussian field, ...
0
votes
0answers
23 views

How can people emulate a RNG; Give the 'most random' sequence of numbers

Not sure if I should ask this at math or here but anyway. I am wondering what we as people could do if we were asked to produce a random sequence of numbers (let's say between 1 and 1000). I'd say it ...
4
votes
1answer
60 views

Testing if code is generating random variables consistent with theory

In software development, we often write unit tests to ensure that a particular portion of the code is working as expected. For example, consider the problem of drawing a color at random from ...
5
votes
2answers
133 views

Test the randomness (uniformly distributed) on a 64 bit float random generator

We have a random number generator which is supposed to generate 64 bit floats, uniformly. We want to test whether it is a good uniformly random. I am not asking the general way to test it, as it was ...
3
votes
2answers
209 views

Choosing a discrete non-uniform distribution for generating random integers

I have a list $l$ containing integers in the range $[1,max]$ On list $l$ I do an operation $isPresent(x)$ which return true if ...
2
votes
1answer
82 views

Using Poisson distribution to generate random integers

I'm trying to generate random integers which have Poisson distribution. The open source library GSL has one such distribution. Function: ...
0
votes
1answer
28 views

In testing random numbers, what other tests should I use to complement the Kolmogorov-Smirnov? [duplicate]

I'm using the Kolmogorov-Smirnov test to test a random number generator. I'm wondering if there are other tests that I should implement as well. So far, I've looked at the equidistribution and serial ...
2
votes
1answer
141 views

How to draw estimates based on variance covariance matrix?

Suppose I fitted a logistic model and get the estimates as well as their vcov matrix. I would realize this: draw length($\beta_s$) independent $\mathcal N(0,1)$ ...
3
votes
5answers
653 views

How do I get “V-shaped” distributed random numbers from uniformly distributed numbers?

I have 1000 uniformly distributed random numbers. How do I manipulate them to get a V-shaped histogram?
2
votes
1answer
35 views

How many times, in expectation, am I fetching a random sample from a predefined discrete probability distribution of elements?

As part of a simulation that I'm working on, I have a probability distribution over $n$ elements, from which I have to sample a set $S$ of size $m$. That is, each element $e \in S$ must be unique ...
0
votes
0answers
24 views

How to test a Random Number generator in R? [duplicate]

I have a random number generator of U(0,1), I apply the ks test on x, which has 10000 random numbers in [0,1]: > ks.test(x,"punif") and obtain this result: ...
16
votes
2answers
2k views

What's the probability that from 25 random numbers between 1 and 100, the highest appears more than once?

In many online games, when players complete a difficult task, sometimes a special reward is given which everyone who completed the task can use. this is usually a mount (method of transportation) or ...
0
votes
0answers
65 views

how to generate correlated random number series? non-gaussian, empirical distributions

I have N time series, let's say $X_{it}, i=1..N$. Assuming that they're i.i.d., I want to generate N random i.i.d. series $X_{it}^*$, which would be similar to my original series $X_{it}$. If I knew ...
6
votes
2answers
115 views

Accurately generating variates from discrete power law distribution

What are the best methods to accurately generate random integers distributed according to a power law? The probability of getting $k$ ($k=1,2,\ldots$) should be equal to $p_k = k^{-\gamma} / ...
1
vote
0answers
14 views

Corrective random generation to fit a preset distribution when combined with biased data

I have a source of data that will have an unknown distribution. I want to generate "random" data such that, when I combine the two, the overall distribution completely hides what the original data's ...
0
votes
1answer
40 views

sampling for estimation - using random numbers - homework help

I have a figure like so : Now the question asks to 1) generate 100 samples of iid - 2D uniform random variables in the unit-square. 2) count how many samples generated fall within the quarter ...
0
votes
1answer
162 views

How to generate random variables from a defined density via R?

Given probability distribution: $f_x(x)=(x+1.5)^{-1.75}e^{-x/400}$, Let $t=x-1.5$. (I want to generate a random set $x$ from this distribution) Generate ...
4
votes
1answer
1k views

Random number-Set.seed(N) in R

I realize that one uses set.seed() in R for pseudo-random number generation. I also realize that using the same number, like set.seed(123) insures you can reproduce results. But what I don't get is ...
1
vote
0answers
30 views

Multinomial goodness of fit

Suppose I generate a multinomial distribution with probabilities $p_i$, i from 1 to k. Now suppose I test it back using goodness of fit (chi square) with the probabilities we know. I read that this ...
1
vote
1answer
83 views

Establishing the lack of randomness in lottery number selection

Related to this question, if I have 1500 or so jackpot results from a 6/49 lottery (numbers drawn, number of winners and prize per jackpot winner), how can I demonstrate that some numbers are less ...
1
vote
1answer
76 views

Interpreting “good figures of merit” in xorshift* context

I am trying to implement an xorshift* PRNG (practically an xorshift with a multiplication step in the end) as a long term replacement of Java's Math.Random. I have been reading an article pointed out ...
1
vote
0answers
38 views

Optimising test re-test reliability through randomly generating hypothetical repeated trials

I have had a look around the forum, and despite some similar questions on measurement error, no one appears to have asked this question specifically. I have developed a test where a small group of ...
0
votes
1answer
60 views

Selecting uncorrelated samples from a set of bulk data that contains correlated and dependent samples

i have a set of data that is generated by expensive computational model evaluations, on a total data set of 10000 samples in 40 dimensions. This sample data set is composed of different data sets, ...
3
votes
0answers
68 views

Am I creating bias by using the same seed over and over

In almost all of the analysis work that I've ever done I use: set.seed(42) It's an homage to Hitchhiker's Guide to the Galaxy. But I'm wondering if I'm ...
2
votes
0answers
33 views

Transforming a uniform-on-sphere random vector

Consider the 3-D real random vector $(X_1,X_2,X_3)$ which is uniformly distributed on the surface of a unit sphere. What can be told about the distribution of $(aX_1,bX_2,cX_3)$, where $a,b,c,$ are ...
6
votes
1answer
579 views

How can I generate uniformly distributed points on a circle?

I am looking to generate 450 data points in R. There are three distinct sets 150 of each distributed in a circular band with different radii (at 1, 2.8 and 5). In particular, I'm looking to reproduce ...
2
votes
0answers
107 views

Generating Random Vectors with Arbitrary Marginal Distributions via NORTA

When generating random variates from different marginal distributions using the NORTA (Normal-to-Anything) method, as described in Cario & Nelson 2007, why is $\varrho$ required? To adjust ...