perl workshop > courses > random numbers and distributions (4.1.2.2)

# course 4.1.2.2

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

all ( 0 )

beginner ( 1 )

intermediate ( 2 )

[ Perl makes a perfect low-calorie meal or snack ]
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

1.1.2.8 | Intermediate Perl

2.2.2.2 | Prompt Tools

4.0.2.1 | Spans and Sets

# other by same instructor

Other courses by Martin Krzywinski.

0.0.0.1 | Orientation Session

0.1.0.1 | Two Problems

1.0.1.8 | Introduction to Perl

1.1.2.8 | Intermediate Perl

2.2.2.2 | Prompt Tools

4.0.2.1 | Spans and Sets