+ Reply to Thread
Results 1 to 3 of 3

Pseudorandom draw from list. Probabilities defined by dynamic relative frequencies

  1. #1
    Forum Contributor
    Join Date
    02-05-2015
    Location
    czech
    MS-Off Ver
    2010
    Posts
    172

    Pseudorandom draw from list. Probabilities defined by dynamic relative frequencies

    I would like to draw n-times from list of members. It can be done like in previous thread bellow, but it is complicated when using select case for more than 2 members.
    HTML Code: 
    Relative probabilities of next draw will change after every draw according to outcome of previous draw. Conditions a+b+c=1 and a < b < c < 1 must hold. It is very difficult to define it, when a, b, c are dynamic.
    So I would like to define relative probabilities without the need to satisfy the second condition. Maybe there is mathematical trick to do that.

    Bellow is code to show that it is rather hard to define it by case.

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    02-05-2015
    Location
    czech
    MS-Off Ver
    2010
    Posts
    172

    Re: Pseudorandom draw from list. Probabilities defined by dynamic relative frequencies

    One solution is to do is:

    Please Login or Register  to view this content.
    Now the problem is how to do cumSum over array, so that I don't have to write all the sums Sum(ar(1),...,ar(n)) in my code. Still there maybe an easier solution or function for that.

  3. #3
    Forum Contributor
    Join Date
    02-05-2015
    Location
    czech
    MS-Off Ver
    2010
    Posts
    172

    Re: Pseudorandom draw from list. Probabilities defined by dynamic relative frequencies

    I've solved it. I've made an Public function which constructs array of cumulative sums of frequencies, then use it in preceding code.

+ 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. [SOLVED] Generating list of common values and corresponding frequencies
    By olgratefuldead in forum Excel General
    Replies: 5
    Last Post: 11-10-2014, 07:00 PM
  2. [SOLVED] Dynamic value used to put results in cell defined by dynamic value
    By Carrot Top in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-24-2013, 03:32 PM
  3. How to insert a relative dynamic formula in VBA
    By arskiracer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-23-2013, 12:29 AM
  4. [SOLVED] Making random list of names with different frequencies
    By Eridu in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-23-2012, 02:02 PM
  5. Draw a curve with defined variables
    By UVKutt in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 06-30-2008, 05:25 AM
  6. [SOLVED] Defined name Relative to sheets
    By Sige in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-29-2006, 09:50 AM
  7. Calculate frequencies and draw pie chart
    By burkina in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 04-04-2005, 04:06 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