<< Chapter < Page Chapter >> Page >

To test your function, generate a sample of Uniform[0,1] random variables using the function X=rand(1,N) . Plot two CDF estimates: one using a sample size N = 20 , and one using N = 200 . Plot these functions in the range t=[-1:0.001:2] , and on each plot superimpose the true distribution for a Uniform[0,1] random variable.

Hand in your empcdf function and the two plots.

Generating samples from a given distribution

It is oftentimes necessary to generate samples from a particular distribution. For example, we might want to run simulations to test how an algorithmperforms on noisy inputs. In this section we will address the problem of generating random numbers froma given distribution F X ( x ) .

Suppose we have a continuous random variable X with distribution F X ( x ) , and we form the new random variable Y = F X ( X ) . In other words Y is a function of X , and the particular function is the CDF of the random variable X .

Applying the transformation F X ( · ) to X .

How is Y distributed? First notice that F X ( · ) is a probability, so that Y can only take values in the interval [ 0 , 1 ] .

P ( Y y ) = 0 , for y < 0 1 , for y > 1

Since F X ( x ) is a monotonically increasing function of x , the event { Y y } is equivalent to { X x } if we define y = F X ( x ) . This implies that for 0 y 1 ,

F Y ( y ) = P ( Y y ) = P ( F X ( X ) F X ( x ) ) = P ( X x ) (monotonicity) = F X ( x ) = y .

Therefore Y is uniformly distributed on the interval [0,1] .

Conversely, if F X ( · ) is a one-to-one function, we may use the inverse transformation F X - 1 ( U ) to transform a Uniform[0,1] random variable U to a random variable with distribution F X ( · ) .

Transforming a uniform random variable to one with distribution F X ( · ) .

Note that combining these results allows us to transform any continuous random variable X F X ( x ) to any other continuous random variable Z F Z ( z ) , provided that F Z ( · ) is a one-to-one function.

Transforming a random variable with distribution F X ( · ) to one with distibution F Z ( · ) .


Your task is to use i.i.d. Uniform[0,1] random variables to generatea set of i.i.d. exponentially distributed random variables with CDF

F X ( x ) = ( 1 - e - 3 x ) u ( x ) .

Derive the required transformation.

Generate the Uniform[0,1] random variables using the function rand(1,N) . Use your empcdf function to plot two CDF estimates for the exponentially distributed random variables:one using a sample size N = 20 , and one using N = 200 . Plot these functions in the range x=[-1:0.001:2] , and on each plot superimpose the true exponential distribution of [link] .

Inlab report

  • Hand in the derivation of the required transformation, and yourMatlab code.
  • Hand in the two plots.

Estimating the probability density function

The statistical properties of a random variable are completely described by its probability density function (assuming it exists, of course).Therefore, it is oftentimes useful to estimate the PDF, given an observation of a random variable.For example, similar to the empirical CDF, probability density estimates may be used to test a proposed model.They may also be used in non-parametric classification problems, where we need toclassify data as belonging to a particular group but without any knowledge of the true underlying class distributions.

Questions & Answers

what is variations in raman spectra for nanomaterials
Jyoti Reply
I only see partial conversation and what's the question here!
Crow Reply
what about nanotechnology for water purification
RAW Reply
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
yes that's correct
I think
what is the stm
Brian Reply
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
How we are making nano material?
what is a peer
What is meant by 'nano scale'?
What is STMs full form?
scanning tunneling microscope
how nano science is used for hydrophobicity
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
what is differents between GO and RGO?
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
what is Nano technology ?
Bob Reply
write examples of Nano molecule?
The nanotechnology is as new science, to scale nanometric
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Is there any normative that regulates the use of silver nanoparticles?
Damian Reply
what king of growth are you checking .?
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
Stoney Reply
why we need to study biomolecules, molecular biology in nanotechnology?
Adin Reply
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
what school?
biomolecules are e building blocks of every organics and inorganic materials.
anyone know any internet site where one can find nanotechnology papers?
Damian Reply
sciencedirect big data base
Introduction about quantum dots in nanotechnology
Praveena Reply
what does nano mean?
Anassong Reply
nano basically means 10^(-9). nanometer is a unit to measure length.
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
Damian Reply
absolutely yes
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Privacy Information Security Software Version 1.1a
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get the best Algebra and trigonometry course in your pocket!

Source:  OpenStax, Purdue digital signal processing labs (ece 438). OpenStax CNX. Sep 14, 2009 Download for free at http://cnx.org/content/col10593/1.4
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Purdue digital signal processing labs (ece 438)' conversation and receive update notifications?