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) > lecture notes

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

lecture notes

1 | Generating Randomness | 4.1.2.2.1

Linear congruential generators and their properties, sub-random processes, testing randomness, Monte Carlo simulation, CPAN modules, idioms for shuffling.

4.1.2.2.1.c1 | brownnoise.wav | Martin Krzywinski | code
4.1.2.2.1.c2 | devrandom | Martin Krzywinski | code
4.1.2.2.1.c3 | drophaltonrice | Martin Krzywinski | code
4.1.2.2.1.c4 | droprice | Martin Krzywinski | code
4.1.2.2.1.c5 | halton | Martin Krzywinski | code
4.1.2.2.1.c6 | halton.11.13.txt | Martin Krzywinski | code
4.1.2.2.1.c7 | halton.3.5.1000.txt | Martin Krzywinski | code
4.1.2.2.1.c8 | halton.3.5.10000.txt | Martin Krzywinski | code
4.1.2.2.1.c9 | halton.3.5.200.txt | Martin Krzywinski | code
4.1.2.2.1.c10 | halton.3.5.2000.txt | Martin Krzywinski | code
4.1.2.2.1.c11 | halton.3.5.400.txt | Martin Krzywinski | code
4.1.2.2.1.c12 | halton.3.5.4000.txt | Martin Krzywinski | code
4.1.2.2.1.c13 | halton.3.5.600.txt | Martin Krzywinski | code
4.1.2.2.1.c14 | halton.3.5.800.txt | Martin Krzywinski | code
4.1.2.2.1.c15 | halton.3.5.txt | Martin Krzywinski | code
4.1.2.2.1.c16 | halton.5.7.txt | Martin Krzywinski | code
4.1.2.2.1.c17 | halton.7.17.txt | Martin Krzywinski | code
4.1.2.2.1.c18 | halton.new.txt | Martin Krzywinski | code
4.1.2.2.1.c19 | haltonrice.diff.txt | Martin Krzywinski | code
4.1.2.2.1.c20 | haltonrice.txt | Martin Krzywinski | code
4.1.2.2.1.c21 | pinknoise.wav | Martin Krzywinski | code
4.1.2.2.1.c22 | prng | Martin Krzywinski | code
4.1.2.2.1.c23 | prng.1.txt | Martin Krzywinski | code
4.1.2.2.1.c24 | prng.2.txt | Martin Krzywinski | code
4.1.2.2.1.c25 | prng.3.txt | Martin Krzywinski | code
4.1.2.2.1.c26 | randbase | Martin Krzywinski | code
4.1.2.2.1.c27 | randrice.diff.txt | Martin Krzywinski | code
4.1.2.2.1.c28 | randrice.txt | Martin Krzywinski | code
4.1.2.2.1.c29 | randstring | Martin Krzywinski | code
4.1.2.2.1.c30 | randtests | Martin Krzywinski | code
4.1.2.2.1.c31 | rice.diff.txt | Martin Krzywinski | code
4.1.2.2.1.c32 | rice.results.txt | Martin Krzywinski | code
4.1.2.2.1.c33 | rice.txt | Martin Krzywinski | code
4.1.2.2.1.c34 | rice.value.txt | Martin Krzywinski | code
4.1.2.2.1.c35 | shake | Martin Krzywinski | code
4.1.2.2.1.c36 | trulyrandom | Martin Krzywinski | code
4.1.2.2.1.c37 | whitenoise.wav | Martin Krzywinski | code
4.1.2.2.1.a1 | Generating Randomness | Martin Krzywinski | pdf
4.1.2.2.1.p1 | Generating Randomness | Martin Krzywinski | ppt
4.1.2.2.1.s1 | Generating Randomness | Martin Krzywinski | slides

2 | Probability Distributions | 4.1.2.2.2

Features and properties of bernoulli, binomial, poisson, geometric, normal, and exponental distributions. Perl modules to generate probability density and cumulative values.

4.1.2.2.2.c1 | cdf | Martin Krzywinski | code
4.1.2.2.2.c2 | cdf.txt | Martin Krzywinski | code
4.1.2.2.2.c3 | coin.txt | Martin Krzywinski | code
4.1.2.2.2.c4 | geometric | Martin Krzywinski | code
4.1.2.2.2.a1 | Probability Distributions | Martin Krzywinski | pdf
4.1.2.2.2.p1 | Probability Distributions | Martin Krzywinski | ppt
4.1.2.2.2.s1 | Probability Distributions | Martin Krzywinski | slides

other in this category

4.0.2.1 | Spans and Sets

other by same level

1.1.2.8 | Intermediate Perl

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

2.1.2.4 | Data Mining and Analysis at the Command Line

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

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

2.1.2.4 | Data Mining and Analysis at the Command Line

2.2.2.2 | Prompt Tools

4.0.2.1 | Spans and Sets