• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Dice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dice


  • Subject: Re: Dice
  • From: Bill Briggs <email@hidden>
  • Date: Tue, 26 Oct 2004 17:27:42 -0300

At 2:28 PM -0400 10/26/04, Graff wrote:
On Oct 26, 2004, at 1:48 PM, Emmanuel wrote:

At 12:46 PM -0400 10/26/04, Graff wrote:
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.

Out of curiosity, what would the std deviation be if the random was perfect?

A perfectly even distribution would be for every value to show up the same number of times. In that case the std deviation would be 0.

That's not so in a finite set of throws. Each value would only show the same number of times assuming an infinite number of throws of the dice. And the std deviation would only shrink to zero in the limiting case. In a finite set of throws you EXPECT to see a finite variance (and hence, std deviation).


With the numbers cited above the spread is within reason. There's a formula that allows you to calculate the range of variance you could expect with a given number of throws of a dice with an "evenly distributed" probability of occurrence of each value and independent events (independent meaning that the (n+1)th throw is not affected by the nth or any previous toss), and these numbers look to me to be well within that range. I don't have the formula in my head, and don't have time to look it up, but you can take it to the bank that the variance (or std dev) for the set above doesn't indicate that the probability distribution is not uniform with respect to the outcomes 1 through 6. Deivy can corroborate - he's the math professor.

I seem to recall that this subject was addressed more than a year ago on this list. Let me check. Indeed. Here it is. In this thread...
Date: Tue, 17 Apr 2001 09:54:17 EDT
Subject: Random number generator without duplicates?


...I had to disabuse some people of wrong notions about this subject. Chris Espinosa had provided the right answer to the question, but some folk had insisted on "correcting" him. For further clarification you may want to take a peek at my rather unrestrained rant under that subject line which was posted Date: Wed, 18 Apr 2001 09:41:10 -0300

- web
_______________________________________________
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


  • Follow-Ups:
    • Re: Dice
      • From: "Adam K. Wuellner" <email@hidden>
References: 
 >Re:Dice (From: Kevin <email@hidden>)
 >Re: Dice (From: Adrian Milliner <email@hidden>)
 >Re: Dice (From: Robert Poland <email@hidden>)
 >Re: Dice (From: Graff <email@hidden>)
 >Re: Dice (From: Emmanuel <email@hidden>)
 >Re: Dice (From: Graff <email@hidden>)

  • Prev by Date: Re: scripting the Address Book
  • Next by Date: Re: Dice
  • Previous by thread: <OFF> Random? was Re: Dice
  • Next by thread: Re: Dice
  • Index(es):
    • Date
    • Thread