Evening all! I wonder if anyone can help me out with a problem. What I am

trying to do is to produce a set of numbers in Excel (97) using the random

number generator, but based around different probabilies, for instance, a

number between 0 and 7, but with a distribution chance of, say 0 = 10%, 1 =

25%, 2 = 25%, 3 = 15%, 4 = 10%, 5 = 5%, 6 = 5%, 7 = 5%. (I think that adds

up to 100%!). I'm not sure I've explained that too well, but if anyone can

understand what I'm trying to do, and can help, I'd be grateful to hear from

you.

Thanks, Steve S (remove spamless if replying).

Evening all! I wonder if anyone can help me out with a problem. What I am

trying to do is to produce a set of numbers in Excel (97) using the random

number generator, but based around different probabilies, for instance, a

number between 0 and 7, but with a distribution chance of, say 0 = 10%, 1 =

25%, 2 = 25%, 3 = 15%, 4 = 10%, 5 = 5%, 6 = 5%, 7 = 5%. (I think that adds

up to 100%!). I'm not sure I've explained that too well, but if anyone can

understand what I'm trying to do, and can help, I'd be grateful to hear from

you.

Thanks, Steve S (remove spamless if replying).

Sorry about the duplication - still getting to grips with this *y thing

at the moment!

Quote:> Evening all! I wonder if anyone can help me out with a problem. What I am

> trying to do is to produce a set of numbers in Excel (97) using the random

> number generator, but based around different probabilies, for instance, a

> number between 0 and 7, but with a distribution chance of, say 0 = 10%, 1

=

> 25%, 2 = 25%, 3 = 15%, 4 = 10%, 5 = 5%, 6 = 5%, 7 = 5%. (I think that adds

> up to 100%!). I'm not sure I've explained that too well, but if anyone can

> understand what I'm trying to do, and can help, I'd be grateful to hear

from

> you.

> Thanks, Steve S (remove spamless if replying).

Since Excel's RAND function gives _uniform_ pseudorandom numbers,Quote:>Evening all! I wonder if anyone can help me out with a problem. What I

>am trying to do is to produce a set of numbers in Excel (97) using the

>random number generator, but based around different probabilies, for

>instance, a number between 0 and 7, but with a distribution chance of,

>say 0 = 10%, 1 = 25%, 2 = 25%, 3 = 15%, 4 = 10%, 5 = 5%, 6 = 5%,

>7 = 5%. (I think that adds up to 100%!). I'm not sure I've explained

>that too well, but if anyone can understand what I'm trying to do, and

>can help, I'd be grateful to hear from you.

create a table that pairs the numbers and their corresponding

cumulative probabilities, e.g., in A1:B8 enter

0% 0

10% 1

35% 2

60% 3

75% 4

85% 5

90% 6

95% 7

then =LOOKUP(RAND(),A1:B8) should generate samples for your

distribution.

Sent via Deja.com http://www.deja.com/

Before you buy.

1. Xbox Chat Reps know jack! DUH

They don't know anything, if I can see some proof then

that's a different story. All I get is a, "Yes I am

sure." NO YOUR NOT, YOU KNOW NOTHING!

4. Proposed enhancement - 'thisclass' keyword for virtual function parameters

5. X10 UR19A and ADCOM GTP450...duh?

6. Don't Buy Madcatz Controllers

7. Access/Excel OfficeLinks...duh

8. Mitsumi Quad Speed Argument

10. DUH!

11. Duh!

12. sicily - DUH! Sorry, wrong Forum!

13. duh?

4 post • Page:**1** of **1**