+ Reply to Thread
Results 1 to 7 of 7

Thread: Modeling traffic according to a distribution.

  1. #1
    Points: 3,036, Level: 33
    Level completed: 91%, Points required for next Level: 14

    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Modeling traffic according to a distribution.




    Hello everybody!
    I'm new in this forum and I hope this is the right place to post this thread..
    I'd like to kindly ask you just a suggestion to solve my problem..

    I have to model a web server traffic (e.g. user requests per server session) which follows a certain distribution (e.g. an inverse gaussian of which I know mu and lambda). I should code a simulator of such traffic but what I cannot understand is how to use the distribution for generating numbers.
    Could you please give me any hint?

    Thanks so much since now! Bye

  2. #2
    R purist
    Points: 35,103, Level: 100
    Level completed: 0%, Points required for next Level: 0
    TheEcologist's Avatar
    Location
    United States
    Posts
    1,921
    Thanks
    303
    Thanked 607 Times in 341 Posts
    Quote Originally Posted by smoking81 View Post
    Hello everybody!
    I'm new in this forum and I hope this is the right place to post this thread..
    I'd like to kindly ask you just a suggestion to solve my problem..

    I have to model a web server traffic (e.g. user requests per server session) which follows a certain distribution (e.g. an inverse gaussian of which I know mu and lambda). I should code a simulator of such traffic but what I cannot understand is how to use the distribution for generating numbers.
    Could you please give me any hint?

    Thanks so much since now! Bye

    Which program are you using? And does it have a random number generator that generates numbers with uniform probability?
    The true ideals of great philosophies always seem to get lost somewhere along the road..

  3. #3
    Points: 3,036, Level: 33
    Level completed: 91%, Points required for next Level: 14

    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by TheEcologist View Post
    Which program are you using? And does it have a random number generator that generates numbers with uniform probability?
    unfortunately i have to code on my own in c... let's say i have to get to the bottom of the problem..
    thanks again!

  4. #4
    R purist
    Points: 35,103, Level: 100
    Level completed: 0%, Points required for next Level: 0
    TheEcologist's Avatar
    Location
    United States
    Posts
    1,921
    Thanks
    303
    Thanked 607 Times in 341 Posts
    Quote Originally Posted by smoking81 View Post
    unfortunately i have to code on my own in c... let's say i have to get to the bottom of the problem..
    thanks again!
    I always thought the C math library had (pseudo) random number functions.

    http://www.phanderson.com/C/random.html

    Else see this:

    http://people.scs.fsu.edu/~burkardt/...m/uniform.html

    Getting the uniform number generator to work would be the first step to solving your problem. Once you've got that post back.
    The true ideals of great philosophies always seem to get lost somewhere along the road..

  5. #5
    Points: 3,036, Level: 33
    Level completed: 91%, Points required for next Level: 14

    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by TheEcologist View Post
    I always thought the C math library had (pseudo) random number functions.

    http://www.phanderson.com/C/random.html

    Else see this:

    http://people.scs.fsu.edu/~burkardt/...m/uniform.html

    Getting the uniform number generator to work would be the first step to solving your problem. Once you've got that post back.
    Hello again! maybe i made some confusion in explaining my problem..
    I have to characterize a (web) system load in order to solve an analitical model: in the assignment is given that the requests per session follow an Inverse Gaussian distribution, the user think time a Pareto, the HTML pages' dimension a Lognormal and so on...
    My problem is how to use these distributions to get the values which characterize the load....

  6. #6
    Points: 3,036, Level: 33
    Level completed: 91%, Points required for next Level: 14

    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello again!

    I finally understood what I had to do but now i have one final issue: I have to write a C function which generates random numbers according to an Inverse gaussian distribution of which i know mu=3.86 and lambda=9.46...

    Values from all other distributions I had to use (eg pareto) have been generated by using CSIM's functions (like pareto(alfa) ), but for inverse Gaussian such a function is not provided so I have to write it...

    THANKS A LOT FOR YOUR HELP!
    Bye!

  7. #7
    R purist
    Points: 35,103, Level: 100
    Level completed: 0%, Points required for next Level: 0
    TheEcologist's Avatar
    Location
    United States
    Posts
    1,921
    Thanks
    303
    Thanked 607 Times in 341 Posts

    Quote Originally Posted by smoking81 View Post
    Hello again!

    I finally understood what I had to do but now i have one final issue: I have to write a C function which generates random numbers according to an Inverse gaussian distribution of which i know mu=3.86 and lambda=9.46...

    Values from all other distributions I had to use (eg pareto) have been generated by using CSIM's functions (like pareto(alfa) ), but for inverse Gaussian such a function is not provided so I have to write it...

    THANKS A LOT FOR YOUR HELP!
    Bye!
    This is what I was trying to help you with in the first place.

    As stated before the first step is to get a uniform distribution working (so you can randomly generate probabilities from 0 to 1).

    Then you use the inverse CDF (or quantile function) of your distribution to generate random numbers.

    normal cdf(x)=p
    inverse cdf(p)=x

    So your uniform[0,1] distribution generates probabilities from 0 to 1. You then use these values with your inverse CDF. This basically "turns” your uniform probabilities into to values from your distribution of choice, it's that simple.

    So what you need:

    A) uniform dist.
    B) the quantile function (inverse cdf) for your inverse Gaussian dist.

    Example from the exponential distribution:

    CDF =

    p=1-exp(-L*x)

    Inverse CDF =

    1-p = exp(-L * x)
    ln(1-p) = -L * x
    ln(1-p)/-L = x

    note: inverse cdf unsolvable?

    I have never tried this for the inverse Gaussian however the standard procedure if your inverse cdf proves unsolvable is to use an optimization algorithm that returns the x value for every p.


    Hope this gets you a result,
    The true ideals of great philosophies always seem to get lost somewhere along the road..

+ Reply to Thread

           




Similar Threads

  1. Mixed modeling
    By bhuvansaitej in forum SAS
    Replies: 3
    Last Post: 02-23-2011, 08:11 PM
  2. Distribution and modeling of TV ad views
    By kenasto in forum Probability
    Replies: 0
    Last Post: 01-20-2011, 01:59 AM
  3. Linear Regression for Traffic Data
    By dramachandran in forum Regression Analysis
    Replies: 3
    Last Post: 10-13-2010, 11:25 AM
  4. How can I estimate the traffic
    By comopasta in forum Probability
    Replies: 1
    Last Post: 02-16-2009, 10:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats