Skip to main content

Questions tagged [random-generation]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
32 views

I have a dataset from which I need to construct priors from which to draw vectors of correlated but non-identically distributed random samples. For the sake of example, suppose I have $n$ lognormal ...
KBriggs's user avatar
  • 121
0 votes
0 answers
56 views

I have a semi-Markov process in which the time between states is log-normally distributed, but with parameters that depend on $n$ (the mean and variance are state-dependent). In other words I have the ...
KBriggs's user avatar
  • 121
2 votes
0 answers
57 views

I am a graduate student in aerospace engineering currently working on the nonlinear buckling analysis of cylindrical shells with random geometric imperfections. Perfect cylindrical shell. The ...
frustrated_engineer's user avatar
4 votes
1 answer
151 views

Problem in brief I would like to generate several samples of iid categorical data. The standard approach does not work because the potential number of categories is large, and I do not want to impose ...
g g's user avatar
  • 2,954
1 vote
1 answer
101 views

The following considers the fundamental statistics underlying this computational question. One can compute a random variate from a numerically defined statistical distribution. Thus we can ask for ...
David G. Stork's user avatar
5 votes
2 answers
932 views

I am trying to understand properties of different time series models. In order to be a white noise $w_t$ must follow three conditions: $E(w_t) = 0$, $Var(w_t) = \sigma^2$, and $cov(w_t, w_s) = 0$, ...
stats_b's user avatar
  • 361
5 votes
1 answer
268 views

I have a quantum random number generator and I wish to know if it can pass a set of statistical tests to check whether it’s truly random. For this I use the Dieharder suite of tests. In this suite, ...
ScottishTapWater's user avatar
3 votes
2 answers
615 views

Consider an inverse Gaussian with a small mean $\mu$ (such as $0.001$) and such that we fix its variance to a larger value $\sigma^2$, say $0.5$. Then if I sample $N$ times from this distribution, I ...
Euler_Salter's user avatar
  • 2,324
2 votes
1 answer
155 views

Algorithms like Sobol or Holton provide quasi random numbers (that is, the numbers "look" random in the sense of a uniform distribution, but they are deterministic) in the hypercube $[0,1]^d$...
Quertiopler's user avatar
1 vote
1 answer
129 views

Assume the variable $X_t$ has a continuous value, sampled over uniform discrete time (time series). I have the full autocorrelation function up to max time lag $l_{max}$. The coefficients may be both ...
Special Sauce's user avatar
4 votes
5 answers
548 views

I would like to generate a normally distributed variable of 100 data points with a known range (e.g. $10.4\text{–}16.6$) but without a known mean. To use rnorm I need mean and sd. I could estimate a ...
Dendroica's user avatar
3 votes
0 answers
121 views

Wikipedia lists the following as an unnormalized conjugate prior of the gamma distribution in the case where both parameters $\alpha,\beta$ are unknown: $$ \frac{p^{\alpha-1} e^{-\beta q}}{\Gamma(\...
user1337's user avatar
10 votes
1 answer
1k views

We are trying to develop some predictive models in medical research. We have combination of clinical and RNA-seq data just for 40 patients. The problem is classification. After feature selection, we ...
Leila ali's user avatar
  • 189
1 vote
1 answer
98 views

I'm testing performance of statistical tests in the face of non-independent data and I'd like to generate random data where I know the underlying statistical distribution. The easiest way to do it is ...
Alicja Kario's user avatar
1 vote
1 answer
97 views

I am trying to use the Halton sequence for a quasi-Monte Carlo method in two dimensions. However, a problem I am running into is that the mean of the sequence is always less than one-half (except for ...
ischmidt20's user avatar
1 vote
0 answers
58 views

I've been thinking of this as the "Prize of the Week" problem. Suppose you run a shop, and want to give out a prize once a week to someone making a randomly-selected purchase. You give out ...
Ralph Giles's user avatar
0 votes
0 answers
28 views

I am using random forest in R, and for different test sets I'm using patterned seeds in the sample function. For one test set I use 1234, for the next 2345, the next 3456. I suspect it is unlikely, ...
Pierre Raynerd's user avatar
1 vote
0 answers
27 views

I wanted to do a project where I measured how random the native RNGs are in various programming languages. How can I objectively measure my results? Also, if you run a random number generate say 100 ...
skarz's user avatar
  • 131
1 vote
0 answers
147 views

Hello. I'm studying the Monte Carlo Statistical Method textbook by Robert and Casella. I have a question about exercise problem 30 in Chapter 2. I've already solved parts (a)-(c), but I'm having ...
urikokp's user avatar
  • 39
-1 votes
1 answer
71 views

Background I am working on developing a R package that focuses on implementation of pseudo-Random Number Generators (pRNGs) from scratch. To date I have successfully programmed a Linear Congruential ...
Bensstats's user avatar
  • 173
2 votes
0 answers
89 views

I'm playing a 4-player game of cards. My opponents are called A, B and C. At the beginning of the game, each player has been dealt a hand of cards out of a deck containing 4 suits of cards: Black, Red,...
FlPI3Rd8's user avatar
0 votes
1 answer
148 views

The specific task is to draw 5 random samples in the range of 0 to 90 with a minimum disstance of 7 between each sample. I performed 1 million runs with respect to the conditions. The first image ...
cupcake's user avatar
0 votes
0 answers
34 views

I am constructing an algorithm where it should map every input to a different output and the output bits should be statistically random (that is when put into randomness test suites (like NIST), it ...
user279163's user avatar
4 votes
2 answers
342 views

There are statistical test suites (below) that are commonly used to determine whether a sequence appears to be (pseudo) random. Some of these test suites have a few tests (ent/ent3000), whilst others ...
Paul Uszak's user avatar
5 votes
3 answers
1k views

I need to generate random numbers from 3 correlated distributions. First two of them are lognormal and the final one is normal, i.e. for X, ...
Xu Shan's user avatar
  • 213
1 vote
0 answers
58 views

This might be a very basic question, but it seems that in all the examples I've seen, the inverse sampling method (i.e., input uniform RV into the inverse of CDF of desired PDF/probability ...
Fraïssé's user avatar
  • 1,708
1 vote
0 answers
82 views

My primary goal is to get unbiased estimate of mean test score of every pupil in a country. I have no sampling frame of all pupils to randomly sample from. But I have a sampling frame for every school....
Nothingman's user avatar
1 vote
1 answer
129 views

I have simulated data of a 4-dimensional random variable $(X_1,X_2,X_3,X_4)$. The individual pdfs of these random variables, i.e., $X_i$ where $i\in\{1,2,3,4\}$ turns out to be stable distributed with ...
Userhanu's user avatar
  • 209
3 votes
0 answers
221 views

Sampling uniformly from the surface of an ellipsoid (in the sense of $\mu(dA) = \frac{1}{A}$) seems very nontrivial: How to sample uniformly from the surface of a hyper-ellipsoid (constant ...
Master Yogi's user avatar
0 votes
1 answer
155 views

I have a uniform number generator in ($0, 1).$ I want to generate a random number with CDF $P(X \leq c) = 1-1/c$ in the interval $(1, + \infty)$. I know I should apply the inverse of my function to ...
AutisticRat's user avatar
2 votes
1 answer
287 views

Assume, we have a key that appears in either of the three rooms randomly (red room, blue room, and green room). We have the following probability distribution: ...
Breeze's user avatar
  • 25
0 votes
1 answer
134 views

I model a stock price with a completely random walk: In each step I multiply the price with normal distributed random number with an mean of 1. Then I compute a signal, which is True if the moving ...
Ruediger Jungbeck's user avatar
0 votes
1 answer
185 views

In the method called inversion we have : Let $U$ ~ unif(0,1) denote a uniform random variable on $(0,1)$. Then : $\mathbb{P}(F^{-1}(U))$ = $\mathbb{P}(U \leq F(x))=F(x)$ so $F^{-1}(U)$ has ...
PrettyClose's user avatar
0 votes
0 answers
36 views

I am looking to write a program that generates samples from a gaussian distribution with a certain mean and standard deviation. I am not allowed to use any library except a random number generator. Is ...
desert_ranger's user avatar
2 votes
1 answer
112 views

I am interested in the ratio of random slope variance from a random slope and intercept model. I fit the model using lme4 as ...
stats-what's user avatar
1 vote
0 answers
43 views

I'm trying to think of a method i could use to generate the random numbers between 0 and N in a random order and with uniqueness that would use the smallest footprint of memory at the beginning and ...
eljiwo's user avatar
  • 111
23 votes
2 answers
4k views

Suppose I am generating random 4-digit numbers. Obviously there are 10,000 possible numbers, but the chances are I will get a duplicate long before I generate that many. Can anyone explain how I would ...
Avrohom Yisroel's user avatar
3 votes
1 answer
3k views

I am learning the Gaussian process and feel confused about how three lines were generated in Fig 2.2(A) in the book "Gaussian Process For Machine Learning". As described by the author: "...
user3153824's user avatar
1 vote
1 answer
129 views

Say I have a (generally high-dimensional) random variable $X$ with known, continuous CDF $F(X)$. Is there a good algorithm for drawing values of $X$ that doesn't require that I calculate the joint ...
Wilbur's user avatar
  • 221
2 votes
0 answers
67 views

In a comment on this question, the user 'probabilityislogic' says "No, not MCMC this thing! Quadrature this thing! only 2 parameters - quadrature is the "gold standard" for small ...
Wilbur's user avatar
  • 221
3 votes
0 answers
187 views

I am trying to generate evenly distributed particles in an $n$-dimensional flat torus or a periodic hypercube. I am not sure if any of this approaches suffices. Can you suggest alternative methods for ...
Rober's user avatar
  • 31
12 votes
6 answers
2k views

I am working with a distribution with the following density: $$f(x) = - \frac{(\alpha+1)^2 x^\alpha \log(\beta x)}{1-(\alpha + 1)\log(\beta)}$$ and CDF $$\mathbb{P} (X \leq x) = \int_0^x - \frac{(\...
Lucas cantu's user avatar
2 votes
1 answer
238 views

If X ~ Exp(3), Y ~ Exp(1) and h = X / (X + Y) then h ~ beta(1/3, 1) and E(h) = 1/4. But when I draw random deviates using the following R code, I find mean(h) ≈ 0.324 and the histogram doesn't ...
rob's user avatar
  • 21
2 votes
1 answer
96 views

I am using acceptance-rejection sampling to sample random variable $x$ according to distribution $f(x)$. The steps I followed are First generated uniformly distributed random variable $x$ from 0 to $...
Prab's user avatar
  • 21
5 votes
2 answers
626 views

I want to generate a standard normal distributed time-series. In addition the ACF of my timeseries should match a desired ACF. I have given lags 1 to 30 with the corresponding ACF-values. For further ...
Christian's user avatar
2 votes
0 answers
58 views

This question is about a magic square generator, "relaxed" because it's only about one vector (row) in the square independent of all other rows; the individual elements are continuous and ...
Reinderien's user avatar
8 votes
2 answers
461 views

Given $n+1$ variables $p_0, p_1, \ldots, p_n$ defined over $\mathbb{R}^{+}$ so that $\sum_{i=0}^np_i=1$, and given a real number $1<x<n$, I want to generate random solutions of the equation so ...
ABu's user avatar
  • 391
12 votes
8 answers
2k views

As I mentioned in the question title, I want to generate specific uniformly distributed samples. I need them to model a real world scenario. For my real data, I estimated a function, which ...
Christian's user avatar
0 votes
1 answer
91 views

The Nelson rules for control charts describe patterns, which are "special" and need our attention. One of these rules is the "alternation rule". According to Nelson it is "...
NotMe's user avatar
  • 866

1
2 3 4 5
16