# Tagged Questions

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

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$ ...
166 views

### Possible bug in VonMisesDistribution?

Bug introduced in 10.2 or earlier and fixed in 10.3 Observe: ...
102 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. ...
54 views

### Mixture of a bivariate distribution defined as a copula

I define a bivariate distribution: ...
143 views

### Random variable within Manipulate: how to make it independent on other controls

The code sample: ...
124 views

### ImplicitRegion gives arbitrary boundaries

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

### How do I generate n random numbers with an extra condition [duplicate]

I need to generate n random numbers that would sum into a. And I can't find an elegant solution here: https://reference.wolfram....
537 views

### For loop in Length computation code

Here is a code I wrote that is supposed to give the length of list after some splitting and regrouping. But it is inefficient. Is there a way to rewrite in more professional and efficient way? I guess ...
160 views

### How to find an estimated root efficiently with binary stochastic estimation of the function?

I am trying to construct certain nice geometric patterns, and one particular feature I'm trying to optimize is the balance of black and white corresponding to point being inside, or outside a ...
363 views

### Random non-overlapping disks in a square

I've found a nice code snippet by @belisarius from this question, that I'll reproduce here for reference: ...
81 views

### How do I define a random variable involving Part?

I need to define a random variable that involves Part, but when I try, for example ...
595 views

### What function generates random numbers in a compiled function?

I am writing a simulation for 2D random walk. I wrote several version of code, and found that the speed is like this (fastest to slowest): C++, Mathematica compiled procedural code, Mathematica ...
140 views

### Retrieving forthcoming step size from NDSolve

I'm solving a system of ODEs with a random component, which changes at each calculation step and depends on the step size. So I'm trying to realize something like this: (1) size of the forthcoming ...
99 views

### Slow-down encountered for RandomChoice in large lists

I was wondering if anyone could help me to speed up this code snippet which creates simple (sparse) networks by preferential attachment. The algorithm adds a vertex and an edge each time interval. ...
100 views

### Better to use loop or function when populated list?

In the past I have pretty much stuck to expression building when using Mathematica, but recently I have been writing a procedure to populate an array, which I guess are called "lists" in Mathematica. ...
153 views

### Partitioning List Into Sublists of Length 2 With The Pairing Being Random

I've done a bit of Googling with hopes of finding an answer, but to no avail. I'm looking for a way that I can have Mathematica take the elements of a list, say ...
355 views

### Plotting random circles in a square

How can we draw 20 circles which have random radius in a specified range, with random positions. All centers must be in a square with side=10 (for example centimeter): every overlapping between any ...
82 views

### RandomGraph with specific constraints

I need to generate random connected simple graphs (no loops) with the constraint that exactly two vertices must only have a single edge. I can create many connected graphs (but very few will have the ...
229 views

### Regime Change Stochastic Process

I would like to simulate an Ito process in which the drift and diffusion terms change after hitting a boundary for the first time. For example, a Geometric Brownian Motion X which has 0 drift and ...
841 views

96 views

### How to improve this function that selects parameters from arbitrary distribution using Recursion?

Below, I have defined a function using Which to select model parameters based upon various conditions. My questions are: Is there any danger in writing this function using Recursion? Is there a more ...
442 views

### How to randomly select subsets

I have a list of around 300 elements. I want to sample subsets of length 25 such that my samples are all distinct. My first inclination was to use something like ...
2k views

### Can Mathematica's random number generation be improved?

Performance on Random Number generation is intolerable. Whenever you need many deviates from the same distribution but with different parameters it takes forever. Here is a thread on Poisson ...
77 views

### Why is RandomVariate of special probability distribution doesn't working in all cases

I would like to generate a random variates in Mathematica 9 with this distribution: ...
59 views

### Fit process parameters to a transformed AR(1) process

I would like to fit the parameters of an exponented AR(1) process using Mathematica's EstimatedProcess, however, the function does not seem to evaluate to anything. First of all I create the ...