[Elliot Temple]
> I think I got it. I noticed my code is essentially the same as Tim
> Peter's (plus the part of the problem he skipped). I read his code 20
> minutes before recreating mine from Alex's hints. Thanks!
>
> def main():
> ways = ways_to_roll()
> total_ways = float(101**10)
>
I had a possibly similar problem calculating probs related to premium
bond permutation. With 10^12 memory ran out v quickly. In the end I got
round it by writing a recursive function and quantising the probability
density function.
Elliot Temple wrote:
> Problem: Randomly generate 10 integers from
I think I got it. I noticed my code is essentially the same as Tim
Peter's (plus the part of the problem he skipped). I read his code 20
minutes before recreating mine from Alex's hints. Thanks!
def main():
ways = ways_to_roll()
total_ways = float(101**10)
running_total = 0
[Alex Martelli]
>> ...
>> You can compute the requested answer exactly with no random number
>> generation whatsoever: compute the probability of each result from
>> 0 to 1000, then sum the probabilities of entries that are exactly 390
>> apart.
[Elliot Temple]
> That was the plan, but how do I ge
Elliot Temple <[EMAIL PROTECTED]> wrote:
> On Apr 24, 2006, at 8:24 PM, Alex Martelli wrote:
>
> > Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote:
> >
> >> In article <[EMAIL PROTECTED]>,
> >> Elliot Temple <[EMAIL PROTECTED]> wrote:
> >>
> >>> Problem: Randomly generate 10 integers from 0-100 in
On Apr 24, 2006, at 8:24 PM, Alex Martelli wrote:
> Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote:
>
>> In article <[EMAIL PROTECTED]>,
>> Elliot Temple <[EMAIL PROTECTED]> wrote:
>>
>>> Problem: Randomly generate 10 integers from 0-100 inclusive, and sum
>>> them. Do that twice. What is the pro
Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> Elliot Temple <[EMAIL PROTECTED]> wrote:
>
> >Problem: Randomly generate 10 integers from 0-100 inclusive, and sum
> >them. Do that twice. What is the probability the two sums are 390 apart?
>
> I think the sum w
In article <[EMAIL PROTECTED]>,
Elliot Temple <[EMAIL PROTECTED]> wrote:
>Problem: Randomly generate 10 integers from 0-100 inclusive, and sum
>them. Do that twice. What is the probability the two sums are 390 apart?
I think the sum would come close to a normal distribution.
--
http://mail.py