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

learn more… | top users | synonyms (1)

5
votes
1answer
66 views

How to solve an equation system whose equations are based on Mod[x,y]

I'm trying to find the parameters of a specific linear congruential generator (pseudo random number generator) based on a list of the first five numbers generated by it. The list is this one: ...
1
vote
1answer
95 views

Generate $n$ randomly oriented non-intersecting cylinders with fixed radius and length

This post is in reference to the previous question here. How could I adapt the solution given to have the following constraints: fixed radius, fixed length, number of cylinders, and within a ...
6
votes
1answer
112 views

ParallelTable and Random

Each time I execute the following code it generates the same cylinders with the same format. ...
1
vote
1answer
69 views

Why doesn't RandomChoice work here? [closed]

I was using RandomChoice to run a simulation to test the probability that picking 4 marbles out of a bag containing 3 red and 7 blue marbles you get 2 red and 2 ...
5
votes
2answers
146 views

Extending a list

I have a range of n integers (always starting at 1) which are 1 apart, f.e. Range[10], Range[17] or ...
3
votes
2answers
240 views

generating randomly oriented non-intersecting cylinders

I could not find anything relevant with "googling" (only this) I can create a set of randomly oriented cylinders (code found here) ...
1
vote
3answers
125 views

how to find circles that intersect a square

I use the following (based on ideas and functions I got as ansers in [1], [2] by, repsectively, @ybeltukov and @J.M.) in order to find random circles with centers inside a unit square that intersect ...
0
votes
1answer
113 views

Hermitian Matrix

From Derbyshire's Prime Obsession, I would like to get the Mathematica code to generate a Hermitian matrix for evaluation and display. $ 256 \times 256 $ would be nice. Random Normal distribution, ...
3
votes
1answer
62 views

StringReverse question

I was thinking about how to make this with the StringReverse, but I failed: I have a sequence of (for example) "FDSRTYNHFNKHLIUHG", I wish to reverse, but randomly long sequence reversed from a ...
5
votes
5answers
439 views

Random character change in a random place

I would like to ask for help in a Random Replace of character. For example: ORANGE and change 1 character randomly (random place and random character from ORANGE) in it into any character of ORANGE, ...
15
votes
4answers
2k views

Random letters: What is the chance that real words are generated?

Suppose that we are just typing random letters with our keyboards and we include space bar. We don't distinguish between capital and lowercase letters. If we do this for a long time, how many of the ...
9
votes
2answers
252 views

What will happen, if I don't specify random seed by SeedRandom function?

Suppose I want to run several times of the same code containing RandomReal function, but I don't initialise the random seed. What will happen? I tried, but each ...
3
votes
1answer
85 views

Random Variable in Recurrence Function

Following the previously published question, I'm looking for the solution of RecurrenceTable with explicit random variable. For example, something like ...
6
votes
3answers
421 views

find the maximum number of not intersecting circles inside an ellipse

$Version "10.3.0 for Linux x86 (64-bit) (October 9, 2015)" (Sequel to 98724 and 99345) (I use codes originally created by Andy Ross, ybeltukov and J.M.). I ...
3
votes
2answers
94 views

Storing and taking average of random number generated plots [closed]

I am working on a code which generates a number of random numbers which I have to use in a set of matrices. This set is then multiplied with some other matrix set in a particular order. And finally I ...
3
votes
2answers
273 views

Generate a random PDF

How can I generate a random probability density function $p(x)$ in the domain $[0,1]$? Is there a single Mathematica function to do so?
0
votes
1answer
128 views

How to draw cylinders inside a cylinder

It can be considered as a sequel to 98724 I adopt the code of ybeltukov (thanks again) and I slightly modify it. ...
5
votes
2answers
256 views

Generate random non-intersecting lines inside a square

EDIT I have the following code which generates (pseudo-) randomly oriented and distributed but not intersecting lines. In fact, the code is from the reply I got here: ...
4
votes
1answer
205 views

Random Partitions

I want to write a function RandomPartition to partition a vector of length n into p partitions of varying (random) lengths. For example with ...
1
vote
2answers
173 views
1
vote
0answers
50 views

Sampling from an one-dimensional Wishart [closed]

I searched for a similar question but could not find one. My problem is sampling from an one-dimensional Wishart distribution. The Mathematica specification is ...
3
votes
2answers
297 views

How-to cast a set of random points on the surface of a cuboid?

I have been able to implement point picking for cylinders and spheres. However, I strugle to implement a solution for a cuboid. Please see code for point generation on cylinders and spheres below: ...
5
votes
3answers
218 views

Generating correlated random variables with normal distribution

This site and this site provide some background as to what I am trying to achieve, but with some variations in what is required. First I want three random variables with a normal distribution, ...
1
vote
1answer
137 views

How to simulate Multifractional Brownian Motion?

The maximum I would ask, is hints, how to model MFBMotion. Link to paper Firstly, i wanted to simulate in MATLAB that code: ...
2
votes
0answers
81 views
5
votes
1answer
108 views

Huge overhead in RandomPoint[ImplicitRegion]

Commenting answers of this question @JasonB noticed the big overhead of RandomPoint ...
25
votes
5answers
2k views

Generate two random numbers with constraints

I want to generate two random numbers, $p$ and $q$, between $0.5$ and $1$. They are connected by the constraint $1/(2q) > p$. How do I generate $p$ and $q$?
1
vote
2answers
89 views

Creating a random complex univariate polynomial

I am a newbie in Mathematica, but I need to create a random univariate polynomial of degree d with complex coefficients whose entries are random complex variables with real and imaginary parts being ...
0
votes
2answers
52 views

Evaluating a list of inequalities with random numbers [closed]

I have a list of inequalities, which include in total four parameters, that I would like to test by feeding the four parameters with random numbers. The goal is to find the best values of the ...
3
votes
2answers
55 views

Autoregressive Process Question

May I know what $x,y,z$ in ARProcess[x,{y},z] mean? ...
5
votes
1answer
173 views

Average positions in a 1D random walk

I wrote this to simulate m random walks of n steps ...
2
votes
2answers
192 views

Programming a 2D random walk

I have these functions Randomwalk1[n_] :=Accumulate[2*RandomInteger[{0, 1}, n] - 1]; Randomwalk2[n_] := NestList[# + 2*RandomInteger[{0, 1}] - 1 &, 0, n] ...
7
votes
1answer
143 views

Speeding Up RandomVariate

Consider the following code where we first take 1000 independent samples from a Poisson distribution, and then take 1000 independent samples from 1000 different Poisson distributions: ...
6
votes
4answers
622 views

Random sampling of multiple integers with constant sum

I want to build a model of 40 geological layers, assuming each layer has equal chance to be one of the four types of rocks and the four types of rocks have equal chance to appear in any layer. The ...
18
votes
1answer
292 views

What pseudo-random number generators are available to Mathematica users?

One would think I should be able answer the question I pose in the title for myself by reading the Documentation Center article ref/SeedRandom, but it's not so simple. That article does give a list ...
1
vote
2answers
85 views

Loop calculations with random numbers

Given a function f f=f[x,y,z] I would like to compute f for different random values of x,y and z greater than 0 ...
20
votes
2answers
356 views

Spacing out random walks so they don't overlap

From an external simulation program, I have lots of particle tracks which follow random walks, all of which start at or near the origin $(0,0)$. This means that when I plot the walks in Mathematica, ...
1
vote
0answers
48 views

Randomly generate a list of arbitrary length from a finite set [closed]

I have a finite set of elements (5 to be exact). Suppose the first element has probability $\frac{1}{2}$ of being selected, while each of the others has probability $\frac{1}{8}$ of being selected. ...
13
votes
3answers
170 views
0
votes
0answers
19 views

Creating points that are remoted from one another beyond a certain threshold. Quasirandom sequance? [duplicate]

I am looking for an approach to create a set of pseudorandom pairs of numbers subjected to one condition. They must be not closer to one another than a certain limiting parameter. One approach might ...
8
votes
1answer
137 views

RandomPoint in geographic region from Polygon[region_]?

How do you generate a RandomPoint in a geographic region? ...
7
votes
0answers
79 views

Restarting random number generators where you left off

I have code that uses both RandomReal and RandomInteger a number of times to produces a sequence of $n$ data sets. After ...
15
votes
1answer
222 views

Why does't SeedRandom work here?

From the docs on SeedRandom, SeedRandom[] resets the generator, using as a seed the time of day and certain attributes of ...
20
votes
2answers
665 views

Implementing the PCG random number generator

PCG ("permuted congruential generator") is a recently-introduced random number generator. PCG is a family of simple fast space-efficient statistically good algorithms for random number generation. ...
0
votes
1answer
37 views

Variable Definitions and Random Numbers [closed]

I have currently created the following matrix: m={{RandomReal[{0,1}],RandomReal[{0,1}]},{RandomReal[{0,1}],RandomReal[{0,1}]}} In other words, a $2 \times 2$ ...
10
votes
2answers
166 views

Possible bug in VonMisesDistribution?

Bug introduced in 10.2 or earlier and fixed in 10.3 Observe: ...
1
vote
1answer
94 views

How to repeatly use random number generator in optimization problem

I am looking to run the optimization problem. I already finish my optimization code as below. ...
1
vote
0answers
50 views

Mixture of a bivariate distribution defined as a copula

I define a bivariate distribution: ...
4
votes
1answer
139 views
5
votes
3answers
122 views

ImplicitRegion gives arbitrary boundaries

This question uses Mathematica 10.2.0.0. equation1 is the major unbounded region I would like to generate: ...