Chapter 3: Distributions of Random Variables

This set of labs illustrates the use of R functions for probability distributions as an alternative to traditional distribution tables. The labs build on the programming structures introduced in the Chapter 2 labs and demonstrate how to simulate the data-generating process described by particular distributions.
Lab Notes


1. Introduction to Random Variables

Introduces the general notion of a random variable and its distribution using a simulation, then discusses the binomial distribution.

Handout Template Solutions


2. Distributions: Normal and Poisson

Discusses the normal distribution and working with normal probabilities, as well as the Poisson distribution.

Handout Template Solutions


3. Distributions Related to Bernoulli Trials

Covers the geometric, negative binomial, and hypergeometric distributions. The simulations in this lab introduce repeat and while loops.

Handout Template Solutions


4. Distributions for Pairs of Random Variables

Discusses distributions for pairs of random variables, in addition to the correlation of random variables.

Handout Template Solutions