How to generate N independent, identically distributed random numbers from the Reciprocal Normal Distribution?

12 views (last 30 days)
How to generate N independent, identically distributed random numbers from the Reciprocal Normal Distribution?
If are IID normally-distributed random numbers, ther reciprocal normal distribution is the probability density function of .
How do I generate N random numbers: from the probablity density function? Does Matlab have a built-in function for those?

Accepted Answer

Torsten
Torsten on 13 Jan 2023
Edited: Torsten on 13 Jan 2023
% Generate 10 random numbers from the inverse normal distribution
% (mu=0, sigma=1)
%
% G(y) = 1 - F(1/y)
% is the cumulative distribution function of the inverse normal distribution
% if F is the cumulative distribution function of the normal distribution
%
mu = 0;
sigma = 1;
u = rand(10,1);
y = 1./norminv(1-u,mu,sigma)
y = 10×1
0.6546 -0.6856 -1.5412 -1.1754 4.1175 -0.6873 -0.9705 -1.2747 0.4076 1.6827

More Answers (0)

Categories

Find more on Random Number Generation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!