![]() |
|
|
|||||||
| FlashChat | Actuarial Discussion | Preliminary Exams | CAS/SOA Exams | Cyberchat | Around the World | Suggestions |
|
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I need a formula that will help create random letters down a column: A-F.
Probability of A=3%, B=6%, C=8%, D=11%, E=14%, F=16% I've got it worked out to where each letter is a header of a column ("A" is in A1, "B" is in B1, etc.). My question is: how do I consolidate that in one column, so that, "A" for example, reads ABFCBACFBFBECEABCEABCEAFBCEFBCAFEBCFAEBFC...? I'm using the random number generator for the 6 columns...thx |
|
#2
|
||||
|
||||
|
a1&b1&c1&.....
__________________
Spoiler: |
|
#3
|
|||
|
|||
|
Why not do it more directly?
Put the random number function in cell A1 In cell B1 use the formula =if(A1<3%,"A",if(A1<9%,"B",if(A1<17%,"C",if(A1<28% ,"D",if(A1<42%,"E",if(A1<58%,"F","Hey, these probabilities don't add up to 100%")))))) Repeat in as many cells as necessary. |
|
#4
|
|||
|
|||
|
Quote:
|
|
#6
|
|||
|
|||
|
I played with it more..
I took 65535 and multiplied by the probabilities (0-1) of each letter then rounded to the nearest whole number. I then made one column with that many a', b's, c's, etc. In the column next to the Master column, I used =rand() then sorted by rand(): this made the letters appear random instead of simply listed by their weighting (probability). --------------- I can also encapsulate this in a 100-character string named, say, Choices, defined as ="AAABBBBBBCCCCCCCC..." Then use the formula = mid( Choices, randombetween(1,100), 1 ) to retrieve a probabalistically weighted result. |
|
#10
|
||||
|
||||
|
Go brush your teeth.
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|