+ Reply to Thread
Results 1 to 23 of 23

Poisson distribution - simulation

  1. #1
    Forum Contributor
    Join Date
    03-09-2010
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    173

    Poisson distribution - simulation

    Hello!

    I want to simulate a process using the poisson distribution. If the poisson distributed event occurs I want a variable to show "1" else "0".

    Can you help me? did you understand?

  2. #2
    Valued Forum Contributor JeanRage's Avatar
    Join Date
    03-02-2009
    Location
    Nice, France
    MS-Off Ver
    Excel 2003
    Posts
    705

    Re: Poisson distribution - simulation

    Hi,

    Take a look at
    http://support.microsoft.com/kb/828130

    HTH

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Poisson distribution - simulation

    Welcome to the forum.

    You want a function that generates random variates with Poisson distribution?
    Last edited by shg; 03-09-2010 at 12:01 PM.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Contributor
    Join Date
    03-09-2010
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    173

    Re: Poisson distribution - simulation

    I am trying to model a stock price simulation with jumps (jump diffusion process). I want the variable to show "1" if the jump occurs. The jump is poisson distributed and can occur more than once in my interval (250 days), I would like to have the ability to adjust the frequency (lambda) of the jumps.

  5. #5
    Forum Contributor
    Join Date
    03-09-2010
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    173

    Re: Poisson distribution - simulation

    yes, I want a function which generate variates with poisson distribution.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Poisson distribution - simulation

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    03-09-2010
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    173

    Re: Poisson distribution - simulation

    Perfect! Thank you.

    If I want to "resimulate" my model by hitting f9, the VBAscript won't update. Do you have a sollution to this as well?

  8. #8
    Forum Contributor
    Join Date
    03-09-2010
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    173

    Re: Poisson distribution - simulation

    never mind

  9. #9
    Forum Contributor
    Join Date
    03-09-2010
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    173

    Re: Poisson distribution - simulation

    Well, actually - please do mind

  10. #10
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Poisson distribution - simulation

    =RandPois(some number, TRUE)

  11. #11
    Forum Contributor
    Join Date
    03-09-2010
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    173

    Re: Poisson distribution - simulation

    Thank you!

  12. #12
    Forum Contributor
    Join Date
    03-09-2010
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    173

    Re: Poisson distribution - simulation

    Do you have the coding for repeating the simulation for instance 1000 times, and writing the values to a new cell each time?

  13. #13
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Poisson distribution - simulation

    Please Login or Register  to view this content.
    Last edited by shg; 03-15-2010 at 01:45 PM.

  14. #14
    Forum Contributor
    Join Date
    03-09-2010
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    173

    Re: Poisson distribution - simulation

    Sorry, I wasn't clear enough.

    Each time I enter F9 I get six generated outcomes.

    I want to do this simulation 1000 times and write the result to a new cell.

    Thanks for all your help!

  15. #15
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Poisson distribution - simulation

    You're not being any clearer now. I have no idea what your workbook looks like.

  16. #16
    Forum Contributor
    Join Date
    03-09-2010
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    173

    Re: Poisson distribution - simulation

    Ok, each time enter F9 I get a result in 6 cells,

    I want a macro who takes the results and copy them to a spreadsheet, then runs a new simulation and copies the results to the row underneath the results from the previous simulation.

  17. #17
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Poisson distribution - simulation

    Hjahren, code is depressingly literal. Copy what six cells to where?

    That's the last question I'll ask.

  18. #18
    Forum Contributor
    Join Date
    03-09-2010
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    173

    Re: Poisson distribution - simulation

    sorry...
    copy the results from the simulation which is done when I press F9. To a new spreadsheet in the same document.

    I want this to be repeated 1000 times, and for each time copied the results one row below the previous the results.

    the clue is that I want to run a simulation 1000 times and save all the results.

  19. #19
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Poisson distribution - simulation

    Please Login or Register  to view this content.

  20. #20
    Forum Contributor
    Join Date
    03-09-2010
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    173

    Re: Poisson distribution - simulation

    youre good.

    thx

  21. #21
    Forum Contributor
    Join Date
    03-09-2010
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    173

    Re: Poisson distribution - simulation

    It has occured a new problem...

    My sheet regenerates new variables between each time something is done in the sheet. How can I avvoid this, and make it only generate new variables with the calculatefunction in VBA

  22. #22
    Registered User
    Join Date
    08-14-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Poisson distribution - simulation

    I try to use function RandPois in excel 2007, but it cannot be recognized by excel. Does 2007 have different syntax for the function?

  23. #23
    Registered User
    Join Date
    04-25-2009
    Location
    california
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Poisson distribution - simulation

    ignore this reply.
    Last edited by jane657; 08-14-2021 at 09:42 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1