Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.047 X-Spam-Evidence: '*H*': 0.91; '*S*': 0.00; 'operator,': 0.09; 'toss': 0.09; 'cc:addr:python-list': 0.10; 'times,': 0.13; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:random': 0.16; 'wrote:': 0.16; 'cc:2**0': 0.21; 'cc:addr:python.org': 0.21; 'planet': 0.22; 'simpler': 0.22; 'am,': 0.23; '2015': 0.23; 'header:In-Reply-To:1': 0.24; 'mon,': 0.24; 'message-id:@mail.gmail.com': 0.28; '"no': 0.29; 'convince': 0.29; 'once,': 0.29; 'random': 0.29; 'says': 0.32; 'post': 0.32; 'getting': 0.33; "d'aprano": 0.33; 'mass': 0.33; 'steven': 0.33; 'previous': 0.34; 'received:google.com': 0.34; 'sometimes': 0.35; 'but': 0.36; 'being': 0.36; "didn't": 0.37; 'subject:: ': 0.37; 'times.': 0.38; 'mean': 0.38; 'your': 0.60; 'even': 0.61; 'times': 0.61; 'worth': 0.73; 'chrisa': 0.84; 'subject:Testing': 0.84; 'tossing': 0.84; 'to:none': 0.90 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=t0GG+aV80CaZ+YBzhuimP+2ADB4xuOObq9+Q3SpTSmY=; b=gNZJtDiuHJZsHfBN4MMqR66alCiKY4jq5oLLT7TUJ3/fsOoZGtc3cQ3olEO3ngsplk xWn47zpsbQjtwlgKuCmxi2ul0F+C/W2gCQT5IIXMThsfoXzgjl023/XLM9OpQgZT8QB9 mRWYYv6IS6o72bUMmqwYkJcOupG42h24AO93sEM/3n1nPlZSM4Z+FbuikXMY6/doXDZG wnZ4/b+bLjbUITbpvulhKAHa3hRD6C/bXf0ZXlNxTxA9/2IYxLRwfARnZUc9AJB6jMPL I0XbeYF9Vx7qWX/SPen0CVTXKt1yCb6K8yVGwsQiKNKzsuCJxKQf2WnMJqbJQF0f8B17 Rbiw== MIME-Version: 1.0 X-Received: by 10.43.0.67 with SMTP id nl3mr19645054icb.59.1433702430621; Sun, 07 Jun 2015 11:40:30 -0700 (PDT) In-Reply-To: <55748d5f$0$13008$c3e8da3$5496439d@news.astraweb.com> References: <87oaksowwg.fsf@Equus.decebal.nl> <1451048.pW9z17ilMA@PointedEars.de> <3158703.Lr4HFMbMOd@PointedEars.de> <1656356.OjxBvjpJ5d@PointedEars.de> <55748d5f$0$13008$c3e8da3$5496439d@news.astraweb.com> Date: Mon, 8 Jun 2015 04:40:30 +1000 Subject: Re: Testing random From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1433702438 news.xs4all.nl 2872 [2001:888:2000:d::a6]:42081 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:92286 On Mon, Jun 8, 2015 at 4:28 AM, Steven D'Aprano wrote: > If my previous post didn't convince you, consider an even simpler random > distribution: tossing a fair coin. The probability of getting a head is > exactly 1/2 whether you toss the coin once or a thousand times. But if you > toss the coin once, your chances of getting "no heads" is 1/2. If you toss > it a thousand times, your chances of getting "no heads" is 1/2**1000. Although... purity and reality do sometimes disagree. The concept of "independent events" says that if I toss a coin 99 times and it comes up heads every time, the probability that it'll come up heads again the hundredth time is still 50-50. But the reality of cheats coins says that the chances of the coin being a fair one and having been tossed 99 times and come up heads every time is one in 1<<99, and given that the mass of this planet is roughly 6E27 grams, that would mean that you'd need about a thousand earths' worth of coins to get that many... so the chances are much better that you're looking at either an imbalanced coin or a crafty operator, and the probability is much higher that it comes up heads :) ChrisA