The distinctive Perl camel is (c) O'Reilly
Perl Workshop Home Page
Home of the Bioinformatics Perl Workshop perl workshop > courses > random numbers and distributions (4.1.2.2)

course 4.1.2.2

Level: intermediate
4.1.2.2 | intermediate | 2 sessions
Computers are fast but they're lousy in simulating randomness - an oxymoron in its own right. We will see that random numbers generated by Perl's rand() are actually pseudo-random (PRN) and form a reproducible, seeded sequence. We'll briefly cover linear congruential generators (LCG), one way to create PRNs and talk about their strengths and weaknesses. A brief mention of sub-random sequences will be made in context of even space filling. We'll see how to make use of CPAN modules to harness a variety of PRN algorithms in Perl, including the reliable Mersenne Twister. We'll also spend time looking at how uniform random values are used to generate values distributed according to an arbitrary distributions.

legend

course code

cat.course.level.sessions.session

e.g. 1.0.1.8

categories

0 | introduction and orientation

1 | perl fundamentals

2 | shell and prompt tools

3 | web development

4 | CPAN Modules

5 | Ruby

levels

level: all all ( 0 )

level: beginner beginner ( 1 )

level: intermediate intermediate ( 2 )

level: advanced advanced ( 3 )

[ have you wondered how many different banners there are? ]
4.1.2.2 Random Numbers and Distributions

course home

Computers are fast but they're lousy in simulating randomness - an oxymoron in its own right. We will see that random numbers generated by Perl's rand() are actually pseudo-random (PRN) and form a reproducible, seeded sequence. We'll briefly cover linear congruential generators (LCG), one way to create PRNs and talk about their strengths and weaknesses. A brief mention of sub-random sequences will be made in context of even space filling. We'll see how to make use of CPAN modules to harness a variety of PRN algorithms in Perl, including the reliable Mersenne Twister. We'll also spend time looking at how uniform random values are used to generate values distributed according to an arbitrary distributions.


4000 points from a Halton's sequence. This sequence is a sub-random process that fills space much more evenly than output from linear congruential generators.

other in this category

4.0.2.1 | Spans and Sets

other by same level

2.2.2.2 | Prompt Tools

1.1.2.8 | Intermediate Perl

2.1.2.4 | Data Mining and Analysis at the Command Line

4.0.2.1 | Spans and Sets

1.2.2.1 | Effective use of map, sort and grep in Perl

other by same instructor

Other courses by Martin Krzywinski.

0.0.0.1 | Orientation Session

0.1.0.1 | Two Problems

2.2.2.2 | Prompt Tools

1.0.1.8 | Introduction to Perl

1.1.2.8 | Intermediate Perl

2.1.2.4 | Data Mining and Analysis at the Command Line

4.0.2.1 | Spans and Sets

1.2.2.1 | Effective use of map, sort and grep in Perl