Sample Space, Event and Probability
(Ω,Σ,P) is a probability space, where Ω is the sample space, Σ is the event space, and P is the probability measure.
Σ should satisfy:
①Σ⊂2Ω②Σ is a σ-algebra
X is a random variable, which is a function from Ω to R, i.e. X:Ω→R.And should satisfy:
X−1((−∞,x])={ω∈Ω:X(ω)≤x}∈Σ∀x∈R
Distribution Function
Here is the definition of distribution function:
FX(x)=P(X≤x)=P(x∈(−∞,x])
Distribution function Fz(x) satisfies the following properties:
①FX(−∞)=0,Fx(+∞)=1②FX(x)≤FX(y) if x≤y③FX(x) is right continuous
The Derivative of FX(x) is the probability density function fX(x):
fX(x)=dxdFX(x)
Now if
X∼FX(x)
We want to know the Distribution function of Y=aX+b:
FY(y)=P(Y≤y)=P(aX+b≤y)={P(X≤ay−b)=FX(ay−b)P(X≥ay−b)=1−FX(ay−b)+P(X=ay−b)a>0a<0
And the density function of Y is:
fY(y)={a1fX(ay−b)−a1fX(ay−b)+P(X=ay−b)δ()a>0a<0
(Temporarily ignore the part of δ function)
Example
Monte Carlo Simulation
The key of the problem is the generation of Pseudo-random numbers, while these numbers should satisfy the required distribution.
Theoritically, we have a Uniform distribution U(0,1), and we can generate a random number X with distribution FX(x) by:
X=FX−1(U)
Where FX−1(x) is the inverse function of FX(x).
Proof
FY(y)=P(Y≤y)=P(FX−1(U)≤y)=P(U≤FX(y))=FU(FX(y))=FX(y)