From: Juan P. C. <aju...@gm...> - 2012-10-30 15:09:02
|
On Tue, Oct 30, 2012 at 3:03 PM, Surandokht Nikzad <sur...@gm...> wrote: > Hi there, > > I am beginner in Octave. > I am using this for calculation kernel density for some concentrations. > > This is one example data: > > ssw ef > 1.85 1.497297297 > 1.21 1.719008264 > 1.44 1.451388889 > 1.71 1.514619883 > 1.4 1.192857143 > 0.396 1.795454545 > > Here is the codes: > > doc_ef=a(:,2); > doc_ssw=a(:,1); > run_doc=0:d:20; > dens_est_doc_ef=kernel_dens(ones(size(run_doc)),doc_ef,run_doc); > plot(run_doc,dens_est_doc_ef,'b') > > The integral of each distribution should be equal to one!My question is how > can I avoid having plots over one in my graph. The example for graph is > attached by this email. > > Any idea and suggestion would be appreciated. > > Thanks, > Sue > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Octave-dev mailing list > Oct...@li... > https://lists.sourceforge.net/lists/listinfo/octave-dev > As you said the integral of probability density function is one, but the density function itself could be bigger then one. Think of the delta distribution. http://en.wikipedia.org/wiki/Delta_distribution If you want, you can plot the normalized frequency plot using hist with the normalization argument equal to 1. |
From: Surandokht N. <sur...@gm...> - 2012-10-30 15:12:53
|
I am afraid, I am not sure how to code/ compute it... On 12-10-30 5:08 PM, "Juan Pablo Carbajal" <aju...@gm...> wrote: >On Tue, Oct 30, 2012 at 3:03 PM, Surandokht Nikzad <sur...@gm...> >wrote: >> Hi there, >> >> I am beginner in Octave. >> I am using this for calculation kernel density for some concentrations. >> >> This is one example data: >> >> ssw ef >> 1.85 1.497297297 >> 1.21 1.719008264 >> 1.44 1.451388889 >> 1.71 1.514619883 >> 1.4 1.192857143 >> 0.396 1.795454545 >> >> Here is the codes: >> >> doc_ef=a(:,2); >> doc_ssw=a(:,1); >> run_doc=0:d:20; >> dens_est_doc_ef=kernel_dens(ones(size(run_doc)),doc_ef,run_doc); >> plot(run_doc,dens_est_doc_ef,'b') >> >> The integral of each distribution should be equal to one!My question is >>how >> can I avoid having plots over one in my graph. The example for graph is >> attached by this email. >> >> Any idea and suggestion would be appreciated. >> >> Thanks, >> Sue >> >> >>------------------------------------------------------------------------- >>----- >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_sfd2d_oct >> _______________________________________________ >> Octave-dev mailing list >> Oct...@li... >> https://lists.sourceforge.net/lists/listinfo/octave-dev >> > >As you said the integral of probability density function is one, but >the density function itself could be bigger then one. Think of the >delta distribution. >http://en.wikipedia.org/wiki/Delta_distribution > >If you want, you can plot the normalized frequency plot using hist >with the normalization argument equal to 1. |
From: Juan P. C. <aju...@gm...> - 2012-10-30 15:20:05
|
On Tue, Oct 30, 2012 at 3:12 PM, Surandokht Nikzad <sur...@gm...> wrote: > I am afraid, I am not sure how to code/ compute it... > > On 12-10-30 5:08 PM, "Juan Pablo Carbajal" <aju...@gm...> wrote: > >>On Tue, Oct 30, 2012 at 3:03 PM, Surandokht Nikzad <sur...@gm...> >>wrote: >>> Hi there, >>> >>> I am beginner in Octave. >>> I am using this for calculation kernel density for some concentrations. >>> >>> This is one example data: >>> >>> ssw ef >>> 1.85 1.497297297 >>> 1.21 1.719008264 >>> 1.44 1.451388889 >>> 1.71 1.514619883 >>> 1.4 1.192857143 >>> 0.396 1.795454545 >>> >>> Here is the codes: >>> >>> doc_ef=a(:,2); >>> doc_ssw=a(:,1); >>> run_doc=0:d:20; >>> dens_est_doc_ef=kernel_dens(ones(size(run_doc)),doc_ef,run_doc); >>> plot(run_doc,dens_est_doc_ef,'b') >>> >>> The integral of each distribution should be equal to one!My question is >>>how >>> can I avoid having plots over one in my graph. The example for graph is >>> attached by this email. >>> >>> Any idea and suggestion would be appreciated. >>> >>> Thanks, >>> Sue >>> >>> >>>------------------------------------------------------------------------- >>>----- >>> Everyone hates slow websites. So do we. >>> Make your web apps faster with AppDynamics >>> Download AppDynamics Lite for free today: >>> http://p.sf.net/sfu/appdyn_sfd2d_oct >>> _______________________________________________ >>> Octave-dev mailing list >>> Oct...@li... >>> https://lists.sourceforge.net/lists/listinfo/octave-dev >>> >> >>As you said the integral of probability density function is one, but >>the density function itself could be bigger then one. Think of the >>delta distribution. >>http://en.wikipedia.org/wiki/Delta_distribution >> >>If you want, you can plot the normalized frequency plot using hist >>with the normalization argument equal to 1. > > do help hist in your Octave prompt |