Re: Altering Gamma Distribution scale and shape parameters



Thabo, the solution is not going to be unique, since you have two parameters
to play with.

Try fixing the first (shape) parameter at a value larger than 1. The value 5
worked for me. It gives a distribution that has a
positive mode (in contrast with the value 1 which has the mode at 0).

You might find it convenient to create and play with the following two
functions:

f = @(p) gamcdf(200,5,p)-gamcdf(100,5,p); % try plotting this
g = @(p) f(p) - 0.5; % try using this with the fzero function

-- Tom


"Thabo" <thabotharan@xxxxxxxxx> wrote in message
news:27e526c3-a371-411d-b45c-2ce39ed44968@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi All,
I am sending this mail with the hope of that someone suggest me a good
solution.

In one of my case studies I would like to find the difference between
the probabilities of two points say 100 and 200 in a gamma
distribution so that my expected probability (say 0.50 or the area
under the curve = 0.5) is found between these two points. I want to
find the shape and the scale parameters that produce a gamma
distribution such that the prob= 0.50 between 100 and 200. I also want
to use these shape and scale values to reproduce a set of numbers
using the MATLAB gamrnd function so that 50% of such numbers lie
between 100 and 200.


In order to accomplish this, I started with the scale and shape
parameters 0.1 and 0.1 respectively and increase them. I keep on
increasing the scale value by 0.1 in a loop until it reaches 1000 and
then bring it back to 0.1 and increase the shape by 0.1 and put both
of them in the same previously mentioned loop until I find the
difference between the probability is equal to 0.5.

I was able to find the values of scale and shape values successfully.

Now when I input these two values of shape and scale values in the
MATLAB gamrnd function and generate 10000 numbers, I do not get number
values to lie in the interval as I expected.

What am I doing wrong here. Or is it the sample space (10000 numbers
is too small to observe any variations.?)

Any help is really appreciated.

Thanks,
Thabo



.



Relevant Pages

  • Re: question for those who have scales really well internalized
    ... When I was studying with Jerry Coker, he was learning guitar. ... Do you see the scale over the whole fretboard at once or in sections? ... usually brought up but it's a very powerful aid to internalization. ... I knew the diatonic seventh chords, and could play most pop and blues ...
    (rec.music.makers.guitar.jazz)
  • Re: What scale/mode?
    ... It's a Bm scale. ... might certainly fit into a paso, but there's no rhythm to the solo. ... you end on an Am chord, ... You can play the cards you're dealt, or improve your hand with DGT. ...
    (alt.guitar.beginner)
  • Re: What scale/mode?
    ... It's a Bm scale. ... It is playable on guitar, ... you end on an Am chord, ... You can play the cards you're dealt, or improve your hand with DGT. ...
    (alt.guitar.beginner)
  • Re: Fm7b5/Bb7#5#9
    ... Is there a single scale that can be used over each chord, ... play, for example, 1/2 bar of the locrian mode for the m7b5, 1/2 bar ... notes possible over Bb7 resolve into Ebm in individual ways. ...
    (rec.music.makers.guitar.jazz)
  • Re: Application of Lydian Chromatic Concept
    ... You are right Joe but, thanks, unfortunately I am not a LCC expert (the same ... I think the only measure where it is possible to play the A nat (so the Bb ... Russel's scale. ... measures the key change from Ab Maj to F Maj and the "Escamillo" ...
    (rec.music.makers.jazz)

Loading