+ Reply to Thread
Results 1 to 6 of 6

Generating variables with Poisson Distribution

  1. #1
    Registered User
    Join Date
    09-22-2015
    Location
    Port-Louis, Mauritius
    MS-Off Ver
    MS Office 2010
    Posts
    4

    Generating variables with Poisson Distribution

    Consider a variable X which has a poisson distribution with mean 1.5.
    How do I generate 100 values of X using VBA ?
    Thanks.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Generating variables with Poisson Distribution

    Try:
    Please Login or Register  to view this content.
    Best Regards,

    Kaper

  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: Generating variables with Poisson Distribution

    @Kaper,

    Here's my version of that:

    Please Login or Register  to view this content.
    It differs from yours in that the loop always executes at least once.

    I went back to Knuth, and his description is a little arm-waving. Any thought on which is correct?
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Generating variables with Poisson Distribution

    Hi shg,
    Honestly - I just made a search in my HomeCloud and in one of files there was this function.

    But having a brief look (it's almost midnight here):
    Initial p is 1
    so
    Please Login or Register  to view this content.
    condition could be met before first execution of loop only for e>1
    but as
    Please Login or Register  to view this content.
    it means ... for mean <0

  5. #5
    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: Generating variables with Poisson Distribution

    Of course, thank you.

  6. #6
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Generating variables with Poisson Distribution

    My pleasure :-)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Poisson distribution - simulation
    By Hjahren in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 08-14-2021, 09:09 AM
  2. [SOLVED] VBA to simulate poisson distribution
    By Ztv in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-18-2014, 05:53 AM
  3. Generating Poisson Random Variables
    By telk02 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-24-2012, 04:56 PM
  4. [SOLVED] Poisson distribution
    By hnasir in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-19-2012, 03:47 PM
  5. Poisson Distribution--Help
    By neocube in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2011, 07:24 AM
  6. Poisson distribution
    By swfc in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-23-2008, 07:02 PM
  7. [SOLVED] Poisson Distribution
    By Capote in forum Excel General
    Replies: 1
    Last Post: 04-02-2006, 11:45 PM

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