# Questions tagged [random]

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

881 questions
Filter by
Sorted by
Tagged with
227 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 ...
75 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 ...
234 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 ...
1 vote
74 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 ...
1 vote
169 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 ...
40 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 ...
964 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: <...
157 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: ...
205 views

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

I have the following data points: ...
1 vote
83 views

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

Consider two regions: ...
185 views

111 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
135 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 ...
24 views

### Smoothening noisy distributions to learn eigenvalue statistics

I have a problem involving random matrices, in which I'm trying to learn properties of their spectral statistics. The problem I'm having can be boiled down to a list management issue, but I will begin ...
58 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
84 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. ...
73 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 ...
229 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 ...
1 vote
90 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 ...
1 vote
129 views

### Wolfram Mathematica Monte Carlo for integrals approximation

I wanted to implement the Monte Carlo method for multiple integrals approximation in Wolfram Mathematica. Namely I wanted to let the user insert as input the dimension of the integral and the number ...
52 views

### How to predict number from a set of data?

I have 2 sets of data. For example, ...
289 views

### Creating a random symmetric matrix with a particular rank

The documentation about LinearAlgebra has a section on Constructing Matrices, but the examples of random matrices using RandomReal don't offer an obvios way to ...
68 views

### Table generation with random variates inside. Mathematica [closed]

I'm new on this forum, and I'm also a new user of the software Mathematica. For this reason, I'm sorry if my question will be unclear and / or dumb. I have to make a numerical simulation with random ...
79 views

### Bad performance of 3D self-avoid persistent random walk with periodic boundary conditions

I'm trying to simulate a self-avoiding persistent random walk with periodic boundary conditions a large number of times. For some reason, the script I've written is extremely slow for self-avoiding ...
51 views

### Changing permutation dynamically

I am trying to make a visualization of permutation as a graph. With the first compilation of program I want to get random permutation and then be able to dynamically change permutation that I desire ...
44 views

### Cannot use RandomSample to get a sample bigger than the original [closed]

I have a sample of 300 elements and I need a random vector of size 100000 which consists of random repetitions of the elements of the 300-element sample I have tried the following ...
1 vote
95 views

### Speed up random set partition code

I have managed to construct code for randomly generating a set partition of size n with k parts. Note that the total number of such objects is counted by a Stirling number of the second kind. The code ...
66 views

### Check if NDsolve solution of nonlinear second order eq. is random

I'm solving second order nonlinear eq. using NDsolve. I'm interested in y'(t) dynamics (plotted below). The thing is - from this solution I'm not sure if we have some randomness or it is just complex ...
1 vote
99 views

### How to construct an orthogonal matrix with the elements taken from a uniform distribution?

I want to construct an Orthogonal matrix such that its elements are randomly chosen from a uniform interval $[-r,r]$ in Mathematica. The way I am doing it is by simply constructing a matrix whose ...
38 views

### What is the best memory utilization and efficiency considerations for simulating particles that are randomly created and removed?

I am wanting to run a simulation involving a varying number of "particles" (points defined by 2D coordinates $(x,y)$ within some region). At each time step, there is a probability that a new ...
256 views

### Randomly colored and randomly sized points in a region

I am trying to show random points with different colors and sizes. However, the following code generates random points with the same color. I want them in different colors. I think I have a problem ...
228 views

### Plotting a unit length line given its midpoint and an angle

I have generated random 3-tuples: $(x, y, \theta)$ where $\{x, y\}$ is the midpoint of a unit length line and $\theta$ is its angle with respect to the x-axis. Is there a way to plot these lines ...
200 views

### Randomly pick ten numbers from a table such that no two numbers are on the same row or the same column

I have generated a matrix as follows: Range[41, 50], Range[51, 60], Range[61, 70], Range[71, 80], Range[81, 90], Range[91, 100]]) // MatrixForm I was ...
302 views