MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: mathematica fit data to inverse gamma distribution

  • To: mathgroup at smc.vnet.net
  • Subject: [mg117446] Re: mathematica fit data to inverse gamma distribution
  • From: Ntinos paulos <mammasis82 at hotmail.com>
  • Date: Sat, 19 Mar 2011 05:16:59 -0500 (EST)
  • References: <ilsrrt$t92$1@smc.vnet.net>

On Mar 17, 12:38 pm, Alexei Boulbitch <alexei.boulbi... at iee.lu> wrote:
> Hi, Alex,
>
> put "ProbabilityDensity" instead of "PDF". In other words, try this:
>
> data1 = RandomVariate[InverseGammaDistribution[0.5, 3], 10^4];
> Show[Histogram[data1, {0, 20, 1}, "ProbabilityDensity"],
>   Plot[PDF[TruncatedDistribution[{0, 20},
>      InverseGammaDistribution[0.5, 3]], x], {x, 0, 20},
>    PlotStyle ->  Thick]]
>
> Have fun, Alexei
>
> Hi,
>
> I am trying to obtain same figure that is provided in Mathematica's websi=
te related to fitting an inverse gamma to a dataset. Here is the code I ent=
er:
>
> data1 = RandomVariate[InverseGammaDistribution[0.5, 3], 10^4];
> Show[
>   Histogram[data1, {0, 20, 1}, "PDF"],
>   Plot[PDF[
>     TruncatedDistribution[{0, 20}, InverseGammaDistribution[0.5, 3]],
>     x], {x, 0, 20}, PlotStyle ->  Thick]]
>
> and here is the error I receive:
>
> Histogram::hspec: The height specification PDF is not one of the named he=
ight functions or a function that can be used to compute the heights for ea=
ch bin.>>
> Show::"gcomb" :  StyleBox[Could not combine the graphics objects in ...=
..
>
> I would appreciate anyone's help.
>
> Regards
>
> Alex
>
> --
> Alexei Boulbitch, Dr. habil.
> Senior Scientist
> Material Development
>
> IEE S.A.
> ZAE Weiergewan
> 11, rue Edmond Reuter
> L-5326 CONTERN
> Luxembourg
>
> Tel: +352 2454 2566
> Fax: +352 2454 3566
> Mobile: +49 (0) 151 52 40 66 44
>
> e-mail: alexei.boulbi... at iee.lu
>
> www.iee.lu
>
> --
>
> This e-mail may contain trade secrets or privileged, undisclosed or
> otherwise confidential information. If you are not the intended
> recipient and have received this e-mail in error, you are hereby
> notified that any review, copying or distribution of it is strictly
> prohibited. Please inform us immediately and destroy the original
> transmittal from your system. Thank you for your co-operation.

Hi and thanks for all your replies. It seems that I cannot get it
working in version 7.0.0. I copy and paste exactly the same thing and
I have already tried the alternatives suggested by all of you.
Nonetheless, if you have some time please let me know thoughts.

Best Wishes,

Alex.


  • Prev by Date: Re: Coordinates from Graphics3D images
  • Next by Date: Re: InheritScope
  • Previous by thread: Re: mathematica fit data to inverse gamma distribution
  • Next by thread: Documentation Center slowness in 8.0.1