The random-generation tag has no wiki summary.
1
vote
0answers
35 views
Generating a log-normally distributed pseudorandomly generated data set
The feedback I received from my initial post seemed to indicate that my question was ill-posed. Hence, I would like to clarify what I am doing and how I hope to acheive it.
I'm running some ...
3
votes
5answers
402 views
Generate three random numbers that sum to 1 in R
I would like to generate three random numbers and then standardize them so that they add up to 1.
I would like to repeat this procedure so that in the long run the mode is .33 for each number.
4
votes
1answer
55 views
Set seed before each code block or once per project?
It is standard advice to set a random seed so that results can be reproduced. However, since the seed is advanced as pseudo-random numbers are drawn, the results could change if any piece of code ...
1
vote
1answer
41 views
Truncated Normal — Reproduce a randomly generated data set
help.
Problem:
Given a bounded Gaussian Distribution -- looking reproduce similar results i.e. same mean and standard deviation randomly.
Definition:
Data set exhibits properties of a Gaussian ...
0
votes
2answers
67 views
What is the difference between two discrete uniform distribution with the same range but different number of categories?
Two random number generators with uniform distributions having min, max as (0,8)
The first generates all integers between 0 and 8 uniformly.
But the second generates only [0,2,4,6,8] uniformly.
What ...
0
votes
1answer
50 views
Random sample using KDE or bootstrapping
I have an experimental sample, size of about 1000 values. I need to generate a much larger sample for simulation. I can create a samples like this:
...
1
vote
0answers
27 views
The proper scaling for generating uniformly distributed points in the n-d ball of *non-unit* radius?
The question of generating uniformly distributed points on the surface of n-dimensional unit ball has been already posted here a dozen of times. What I'm interested in is the proper scaling when we ...
0
votes
0answers
29 views
Maximum likelihood and Halton sequence
I have a random coefficient logit model and I want to use Halton sets in order to generate random numbers for MSL. However, I am not sure about the dimension. I have two random coefficients which ...
2
votes
2answers
95 views
Last-digit test and probability
I have done a last-digit test on a draw of numbers between 1 og 370. Team A drew 64 numbers from the pool, and the last digit of those numbers spread out like this:
Digit: 0 1 2 3 4 5 6 7 8 9
...
1
vote
1answer
97 views
Generation of a random vector on an affine hyperplane
I would like to design a proposal of the form:
$$
p(t=(t_i)|\hat{t}=(\hat{t}_i))
$$
where $t$ (and $\hat{t}$) lies in an affine hyperplane $T \subset R^n$:
$$
t \in T \Leftrightarrow
\sum_i t_i=1
...
-3
votes
2answers
68 views
Uniform distribution on 255 from text [closed]
I'm trying to create a way to link letters from a text to a position between 1 to 255.
For example, the text is : "stackexchange"
I would like to link every letter to a number between 1 and 255. The ...
0
votes
0answers
49 views
proposal distribution on a manifold
I try to sample a set of parameters $(x_i)$ from a posterior
$p((x_i)|(o_j))$ using a metropolis-hastings algorithm.
The fact is that a simple independent random walk on each of the $x_i$ as
proposal ...
0
votes
0answers
66 views
Generating time series with copula
Good day! I want to generate univariate time series in R using Copula: X[1] X[2] ... X[N] ... such that dependence between X[t] and X[t-1] are given through copula C(F(X[t]), F(X[t-1])). So, I have a ...
4
votes
1answer
123 views
Given a coin with unknown bias, generate variates from a fair coin efficiently
Given a coin with unknown bias $p$, how can I generate variates — as efficiently as possible — that are Bernoulli-distributed with probability 0.5? That is, using the minimum number of flips per ...
2
votes
0answers
22 views
How to generate a non-normal correlated bivariate distribution [duplicate]
I am trying to work out how to generate numbers from a bivariate distribution (any one but the normal distribution) while still being able to control the correlation between the two variables (let's ...
2
votes
1answer
89 views
How to generate two negatively correlated random series of numbers? [duplicate]
Possible Duplicate:
How to generate correlated random numbers (given means, variances and degree of correlation)?
I have been trying to generate two random variables with correlation of ...
4
votes
1answer
113 views
Algorithm to produce autocorrelated uniformly distributed number
I would like to produce a time-series of autocorrelated probabilities (with a predefined mean level of autocorrelation).
I've spotted this and this which I believe should give me what I'm looking ...
2
votes
0answers
172 views
Random music note generation
I'm working on a little project, which is in early development stage right now. What I'm trying to figure out is how do I generate random music, especially notes. By googling I've only managed to find ...
1
vote
2answers
102 views
How to generate normal variates subject to mixed constraints?
I want to randomly generate 1000 normal variates (using rnorm, e.g.) that have mean 100. 25% of the 1000 numbers should be over 110.
How can I do this in ...
0
votes
1answer
66 views
Generate correlated IMA(1,1) using R
I'd like to use R to generate two correlated series that follow IMA(1,1) process.
rho is a correlation between the error terms, but when I changed the rho the plot does not change. Is it wrong if I ...
2
votes
2answers
192 views
Can the coefficient of determination (R-squared) for a linear regression ever be zero?
EDIT NOTE: I'm mostly concerned with linear regression with unconstrained y-intercept, but reading about constrained y-intercept, if relevant, is also helpful.
I noticed that for linear ...
21
votes
2answers
449 views
Are the digits of $\pi$ statistically random?
Suppose you observe the sequence:
7, 9, 0, 5, 5, 5, 4, 8, 0, 6, 9, 5, 3, 8, 7, 8, 5, 4, 0, 0, 6, 6, 4, 5
, 3, 3, 7, 5, 9, 8, 1, 8, 6, 2, 8, 4, 6, 4, 1, 9, 9, 0, 5, 2, 2, 0, 4, 5, 2, 8 ...
What ...
0
votes
0answers
22 views
Multi-stage Filter - how to implement?
I'm reading the paper:
"New Directions in Trac Measurement and Accounting: Focusing on the Elephants, Ignoring the Mice"
I want to experiment with multistage filters. There are some details in the ...
0
votes
1answer
70 views
Generating a population of individuals with known Gaussian and uniform random properties
Suppose that I have a number of variables. Each is known to be Gaussian or uniformly random with known parameters and occur with a known probability. I also have a table of correlations (or ...
4
votes
1answer
74 views
Why are there so many random generators in R?
A quick look at the help page of the random number generator of R shows that you can choose among 7 predefined generators (Wichmann-Hill, ...
0
votes
0answers
94 views
Generate correlated AR process for given correlation between demand series
How can I generate two correlated $AR(1)$ data series with given correlation between $d_{1,t}$ and $d_{2,t}$, $r_{12}$, where $\rho_{12}$ is correlation between the two error series
...
2
votes
2answers
94 views
Anscombe transform & Anderson-Darling test failure
I created a synthetic constant image (all the pixel values are the same) on which I generated a Poisson distribution using a Poisson noise generator, with mean values set to input pixel values.
...
1
vote
0answers
51 views
Methods for sampling mutual independent and k-wise independent random variables
I wonder how a sequence of mutually independent random variables
(each with a different or same distribution) is sampled? In other
words, how can a sequence of values be ensured to be samples of a
...
4
votes
0answers
193 views
Is Xorshift RNG good enough for Monte Carlo approaches? If not what alternatives are there?
I recently stumbled across an article on pseudorandom numbers in Java which mention potential weaknesses in the default algorithm, called linear congruential generator (LCG), and gives some ...
19
votes
5answers
756 views
Fake uniform random numbers: More evenly distributed than true uniform data
I'm looking for a way to generate random numbers that appear to be uniform distributed -- and every test will show them to be uniform -- except that they are more evenly distributed than true uniform ...
8
votes
3answers
1k views
How to generate correlated random numbers (given means, variances and degree of correlation)?
I'm sorry if this seems a bit too basic, but I guess I'm just looking to confirm understanding here. I get the sense I'd have to do this in two steps, and I've started trying to grok correlation ...
2
votes
0answers
131 views
Hyperplane problem in linear congruent generator
From Wikipedia
if an LCG is used to choose points in an n-dimensional space, the
points will lie on, at most, $m^{1/n}$ hyperplanes (Marsaglia's Theorem,
developed by George Marsaglia). This ...
1
vote
1answer
109 views
What are some non-uniform random number generators not relying on uniform random number generators?
What are some non-uniform random number generators not relying on uniform random number generators?
Are some of them for general non-uniform distributions, or are all of them for some particular ...
0
votes
0answers
45 views
Is the input to a pseudorandom process the random seed?
From Wikipedia
A pseudorandom variable is a variable which is created by a
deterministic procedure (often a computer program or subroutine) which
(generally) takes random bits as input. The ...
13
votes
3answers
299 views
Some questions about statistical randomness
From Wikipedia's statistical randoness:
Global randomness and local randomness are different. Most
philosophical conceptions of randomness are global—because they are
based on the idea that ...
3
votes
1answer
159 views
When simulating a bivariate normal distribution, why is $\rho$ chosen instead of estimated from the data?
In a video lecture, MrProf shows the 3d-plot of a bivariate normal distribution $\mu_{x_1} = \mu_{x_2} = \sigma_1 = \sigma_2 = 1$ and chooses $\rho = 0.5$ .
If stick to Mathworld, $\rho$ simply is ...
0
votes
3answers
421 views
Random generation of ARMA(2,2) Gaussian time series
I get very poor replication of longitudinal parameters from my own program using the Box-Jenkins model. I had no such problem with my own program generating AR(1) Gaussian data. Is there some trick ...
2
votes
0answers
33 views
Should two equal pseudo-random numbers in a sample count as a “run down” or a “run up” in a runs test?
Taking into consideration the runs test proposed by Knuth given a sample of pseudo-random numbers to test independence, and looking at this example:
...
3
votes
2answers
82 views
How is a uniform sample generated by the computer?
I know that uniform samples used on inverse cdf's can be used to generate normal samples. I was wondering how a technique would generate a uniform sample!?
9
votes
1answer
709 views
Log-Cauchy Random Number Generation
I need to draw random numbers from a log-cauchy distribution which has density: $$f(x;\mu,\sigma)=\frac{1}{x\pi\sigma\left[1+\left(\frac{ln(x)-\mu}{\sigma}\right)^2\right]}.$$ Can anyone help me out ...
1
vote
3answers
140 views
Generating random nos based on 'k' moments
How do I generate random nos based on say k moments? (no other constraints on support)
When k = 2, we generate random nos. from a normal distribution defined by the 2 moments. Can we generalize this ...
1
vote
2answers
231 views
Generate two correlated ARMA(1,1) processes
How can I generate two correlated ARMA(1,1) data series where
$d_{1,t}=\mu+\phi_{1}d_{1,(t-1)}-\theta_1(e_1(t-1)+e_1(t))$
$d_{2,t}=\mu+\phi_{2}d_{2,(t-1)}-\theta_2(e_2(t-1)+e_2(t))$
and $\rho_{12}$ ...
14
votes
2answers
330 views
Are truncated numbers from a random number generator still 'random'?
Here 'truncating' implies reducing precision of the random numbers and not truncating the series of random numbers. For example, if I have $n$ truly random numbers (drawn from any distribution, e.g., ...
2
votes
0answers
419 views
Generate three correlated uniformly random variables
Suppose we have
$$X_1 \sim \textrm{unif}(n,0,1),$$
$$X_2 \sim \textrm{unif}(n,0,1),$$
where $\textrm{unif}(n,0,1)$ is uniform random sample of size n,
and
$$Y=X_1,$$
$$Z = 0.4 X_1 + \sqrt{1 - ...
3
votes
3answers
1k views
7
votes
2answers
236 views
Generating random variables satisfying constraints
I need to generate a list of random variables $\bf{x}$ subject to constraints that can be expressed in the form $\bf{E}x=b$ where $\bf{E}$ is an $m \times n $ matrix if $\bf{x}$ has $n$ entries. In ...
5
votes
2answers
200 views
Random generation of n-dimensional data with possibly correlated variables
I would like to generate a set of artificial data using another input set from which correlations between variables can be extracted. Not all variables are binary, but the data can easily be extended ...
2
votes
0answers
53 views
Sampling in $\mathbb{R}^n$ with roughly equal Voronoi cells
N random points in a ball in $\mathbb{R}^n$ induce a
Voronoi splitting
or tessellation.
Is there a way of random-generating points
so that the volumes of the Voronoi cells are roughly equal ?
This is ...
6
votes
5answers
278 views
Generating random matrices with sum and maximality constraints
I'd like to generate a random square matrix such that the rows are normalized to one and the diagonal elements are the maximum of their column. If there an efficient way to sample these matrices ...
1
vote
1answer
108 views
Sampling extremely large and diverse dataset?
General theories would be great. My specific problem is I'm trying to find a specific portfolio of all the stocks in the market. The possibilities are huge because I need the stock combination(itself ...
