+ Reply to Thread
Results 1 to 6 of 6

How can I use percentages to output a value based on probability?

  1. #1
    Registered User
    Join Date
    05-04-2020
    Location
    Leeds, UK
    MS-Off Ver
    2017
    Posts
    51

    How can I use percentages to output a value based on probability?

    Hi all, I've become stumped by this problem -

    sample.JPG

    What I want to do is have values appear in, say, C11:G11 based on the probabilities in the table. To explain what I mean, if it was the physical real world and I was looking for values for "A", it would be like putting 100 balls into a bag. 50 are marked 0, 38 are marked 25000, 9 are marked 50000, and 3 are marked 100000. I pull five balls out and put the values in row 11. And so on for B, C, D, etc.

    I'm stumped. Everything I google tells me how to calculate probabilities but not how to use them.

    Sample worksheet attached. Hope someone can help.

    Cheers! :-)
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: How can I use percentages to output a value based on probability?

    Picky, but A in cell A1 corresponds to the labels in B1:N1 rather than to probabilities.

    What you need are CUMULATIVE probabilities, but those are easy enough to calculate on the fly.

    C12:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    That said, it'd be FAR MORE EFFICIENT to use another range to calculate the needed cumulative probabilities, say in P2:AB8, with 0 in P2, =P2+B2 in Q2, fill Q2 right into R2:AB2, then select P2:AB2 and fill down into P3:AB8. Then change the formula above to

    C12:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-04-2020
    Location
    Leeds, UK
    MS-Off Ver
    2017
    Posts
    51

    Re: How can I use percentages to output a value based on probability?

    Wow! You're a genius! Thank you so much.

    I don't understand how it works to make sure it's favoring the higher probabilities - but I tested that it is (by changing some cells to 100% and the rest in the row to 0%) and I can only shake my head in wonder.

    I also made sure to move the A1 A down to A2.

  4. #4
    Registered User
    Join Date
    05-04-2020
    Location
    Leeds, UK
    MS-Off Ver
    2017
    Posts
    51

    Re: How can I use percentages to output a value based on probability?

    One follow up question: I made a version last night and I was sometimes getting #NA! responses such as:

    Did not find value '0.04246832255' in LOOKUP evaluation.

    I did something to fix it, but now I've made a second version which appears to function exactly the same and I'm getting the error again. Can't for the life of me remember how I fixed it though!

    Any thoughts?

  5. #5
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: How can I use percentages to output a value based on probability?

    The range or array of cumulative probabilities MUST BEGIN WITH ZERO. You don't provide your updated workbook, so I can only guess. However, if cumulative probabilities do begin at zero and are monotonically increasing, then LOOKUP(RAND(),range_or_array_of_cumulative_probabilities,labels) should always return an item from the 3rd argument.

  6. #6
    Registered User
    Join Date
    05-04-2020
    Location
    Leeds, UK
    MS-Off Ver
    2017
    Posts
    51

    Re: How can I use percentages to output a value based on probability?

    Thank you! Yep, it was totally cos I hadn't included the column of zeros in the range.

    Couldn't see the wood for the trees.

+ 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. Replies: 1
    Last Post: 11-28-2019, 09:23 AM
  2. Excel Probability Function - How to check and apply probability
    By StormerJack in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-10-2019, 03:06 PM
  3. Formula to output +/-1 at specified probability
    By chilledmalt in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-04-2017, 05:47 PM
  4. Output a Table of Percentages
    By carnivorous_daisy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-24-2017, 07:36 PM
  5. Excel 2007 : Probability based on 2 arrays
    By CUstudentDoc in forum Excel General
    Replies: 0
    Last Post: 11-01-2011, 04:02 PM
  6. Help building a simulation based on probability
    By one11 in forum Excel General
    Replies: 4
    Last Post: 11-14-2010, 11:14 AM
  7. Probability Question:probability outcomes
    By Myles in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-01-2006, 06:45 AM

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