Generating Any Probability Distribution - Transform of Random Variables and Random Number Generators
ฝัง
- เผยแพร่เมื่อ 7 มิ.ย. 2024
- In this video, we aim to construct random number generators of any probability distribution. We introduce the theory of random variables and transform of random variables in order to construct random number generators of any distribution.
In this video, the linear congruential generator is introduced.
en.wikipedia.org/wiki/Linear_...
However, the much more popular method used today is the Mersenne Twister, which is significantly harder to understand, and it is beyond the scope of this video.
en.wikipedia.org/wiki/Mersenn...
Two main techniques used in this video are the probability integral transform and the inverse transform sampling.
en.wikipedia.org/wiki/Probabi...
en.wikipedia.org/wiki/Inverse...
My other video on a more rigorous definition of random variables:
• Mathematics of Maximiz...
Chapters:
00:00 Intro
02:38 Continuous Distributions
05:19 General Theory of Random Variables
07:47 Piecewise Linear Transformation of Random Variables
10:10 Nonlinear Transformation of Random Variables
13:06 Geometry of Transformation of Random Variables
16:24 Linear Congruential Generator
19:54 Probability Integral Transform and Inverse Transform Sampling
23:30 Generalized Inverse
25:06 Transform Between Any Two Distributions
26:13 Outro
Music🎵:
Titanium - Mittsies • Mittsies - Titanium
Pocket's Lookin' Light - Gareth Coker · Riot Forge • Pocket's Lookin' Light
Runnin' From Lariette - Gareth Coker · Riot Forge • Runnin' From Lariette
Machina del Diablo - Stephen Rippy • Machina del Diablo
Driftveil City Funk Cover - Sean R. Hanson • Pokemon BW - Driftveil...
Corrections:
22:56 CDF not PDF
Guess my sleep is delayed by 26 minutes
1144 me too 😭
Are you in my room bc its 4 am and im still gona watch this mf
Same
same here lmao
“Adds to watch later”
Very insightful, just finished my Advanced Measure Theory paper in university. Wasn't expecting to find applications here, but it surely supplemented my knowledge.
There is a method in image processing called histogram equalization, which is basically taking an image and processing it such that its histogram becomes more uniform. This can be useful for discarding things like shadows from projections when doing feature detection, as well as a way to salvage overexposed images where the histogram is digitally clipped.
wow i finally understand what transformation of rv geometrically means because of this video
Little prince distribution. Sounds good, actually
wow this makes integration by substitution so clear
The thumbnail tricked me! As an algebraist, the word “Rng” made me believe there was some Algebraic structure underneath; I cam out disappointed, but also happy to have learned something new!
2:38 Really solid into! As a side note: one probability approach I'd like to see more often is setting bounds for classes of the input space.
e.g. the ball reaching a point 500m away from the goal? put some bounds on the initial kick energy + wind resistance + time of flight and you get 0%
or another class: the ball reaching the top left corner: it needs one of -> which if you diff backwards -> you get of input ranges -> which covers of the input space, so it's now a question of how common/easily do those initial conditions happen
This way you get to progressively shape the actual distribution, even if you don't know it (as opposed to usual simplify and "it's just a model")
P.S. I just like visual math videos, I don't do math professionally
4:42 "times the indicator function from a to b" So this is how mathematicians do ifs :))
good illustration, thanks!
Great explanations - thank you!
N(100,15), the IQ curve, we meet again
Nice hat in the thumbnail
My favorite formula of random variable transformation is (from any dimension to any dimension)
f_Y (y1, ..., yn) = integral dx1 ... dxm f_X (x1,...xm) delta(f1(x1,...,xm)) delta(f2(x1,...xm)) ... delta(fn(x1,...xm))
where f1, ...fn encode the functional relationship between x1, ..., xm and y1, ...yn.
This can go from 1->1 random variable. Or 2->1. Usually n
Very interesting 🤓
That is just what I wanted!
I'm wondering if transformations like this could be useful in solving nonlinear odes
How are all your videos so great?
Very cool video ! Actually, I'm struggling trying to derive a formula for the CDF (or PDF) of the product of two random variables, and explore some sort of algebra of random variable (I know there is a book with this name but I nothing really satisfying for the product of two random variables....) ; by taking the log maybe ?
I would love you to talk about Fokker-Planck Equations in a future video
my thoughts too, especially if things like this could be useful in solving them
Interesting.
BASED
Good to know
You're so cool!!!
9:00
It should technically be called a "affine" transformation, not "linear"
All about context.
Not everything is in linear algebra language, and in the context of probability theory, linear is more common.
Piecewise linear manifolds, linearization of differential equations, all of these concepts technically are affine maps, but no one calls it affine.
❤ awesome
1. if we know the function Y =g(X) then we can calculate f_Y(y) from f_X(x)
2. we can generate numbers with algorithm (linear congruential generator) or by natural phenomenon
so if the x is generated by phenomeon ->
The distribution of x, which is f_X(x) will be made ->
but we want the disrtibution be f_Y(y)
then we have to find function g where Y=g(X)?
is that how we can make a generator for any probability distribution?
And why this is realted with inverse integrals?
Fangraphs sighting!!!!
4:10 it's not an integral from -∞ to the dummy variable, but to x. In this case, t is the dummy variable.
dummy variable as in the argument of the function. that was pretty understandable.
❤❤
Ok but what is the probability i can get a gf
non-zero 😊
Mathematically: 50%
Less than 1
@@montadermajed9456 what makes you say that
@@speye i appreciate the confidence
why did you make the thumbnail a hat
"I showed the grown ups my masterpiece, and I asked them if my drawing scared them. They answered:'why be scared of a hat?' My drawing was not a picture of a hat. It was a picture of a boa constrictor digesting an elephant." - Antoine de Saint-Exupéry, The Little Prince
Great story especially if you know french. @@HaramGuys
I think i'am stupid
mersenne twister kinda sucks
it's needlessly overcomplicated
is not random at all on the lower bits
can get stuck producing only zeroes for millions of iterations
is hard to seed properly
it needs so much memory that it doesn't fit on registers
it's kinda slow
adds unnecessary binary size in an application using it
you really don't need equal distribution in 623 dimensions, 4 is enough for any computation that lasts less than a human lifetime
look for xoroshiro128 or xoshiro256 for much better alternatives.