Generate synthetic data (or probability distribution object)

Technical Source
2 min readApr 23, 2022

--

need to generate a synthetic dataset using a distribution that is not supported by the Matlab stats toolbox. The distribution is a Type II Pareto (or Lomax) with the probability density function f ( x ) = ( a m^a) / ( m + x )^( 1 + a ), where a is a shape parameter and m is the minimum permissible value of x. The distribution also needs to be truncated at x=50.

Is it possible to generate a probability distribution object (pd) from an equation or PDF, so that I can then use the “random” function to create the synthetic dataset? Or any other way to do this? Right now, I’m using “randsample” to do this, but that imposes a finite range or truncation on the PDF since it’s an array.

NOTE:-

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

You will need the inverse of the Cumulative Distribution Function. The Lomax CDF is given by Wikipedia as

The inverse function gives the x value corresponding to a given cumulative probability r as

The code below shows how to draw samples from the Lomax PDF. The resulting distribution is compared to the analytical PDF for verification.

% Lomax PDF parameters:
m = 1;
a = 2;
% Draw random samples from uniform distribution in range 0 to 1:
n_samples = 100000;
r = rand(n_samples,1);
% Find the CDF values corresponding to the samples
x = m*((1 - r).^(-1/a)-1); % Inverse Lomax CDF
% Calculate histogram with bin width 0.1:
binwidth = 0.1;
bins = 0:0.1:5;
N = histcounts(x,bins); % Number of x values in each bin
f = N/n_samples/binwidth; % Observed frequency per x unit
bin_centres = (bins(1:

SEE COMPLETE ANSWER CLICK THE LINK

--

--

Technical Source
Technical Source

Written by Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

No responses yet