# Questions tagged [random]

Questions about random number generation and the properties of numbers so generated.

646 questions
Filter by
Sorted by
Tagged with
2answers
219 views

### Random sample of big big numbers

Consider the following piece of code: m = 2; n = 6; samplesize = 1000; totalsize = 2^(n^m); numbersample = 2 RandomSample[Range[totalsize/2], samplesize]; With ...
1answer
142 views

### How do you create a 2D random walk? [duplicate]

I've been trying to create a 2D random walk process for my project. The question is as follows, Create a 2-dimensional random walk process where the walker can move up, down, left, or right. The ...
1answer
137 views

### How to implement a Von Neumann neighborhood algorithm to random matrices/grids?

I'm trying to generate square grid templates to drill holes on a plate for a fragmentation experiment. The first part of the experiment I used the program below to generate uniformly random sites for ...
1answer
72 views

### How to pick a random points in higher dimensional parametric regions?

I am using a simple code to pick points randomly (uniformly) from a parametric region. This seems to work perfectly with 2D and 3D regions. For instance ...
1answer
206 views

### Can I use complex Gaussian random variables in Mathematica?

I have been looking for complex Gaussian random variables and Mathematica, however, I haven't found anything on this topic. Could someone, please, let me know if it is possible to find for example ...
1answer
49 views

### How to get a single evaluation of RandomReal in a Block

I want to generate (and eventually sample) a sine wave with a random frequency in the range [½, 1] (i.e. capture somewhere between half and one period of the waveform over the domain [0,1]). The two ...
1answer
158 views

### Create a random polymer chain

I want to create a polymer chain (in 2D) of a given length such that: 1. First monomer is at {0,0} 2. All other monomers are in the positive x half-plane 3. The ...
0answers
82 views

### Allow or force self-loops in a Random Graph with 'BarabasiAlbertGraphDistribution'?

While generating random graphs, I assumed that self loops were allowed in the BarabasiAlbertGraphDistribution, but after checking the adjacency matrix, and the plot ...
0answers
43 views

### RandomVariate without zero

I want to get 10 random numbers drawn from a Poisson distribution with mean 1. But I do not want to include 0 in this. When I do ...
1answer
249 views

### Using Random walk on a region [duplicate]

I want to simulate a random walk on two dimension equation using module. Checked the input so the path works ...
0answers
33 views

### How to carry out a different function based on weighted probabilities

I am looking to carry out a function based on weighted probabilities I have looked at using If[] and random numbers but ...
1answer
51 views

### Pick single random value from WhiteNoiseProcess

I have the following: m = 6.137*10^-13; k = 1.5*m; stddev = Sqrt[2*k]*Sqrt[m]; whiteNoise = WhiteNoiseProcess[stddev] How can I produce a function that gives me ...
1answer
63 views

### Generation of Binary number from some distribution function

In mathematica, RandomInteger[] generates binary numbers (0 or 1) with equal probablity (uniform distribution). If I wish to generate the binary numbers with ...
1answer
106 views

### Plot the critical points of degree $d$ polynomials with zeros randomly chosen in given region

I wish to be able to scatter slightly (by at most some fixed $\varepsilon>0$) the zeros of a given complex polynomial $p(z)$ in a random way, and then see the effect on the critical points. For ...
1answer
53 views

### create one list from one list with random sample

I have a list, then I want to pick 2 elements (RandomSample[list,2]) put them in a new list (those two element will be one element in the new list, like list of ...
1answer
77 views

### Generating the cumulative distribution function (CDF) of a tuple made by RandomFunction

I use the RandomFunction to generate a continuous random function (trying to model a rough surface): ...
2answers
227 views

3answers
1k views

### Implementing a planetary terrain generation algorithm

From this (now deleted) question I found this site where the author discusses a simple technique for random terrain generation on a sphere. The method discussed is as follows: start with a ...
0answers
132 views

### Parallelization of Monte Carlo numerical integration

I'm trying to parallelize some integral. What I do: I define integrand: ...
1answer
103 views

### Modeling Dependent Joint Distribution

I'm trying to model the joint pdf of (X,Y) from example 4.5.8 of the text Statistical Inference 2nd Edition, Casella, Berger (pg 199 of the pdf). Essentially, X ~ Uniform[0,1] Z ~ Unfiorm[0,1/10] Y ...
1answer
95 views

### How can I use WienerProcess with TimeSeriesForecast?

I created a TimeSeries from Date-Value-Pairs, which I imported from a .csv-File diffp = Import["path/difficultyp.csv", "Data"]; tsdiff = TimeSeries[diffp]; I ...
5answers
571 views

### Stop Mathematica from rounding the value

My task is simple. Calculate the average value for 10^7 dice throws using computer pseudo-random-number-generator. x := RandomInteger[{1, 6}] gives me one ...