Re: Dice
Re: Dice
- Subject: Re: Dice
- From: Graff <email@hidden>
- Date: Tue, 26 Oct 2004 12:46:12 -0400
On Oct 26, 2004, at 10:48 AM, Robert Poland wrote:
set names to {"one", "two", "three", "four", "five", "six"}
set roll to random number from 1 to 6
item roll in names
I tried this and got; -- by running over and over.
"four"
"two"
"two"
"six"
"four"
"two"
"two"
"two"
"four"
Doesn't seem very random at first glance.
I just ran it 1000 times and got the following distribution:
1 161
2 167
3 173
4 170
5 169
6 160
std deviation = 5.16
So no, it doesn't seem to be perfect but it's probably good enough for
most applications. Remember that in the short run you will often see
what looks to be patterns in random data but it will actually just be
happenstance.
Then again, there could be some sort of complicated, but evenly
distributed pattern going on. At some point you have to just say that
it's good enough for your application and use it.
- Ken
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >Re:Dice (From: Kevin <email@hidden>) |
| >Re: Dice (From: Adrian Milliner <email@hidden>) |
| >Re: Dice (From: Robert Poland <email@hidden>) |