RatMath ShelfCourse guide

University: first two years

Probability

Use the left and right arrow keys to turn pages.

Course summary

Where RatMath helps

92.5%

37 of 40 focal problems use RatMath for a calculation or a substantive step.

Direct calculation
34 · 85%
Assisted
3 · 7.5%
Worked by hand
3 · 7.5%

Using the packages

Finite distributions make exact event arithmetic accessible. Densities, independence and conditioning require a model, and a mass interval containing one cannot certify normalization by itself.

Calculator interface

Give events names on a sample-space diagram and distinguish conditioning from intersection. For a density show the support, analytic normalization and the enclosure as separate fields.

Packages used in the lessons

@ratmath/stats (21 days) · @ratmath/core (18 days) · @ratmath/symbolic (3 days) · @ratmath/discrete (2 days)

How to read the percentages

Each of the 40 focal problems has equal weight. Direct means the displayed package calculation answers the computational question after the inputs are set up. Assisted means it contributes a step and the worked solution supplies essential reasoning, interpretation or selection. Worked by hand means the guide relies on a construction, argument or judgment for that task. The helpful share combines direct and assisted days. Courses and instructors assign different mixes of problems. The percentages describe this syllabus.

Classroom inputs and practical limits

37 of 40 days include a checked executable example. On 8 days the measured size sweep exercises a named API used in the lesson. Each day identifies its tested inputs and the mathematical property checked. Hand-worked days give the input scale and the argument to verify.

Ranges across the five units

Days 1–8 · Events and conditioning. Finite probability tables often have 2–20 atoms, two to four conditional events and rational probabilities.

Unit benchmark · stats.die.sumOf, six-sided dice. Largest passing sample 100 (1,985 ms, 215.1 MiB peak process RSS). Time cutoff at 250, 500. The first sampled passing call above one second used 100 (1,985 ms).

Days 9–16 · Discrete distributions. Binomial or hypergeometric samples often span 1–100 trials. Dice sums and full outcome tuples have different support growth.

Unit benchmark · stats.binomial.pmf, trials. Largest passing sample 10,000 (0.836 ms, 74.4 MiB peak process RSS). The runs did not locate a ceiling for this family.

Days 17–24 · Continuous laws. Scalar continuous laws on intervals or the line, usually one or two parameters; distinguish exact mass from a numerical enclosure.

Unit benchmark · stats.fromDensity, monomial degree. Largest passing sample 32 (12.81 ms, 77.8 MiB peak process RSS). The runs did not locate a ceiling for this family.

Days 25–32 · Expectation and dependence. Finite distributions with a few to tens of atoms or one-dimensional integrals for first and second moments.

Unit benchmark · stats.mean, observations. Largest passing sample 100,000 (129 ms, 142.2 MiB peak process RSS). The first sampled passing call above 100 ms used 100,000 (129 ms). The runs did not locate a ceiling for this family.

Days 33–40 · Limits and processes. Markov chains usually have 2–10 states; limit theorems concern a sequence of distributions and need their stated hypotheses.

Unit benchmark · stats.markovChain.stationary, states. Largest passing sample 100 (655 ms, 144.2 MiB peak process RSS). The first sampled passing call above 100 ms used 50 (112 ms). The runs did not locate a ceiling for this family.

Accuracy notes (2)

Qualified · A density can carry unproven total mass. On [0,1], (1+10⁻⁵⁰)cos(x)/sin(1) has mass 1+10⁻⁵⁰. The default result reports massProven=false and supplies its enclosure. Pass {requireExactMass:true} when a proof of unit mass is required. The strict option refuses this example.

Open · Two distinct categorical tuples can merge. A uniform table on the two arrays [‘a,sb’,‘c’] and [‘a’,‘b,sc’] should give each probability 1/2. The table reports one outcome with probability 1 because the composite string keys collide. Use unambiguous scalar IDs for such labels. Ordinary numeric dice faces have distinct keys.

Measurement method, runtime limits and complete workload results

Lecture and problem-set sequence

Days 1–8 Events and conditioning

Apply addition and product rules, Bayes and independence.

7 direct calculation · 0 assisted · 1 worked by hand

  1. Day 1 Addition rule
  2. Day 2 Sum of two dice
  3. Day 3 Conditioning
  4. Day 4 Bayes with urns
  5. Day 5 Conditional probability
  6. Day 6 Bayes' rule
  7. Day 7 Conditional denominators
  8. Day 8 Disjoint or independent
Days 9–16 Discrete distributions

Count finite outcomes, sample without replacement and model waiting times.

8 direct calculation · 0 assisted · 0 worked by hand

  1. Day 9 Birthday problem
  2. Day 10 Hypergeometric
  3. Day 11 Poisson
  4. Day 12 Geometric
  5. Day 13 Coupon collector
  6. Day 14 Matching problem
  7. Day 15 Counting hands
  8. Day 16 Indicators
Days 17–24 Continuous laws

Normalize, integrate densities, change variables and analyze order statistics.

6 direct calculation · 2 assisted · 0 worked by hand

  1. Day 17 A continuous density
  2. Day 18 Exponential and memorylessness
  3. Day 19 Normal tail
  4. Day 20 A transformed variable
  5. Day 21 Order statistics
  6. Day 22 Improper integral, infinite interval
  7. Day 23 CDF to density
  8. Day 24 Normalization as an equation
Days 25–32 Expectation and dependence

Obtain moments, covariances and linear combinations.

7 direct calculation · 0 assisted · 1 worked by hand

  1. Day 25 Covariance
  2. Day 26 Moment generating function
  3. Day 27 Expected value
  4. Day 28 Unbiased variance
  5. Day 29 Law of total variance
  6. Day 30 Total expectation
  7. Day 31 Dependence with zero covariance
  8. Day 32 Variance of a sum
Days 33–40 Limits and processes

Distinguish exact laws from asymptotic ones and analyze Markov chains.

6 direct calculation · 1 assisted · 1 worked by hand

  1. Day 33 Central limit theorem
  2. Day 34 Stationary distribution
  3. Day 35 Gambler's ruin
  4. Day 36 Sampling distribution of the mean
  5. Day 37 Maximum likelihood: exponential
  6. Day 38 Weak law of large numbers
  7. Day 39 Absorbing states
  8. Day 40 Markov's inequality

Start day 1 →