+ Reply to Thread
Results 1 to 4 of 4

Drawing a random number from a defined distribution/defined likelihood distribution

  1. #1
    Registered User
    Join Date
    12-01-2010
    Location
    Finland
    MS-Off Ver
    Excel 2007
    Posts
    5

    Drawing a random number from a defined distribution/defined likelihood distribution

    Hi there,

    I'll be working into the night (it's around 23.41 already) with this, so any help would be much appreciated and save some of my sleep!

    My issue is the following: How can I draw a value at random from a defined likelihood distribution? I have data on the daily purchases of a product around the year. There might be several (up to a tens or hundreds) purchases per day, and some days might not have purchases at all.

    What I want to do, is for each client, draw and create a new variable, a so called random, "shadow" purchase date. This date should be drawn out of a distribution that matches the actual ones, but this shadow date can any of the dates around the year when at least 1 purchase occured. So if february 14th has 100 times more purchases than february 13th, I would like 14th to have 100 times the likelihood of being drawn.

    The only method I could come up with is to create a range where I enter each possible date as many times as actual purchases occured (so e.g. 14.02.2012 would have a 100 cells), and then use randbetween. But given the data, this is far too laborious to be feasible.

    Any other methods for doing this? Seems like such an elementary thing to do, but my skills or qoogling did not reveal a method.

    Help is much appreciated!

  2. #2
    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: Drawing a random number from a defined distribution/defined likelihood distribution

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    12-01-2010
    Location
    Finland
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Drawing a random number from a defined distribution/defined likelihood distribution

    Works. Thanks a lot for this. I forgot to think about approaching it through the cumulative distribution. Smart move

  4. #4
    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: Drawing a random number from a defined distribution/defined likelihood distribution

    The universal method to duplicate a distribution.

+ 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