# Questions tagged [random]

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

906 questions
Filter by
Sorted by
Tagged with
20 views

### Including absorbing boundary (surface) for a continuous stochastic process on a complex domain

Often of interest are stochastic processes with absorbing boundaries (states). However, Mathematica does not natively include functionality to deal with absorption. In one spatial dimension there is a ...
1 vote
71 views

### Randomly replace some letters in words with hyphen

I have a list containing some related words ...
• 659
92 views

...
• 1,902
56 views

### Wishart distribution implementation with positive semidefinite scale matrix

The built-in Mathematica function WishartMatrixDistribution[\[Nu],\[CapitalSigma]] requires a positive definite (PD) scale matrix ...
130 views

### How can I generate a random number within a function and use the result repeatedly in the same function?

I want to write a function that will randomly select an element in a list of arbitrary length and operate on it. For example, if I have L = RandomInteger[100, {10}] ...
• 393
214 views

### How to use Mathematica to find the maximum expected value of multiple normal distributions?

Is it possible to calculate the maximum expected value of $n (n\geq 2)$ independent (identical distributed) random variables that follow a normal distribution? If possible, how to find it? If it ...
• 1,902
63 views

### Why is random sampling with ordinary and compiled code so different?

Consider the following code: ...
• 5,923
218 views

### Early computer art - Frieder Nake's "Walk Through Raster"

Frieder Nake Frieder Nake (born 1938 in Stuttgart, Germany) is a mathematician, computer scientist, and pioneer of computer art. Nake is one of the "3N" computer pioneers, an abbreviation ...
• 82.4k
60 views

### Automatic matrix operations with parameters obtained by random numbers

I have matrix T defined by 2 parameters: T = {{0, 0, 0},{0, 0, a},{0, a, b}}; These 2 parameters are randomly generated by means: ...
• 657
2k views

### Michael Noll's early computer art - arranging graphic elements in a circular manner

Michael Noll A. Michael Noll (born 1939 in Newark, New Jersey) is an American engineer and professor emeritus at the Annenberg School for Communication and Journalism at the University of Southern ...
• 82.4k
109 views

### Fast sampling from Fermi-Dirac distribution under specific conditions

This question is a continuation of the following one. Let us assume a Fermi-Dirac (FD) distribution (times $p^{2}$): ...
• 5,923
1 vote
121 views

### How to quickly sample from the following distributions

Consider the following distributions: ...
• 5,923
519 views

### Fill a matrix with randomly placed elements that are a certain distance apart

Problem statement I want to populate a matrix of points with randomly placed elements, here denoted as x. In all matrix rows there must be an equal number of x-...
• 82.4k
1 vote
95 views

### How to compile the following code (sampling from a distribution)?

Consider the following code: ...
• 5,923
52 views

### How to quickly sample points according to the given distribution?

Consider the following points sampler: ...
• 5,923
82 views

### Resampling the points with a constraint [closed]

I have a list of npts elements energies obeying some arbitrary distribution. By performing some operation many times, it would ...
• 5,923
58 views

### Why RandomSample fails and how to fix this?

Consider the following sampling: weights = 10^RandomReal[{-13, Log10[35]}, 499500]; vals = Range[Length[weights]]; randomvals = RandomSample[weights -> vals]; ...
• 5,923
141 views

### How to speed up the following algorithm?

I have some random combinations of numbers pairs (where numbers range from 1 to some ntest) ...
• 5,923
521 views

### Reproducing Heinrich Heidersberger's Rhythmograms

Heinrich Heidersberger (1906 - 2006) was born in Ingolstadt, Germany, and grew up in Austria. He studied architecture in Graz, which he abandoned in favor of art. From 1928 until 1931 he lived in ...
• 82.4k
78 views

### How to select non-repeating pair of numbers?

Consider the following combinations of integers comb, where the integers range from 1 to n ...
• 5,923
302 views

### Early computer art - reproducing Harold Cohen's turtle drawings

Harold Cohen Harold Cohen (1928 - 2016) was a British pioneer of computer-generated art. After his studies at the Slade School of Fine Arts in London he became soon well known in London as an abstract ...
• 82.4k
357 views

### Can we emulate Paul Henry's drawing machine?

Desmond Paul Henry Desmond Paul Henry $(1921-2004)$ was a Manchester University Lecturer and Reader in Philosophy. He was one of the British pioneers of Computer Art. Henry with Drawing Machine 2, ...
• 82.4k
59 views

### How to make the following pairing?

Consider the following list of identifiers: Npart=5000; ilist=Range[1,Npart]; And parameters belonging to the given identifier: ...
• 5,923
1k views

### Vera Molnár's interruptions - erasing graphic elements

Vera Molnár Vera Molnár (1924 - 2023) was a Hungarian artist who, like Victor Vasarely, lived and worked in France. She was one of the pioneers of computer graphics. Trained as a traditional artist, ...
• 82.4k
155 views

### Creating a Random T-Spline Instead of a B-Spline

I want to be able to create a function so that instead of BSplineSurface[pts], it would be TSplineSurface[pts,error]. I think it ...
• 114
503 views

### Efficiently fill an ellipse with a k-many random ellipses

So, I can create a circle filled with circles of the same radius that gives this example picture: with this code: ...
• 114
296 views

### How to condition all cells of a notebook to a specific SeedRandom?

Is there a way to fix SeedRandom[.] for an entire notebook? If I carry out many calculations using random numbers, I need to give a separate code ...
• 6,263
244 views

### Incrementing a random element of an array repeatedly

Consider this code to simulate a simple instance of the coupon collector problem. We initialize an array to {0, 0} and then keep incrementing a random element until we've incremented every element at ...
• 696
93 views

### Appending Random Number to Existing List

My goal is to append random number to list like below.The problem is whenever I try appending a random number, the previously created numbers are changed which I don't know why. How to add a random ...
• 648
249 views

### Split a sequence with conditions

I need a function which splits a sequence of arbitrary length at x random points and which guarantees that each partition (bin) contains a minimum of ...
• 82.4k
1 vote
100 views

### Unwanted reevaluation in Manipulate with RandomPointConfiguration

Here is a simple illustration of a problem I am encountering. I want to use RandomPointConfiguration inside Manipulate, but it ...
• 548
1 vote
179 views

### How to use first time generated randomly matrix? [closed]

I'm trying to solve one (very little) problem. :) I've generated 3x3 randomly matrix with V[i_, j_] := Table[RandomInteger[{-10i, 10j}], {3}, {3}]; Now I want to ...
• 19
41 views

### Combinations of distributions to be called with RandomVariate

I'd like to manipulate distributions that I'm going to retrieve using RandomVariate; e.g., I would like to take ...
• 153
1k views

### How to create a random zonogon?

A zonogon is a polygon that is convex and is made only out of pairs of parallel sides with the same length. Any regular polygon with an even number of sides is an example of a zonogon. When I use: <...
• 114
189 views

### Approximate a Wiener Process by a Karhunen-Loève expansion

I'm trying to approximate a Wiener Process by a Karhunen-Loeve expansion (see slide 20) with the following code: ...
• 2,964
214 views

### Fill data points within the boundary established by the given points

I have the following data points: ...
• 157
1 vote
90 views

### How to select the points that belong to the given region?

Consider two regions: ...
• 5,923
221 views

• 21
117 views

### Update Random Each Repetition of Animate

I found a solution that's not what I wanted but it will suffice Thanks - Larry ...
1 vote
155 views

### Plotting Average Positions of 2D Random Walk

I need to generate a plot that shows the averaged position at n steps of 1000 different random walks that are each 1000 steps long. So far I am using ...
• 11
78 views

### How to get the time series of colored noise obtained by AudioGenerator function?

In the documentation I found a code that plots a Periodogram. ...
1 vote
101 views

### How to get randomly arranged image in Mathematica?

I'm now thinking about randomly arrangement of the imported image. After importing 2 hand-written images, image1 and image2, I want to make each 5 copys and randomly arrange them in one graph, i.e. ...
• 365
74 views

### How to generate points belonging to some region very fast?

Consider two variables Ex,th. th ranges within thmin=10^-5; thmax=Pi/2; while ...
• 5,923
277 views

### Illustrating the central limit theorem

I'm working on this question is from Wolfram Mathematica online course. I tried my best to find the answer, still not getting it right The question is: Make a list of histograms of 10000 instances of ...
• 327
1 vote
102 views

### Why is generating normalized random $1000 \times 1000$ matrices and plotting the eigenvalues so slow?

For each of the distributions $N(0,1)$ and $\pm 1$ equal probability and for each of $N \in \{5,10,20,50,100,200,1000\},$ I want to generate an $N \times N$ matrix with entries chosen from the ...
• 199
1 vote