• 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:56:32 -0300

At 2:39 PM -0500 10/26/04, John C. Welch wrote:
On 10/26/2004 13:28, "Graff" <email@hidden> wrote:

 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.

However, a perfectly even distribution is not, by definition, perfectly random, or even close.

Actually, this notion of a perfectly even "distribution" is a bit of semantic confusion introduced into what is a very clearly understood and tractable bit of mathematics. It makes no sense at all, at least in reference to the code the original poster was running in AppleScript.


In reference to the generation of events (an event being the occurrence of a number 1 through 6) as is under discussion here, the distribution of the event count, which is what this is

1    161
2    167
3    173
4    170
5    169
6    160

the only distribution it makes any sense to talk about is the probability distribution, that is, the probability that any particular event of the six will happen. It makes no sense whatever to talk about the distribution of event counts.


In this case, you want the probability of each event to be 1/6. But to think that at any time you will get the "same count of events" for each of the possible outcomes is absurd. Because this is a discrete random variable, it could at best only be achieved each time the number of events hit a multiple of 6 (was n*6 where n = 1, 2, ... N), and furthermore, each six events would have to proceed as selections from the six possible outcomes without replacement. As a consequence of this you'd never be able to have the same outcome twice in a row in any round of 6 throws. This kind of behaviour would require some bastardized approach to selection rules, having them vary between random selection from the 6 possibilities, to selection without replacement until all 6 had been "used up", then back to random from the pool again, and so on.

Just because the probabilities are equal for each outcome in a series of events, the event count histogram for those outcomes over repeated events DOES NOT have to show similar values in any finite number of repetitions. To assume so is to be completely misguided. To use the term "even distribution" is to describe some desired equality of the event counts (it's a semantic trap), not a mathematical property of a series of independent random events, which is what you get when you execute the code to generate the above numbers. It's the PROBABILITY DISTRIBUTION that is even, i.e., the outcome of an event is equally likely to be any of the six. That's the only thing that is even, and the count for each of the possible outcomes will manifestly NOT be "equal" even if you generate a hundred million events. And the fact that they are not the same gives you no information about the real probability attached to this process in the machine generating the outcomes. There IS a way to determine whether or not the process could involve identical event probabilities, and that is to test the variance against what could be expected for a particular number of events. This can be done. I'd have to look up the calculation.

Deivy, where the hell are you? You should be all over this like a starving squirrel on a peanut. And you probably have the variance test in your head. Don't make me go look it up.

Okay, I've got to go to dinner.

- 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: deivy petrescu <email@hidden>
References: 
 >Re: Dice (From: "John C. Welch" <email@hidden>)

  • Prev by Date: Re: Add format to a string
  • Next by Date: Re: Dice
  • Previous by thread: Re: Dice
  • Next by thread: Re: Dice
  • Index(es):
    • Date
    • Thread