Mathematica: Random numbers from arbitrary PDF

Click For Summary
SUMMARY

The discussion focuses on generating random numbers from a custom probability density function (PDF) defined as f(v) ∝ v³ exp(-v² C) using Mathematica. Users can modify the built-in RandomVariate function by unprotecting it, adding a new definition for the specified distribution, and then reapplying protection. Techniques such as inverse transform sampling and rejection sampling are recommended for implementing this custom random number generation.

PREREQUISITES
  • Familiarity with Mathematica programming
  • Understanding of probability density functions (PDFs)
  • Knowledge of inverse transform sampling
  • Experience with rejection sampling techniques
NEXT STEPS
  • Explore how to unprotect and modify built-in functions in Mathematica
  • Study the implementation of inverse transform sampling in Mathematica
  • Research rejection sampling methods and their applications
  • Learn about custom probability distributions in Mathematica
USEFUL FOR

Mathematica users, statisticians, data scientists, and anyone interested in custom random number generation from specific probability distributions.

Niles
Messages
1,834
Reaction score
0
Hi

I want to generate a set of random numbers according to a specific distribution, namely given by
<br /> f(v) \propto v^3\exp(-v^2 C)<br />
where C is a constant. It is clear how to do it with a distribution already implemented in Mathematica, http://reference.wolfram.com/mathematica/tutorial/RandomNumberGeneration.html, but is there a way to do it with the one given by me above?


Niles.
 
Physics news on Phys.org

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 2 ·
Replies
2
Views
4K