<< Chapter < Page Chapter >> Page >

Notice that we cannot form a density estimate by simply differentiating the empirical CDF, since this function contains discontinuities at thesample locations X i . Rather, we need to estimate the probability that a random variable willfall within a particular interval of the real axis. In this section, we will describe a common method known as the histogram .

The histogram

Our goal is to estimate an arbitrary probability density function, f X ( x ) , within a finite region of the x -axis. We will do this by partitioning the region into L equally spaced subintervals, or “bins”,and forming an approximation for f X ( x ) within each bin. Let our region of support start at the value x 0 , and end at x L . Our L subintervals of this region will be [ x 0 , x 1 ] , ( x 1 , x 2 ] , ..., ( x L - 1 , x L ] . To simplify our notation we will define b i n ( k ) to represent the interval ( x k - 1 , x k ] , k = 1 , 2 , , L , and define the quantity Δ to be the length of each subinterval.

b i n ( k ) = ( x k - 1 , x k ] k = 1 , 2 , , L Δ = x L - x 0 L

We will also define f ˜ ( k ) to be the probability that X falls into b i n ( k ) .

f ˜ ( k ) = P ( X b i n ( k ) ) = x k - 1 x k f X ( x ) d x
f X ( x ) Δ for x b i n ( k )

The approximation in [link] only holds for an appropriately small bin width Δ .

Next we introduce the concept of a histogram of a collection of i.i.d. random variables { X 1 , X 2 , , X N } . Let us start by defining a function that will indicate whether ornot the random variable X n falls within b i n ( k ) .

I n ( k ) = 1 , if X n b i n ( k ) 0 , if X n b i n ( k )

The histogram of X n at b i n ( k ) , denoted as H ( k ) , is simply the number of random variables that fall within b i n ( k ) . This can be written as

H ( k ) = n = 1 N I n ( k ) .

We can show that the normalized histogram, H ( k ) / N , is an unbiased estimate of the probability of X falling in b i n ( k ) . Let us compute the expected value of the normalized histogram.

E H ( k ) N = 1 N n = 1 N E [ I n ( k ) ] = 1 N n = 1 N { 1 · P ( X n b i n ( k ) ) + 0 · P ( X n b i n ( k ) ) } = f ˜ ( k )

The last equality results from the definition of f ˜ ( k ) , and from the assumption that the X n 's have the same distribution. A similar argument may be used to show that the variance of H ( k ) is given by

V a r H ( k ) N = 1 N f ˜ ( k ) ( 1 - f ˜ ( k ) ) .

Therefore, as N grows large, the bin probabilities f ˜ ( k ) can be approximated by the normalized histogram H ( k ) / N .

f ˜ ( k ) H ( k ) N

Using [link] , we may then approximate the density function f X ( x ) within b i n ( k ) by

f X ( x ) H ( k ) N Δ for x b i n ( k ) .

Notice this estimate is a staircase function of x which is constant over each interval b i n ( k ) . It can also easily be verified that this density estimate integrates to 1.

Exercise

Let U be a uniformly distributed random variable on the interval [0,1]with the following cumulative probability distribution, F U ( u ) :

F U ( u ) = 0 , if u < 0 u , if 0 u 1 1 , if u > 1

We can calculate the cumulative probability distribution for the new random variable X = U 1 3 .

F X ( x ) = P ( X x ) = P ( U 1 3 x ) = P ( U x 3 ) = F U ( u ) u = x 3 = 0 , if x < 0 x 3 , if 0 x 1 1 , if x > 1

Plot F X ( x ) for x [ 0 , 1 ] . Also, analytically calculate the probability density f X ( x ) , and plot it for x [ 0 , 1 ] .

Using L = 20 , x 0 = 0 and x L = 1 , use Matlab to compute f ˜ ( k ) , the probability of X falling into b i n ( k ) .

Use the fact that f ˜ ( k ) = F X ( x k ) - F X ( x k - 1 ) .
Plot f ˜ ( k ) for k = 1 , , L using the stem function.

Inlab report

  1. Submit your plots of F X ( x ) , f X ( x ) and f ˜ ( k ) . Use stem to plot f ˜ ( k ) , and put all three plots on a single figure using subplot .
  2. Show (mathematically) how f X ( x ) and f ˜ ( k ) are related.

Generate 1000 samples of a random variable U that is uniformly distributed between 0 and 1 (using the rand command). Then form the random vector X by computing X = U 1 3 .

Use the Matlab function hist to plot a normalized histogram for your samples of X , using 20 bins uniformly spaced on the interval [ 0 , 1 ] .

Use the Matlab command H=hist(X,(0.5:19.5)/20) to obtain the histogram, and then normalize H .
Use the stem command to plot the normalized histogram H ( k ) / N and f ˜ ( k ) together on the same figure using subplot .

Inlab report

  1. Submit your two stem plots of H ( k ) / N and f ˜ ( k ) . How do these plots compare?
  2. Discuss the tradeoffs (advantages and the disadvantages) between selecting a very large or very small bin-width.

Questions & Answers

where we get a research paper on Nano chemistry....?
Maira Reply
what are the products of Nano chemistry?
Maira Reply
There are lots of products of nano chemistry... Like nano coatings.....carbon fiber.. And lots of others..
learn
Even nanotechnology is pretty much all about chemistry... Its the chemistry on quantum or atomic level
learn
Google
da
no nanotechnology is also a part of physics and maths it requires angle formulas and some pressure regarding concepts
Bhagvanji
Preparation and Applications of Nanomaterial for Drug Delivery
Hafiz Reply
revolt
da
Application of nanotechnology in medicine
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.
Damian
yes that's correct
Professor
I think
Professor
Nasa has use it in the 60's, copper as water purification in the moon travel.
Alexandre
nanocopper obvius
Alexandre
what is the stm
Brian Reply
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
Rafiq
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
Damian
How we are making nano material?
LITNING Reply
what is a peer
LITNING Reply
What is meant by 'nano scale'?
LITNING Reply
What is STMs full form?
LITNING
scanning tunneling microscope
Sahil
how nano science is used for hydrophobicity
Santosh
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
Rafiq
what is differents between GO and RGO?
Mahi
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
Rafiq
if virus is killing to make ARTIFICIAL DNA OF GRAPHENE FOR KILLED THE VIRUS .THIS IS OUR ASSUMPTION
Anam
analytical skills graphene is prepared to kill any type viruses .
Anam
Any one who tell me about Preparation and application of Nanomaterial for drug Delivery
Hafiz
what is Nano technology ?
Bob Reply
write examples of Nano molecule?
Bob
The nanotechnology is as new science, to scale nanometric
brayan
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Damian
Is there any normative that regulates the use of silver nanoparticles?
Damian Reply
what king of growth are you checking .?
Renato
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
?
Kyle
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
Adin
why?
Adin
what school?
Kyle
biomolecules are e building blocks of every organics and inorganic materials.
Joe
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?

Ask