# Chapter 14 notebook: Stochastic Processes: Rates, Waiting, and Dependence

**Goal:** Recognize when a steady-state queue estimate exists and why delay rises near capacity.

**Start with:** Rules 14.3.1, 14.3.2, 14.3.3. Use a calculator or the optional Python lab. Programming is optional for the workbook; the Jupyter version requires a Python 3 kernel. All lab numbers are constructed practice inputs, not observed data.

**Source:** [Finished Chapter 14](../skills/math-thumb-stochastic-processes/references/chapter.md) from *Mathematical Rules of Thumb*. Numbered rules, classifications, and the decision path come from the book. The lab, exercises, answer key, and worksheet prompts are companion additions.

## 1. Frame your decision

Write a question in which an answer would change something you do. Gather: Rate and time units; arrival/service model; stationarity; dependence; system boundary; whether count, wait, inventory, or mixing is sought.

- My question and intended decision:
- Known inputs and units:
- Required accuracy or threshold:
- What I expect before calculating:
- What I still need to find out:

Use the lab as a worked starting point if you do not yet have your own problem. For notation or prerequisites, ask the chapter skill to explain only the concept blocking the next step.

## 2. Choose a route

- **Do you have a stable event rate and an exposure?** Use $\lambda t$ for a Poisson count scale. Use the zero-count complement for event risk and $1/\lambda$ for an exponential mean wait.
- **Are event streams being combined or split?** Add rates only for independent Poisson streams. Multiply by label probabilities only for eventwise-independent thinning.
- **Is the total count fixed?** Simulate homogeneous event locations as sorted uniforms; otherwise retain the exponential-gap view.
- **Is randomness accumulating through independent centered increments?** Expect root-time or root-step spread. Add drift separately and inspect dependence.
- **Is a time series persistent?** Translate $\phi$ into half-life and stationary variance only after checking $|\phi|<1$ and the adequacy of an AR(1) model.
- **Is a smoother or renewal process being summarized?** Convert EWMA weight to a variance-equivalent window, or wait moments to a long-horizon count approximation, while keeping their regimes explicit.
- **Is a Markov chain being run?** Estimate its slowest dependence scale, then use multiple-chain evidence and estimand-specific ESS rather than nominal iterations.
- **Is a queue or flow system involved?** Apply Little's law with consistent boundaries. For M/M/1 calculations, establish $\rho<1$ before evaluating delay and preserve capacity headroom.
- **Is $0.234$ proposed as a tuning target?** Confirm high-dimensional random-walk Metropolis assumptions; otherwise use diagnostics appropriate to the actual sampler.

**Chapter-specific stop check:** Little's law uses compatible system boundaries and long-run averages; M/M/1 delay adds specific queue assumptions. Nominal simulation draws are not automatically independent draws.

## 3. Work the lab

An M/M/1 station has arrival rate 8 per hour and service rate 10 per hour. Utilization is 0.8. Mean total time in the system is W=1/(10-8)=0.5 hours; Little's law gives L=8 × 0.5=4 jobs. At 9 arrivals per hour W doubles to 1 hour. At arrival rate equal to service rate the stationary formula is invalid, rather than a usable finite prediction.

Predict the sign and scale before running the code. Then change one input and explain why the result moves. The code checks the constructed example; it does not prove the rule for every possible input. Code assertions may describe the example's chosen regime, so inspect them before changing that regime.

```python
service_rate = 10.0
for arrival_rate in (8.0, 9.0, 9.5):
    assert 0 <= arrival_rate < service_rate
    utilization = arrival_rate/service_rate
    time_hours = 1/(service_rate-arrival_rate)
    inventory = arrival_rate*time_hours
    print(f"Arrivals/h={arrival_rate:.1f}; utilization={utilization:.2f}; total time={time_hours:.2f} h; inventory={inventory:.2f}")
```

**My prediction, observed result, and explanation:**

_Record your work here._

## 4. Practise without the answers

### Exercise 1

A homogeneous Poisson process averages two arrivals per hour. Find the chance of at least one in 15 minutes.

**My approach, assumptions, calculation, and check:**

_Write your attempt here._

### Exercise 2

A positive stationary AR(1) coefficient is 0.8. Estimate shock half-life in observation periods.

**My approach, assumptions, calculation, and check:**

_Write your attempt here._

### Exercise 3

Can you insert arrivals 12/h and service 10/h into W=1/(mu-lambda) and interpret the negative result?

**My approach, assumptions, calculation, and check:**

_Write your attempt here._

**Coaching prompt:** “Use the Chapter 14 skill to help me with Exercise 2. Ask for my attempt, give one useful hint if I need it, and help me check the assumptions before showing the answer.”

## 5. Answer key and reasoning

Read this after attempting the exercises, or use it immediately if you prefer a complete walkthrough. An answer is complete only when its assumptions and stopping point are clear.

### Answer 1

Exposure is 0.25 hours; lambda × t=0.5. Probability is 1-exp(-0.5)≈0.393469.

### Answer 2

log(0.5)/log(0.8)≈3.1063 periods. This describes the geometric decay of the model's expected shock response.

### Answer 3

No. Utilization exceeds one and this M/M/1 system has no stationary finite mean delay. Change capacity, demand, or the model before using a steady-state formula.

## 6. Build the complete chapter toolkit

The new lab samples the chapter; the following checklist covers all 20 rules. Study one thematic group at a time. A large group can take several sessions.

- **Poisson Arrivals and Exponential Waiting:** work with rules 14.1.1, 14.1.2, 14.1.3, 14.1.4, 14.1.5, 14.1.6, 14.1.7.
- **Scaling and Memory Across Time:** work with rules 14.2.1, 14.2.2, 14.2.3, 14.2.4, 14.2.5, 14.2.6, 14.2.7.
- **Flow Systems and Simulation Guardrails:** work with rules 14.3.1, 14.3.2, 14.3.3, 14.3.4, 14.3.5, 14.3.6.

For each selected rule, read its equation, explanation, and worked use in the source. Reproduce that example; change one input; then change one assumption so the rule is no longer justified. Record the result and what check catches the failure. Historical examples remain labeled and qualified as in the source.

Read each complete numbered profile in the [chapter reference](../skills/math-thumb-stochastic-processes/references/chapter.md) before applying it. The cues below abbreviate the graph metadata; they are not complete conditions. Change the status only after doing the practice described below.

| Rule | Book role | First assumptions to inspect | Practice status |
|---|---|---|---|
| 14.1.1: Poisson Count Equals Rate Times Exposure | Independent | homogeneous poisson process;  known rate and exposure | new |
| 14.1.2: At Least One Poisson Arrival | Independent | homogeneous poisson process;  known rate and exposure | new |
| 14.1.3: Mean Exponential Wait Is the Inverse Rate | Independent | homogeneous poisson arrivals;  positive constant rate | new |
| 14.1.4: Memorylessness Means No Aging | Independent | nonnegative waiting time;  exact memoryless property | new |
| 14.1.5: Superposed Poisson Rates Add | Independent | independent poisson streams;  compatible time units | new |
| 14.1.6: Poisson Thinning Multiplies the Rate | Independent | poisson input stream;  independent constant retention | new |
| 14.1.7: Poisson Arrival Times Are Uniform Given the Count | Independent | homogeneous poisson process;  fixed interval | new |
| 14.2.1: Random-Walk Displacement Grows as Root N | Independent | independent zero mean steps;  finite step variance | new |
| 14.2.2: Diffusion Distance from \(2Dt\) | Independent | one dimensional brownian diffusion;  constant diffusivity | new |
| 14.2.3: AR(1) Shock Half-Life | Independent | positive ar1 coefficient below one;  stable coefficient | new |
| 14.2.4: AR(1) Long-Run Variance Amplification | Independent | stationary ar1 process;  independent finite variance innovations | new |
| 14.2.5: EWMA Effective Window Length | Independent | constant smoothing factor;  long series | new |
| 14.2.6: Renewal Count Mean and Variance at Long Times | Independent | iid positive interarrivals;  finite mean and variance | new |
| 14.2.7: Markov Mixing Scale from the Second Eigenvalue | Independent | finite reversible ergodic chain;  known nonstationary eigenvalue | new |
| 14.3.1: Little's Law: Inventory Equals Throughput Times Time | Independent | stable flow system;  consistent customer boundary | new |
| 14.3.2: M/M/1 Stability Requires Utilization Below One | Workflow | m m 1 queue;  steady state objective | new |
| 14.3.3: M/M/1 Delay Blows Up Near Capacity | Independent | poisson arrivals;  exponential service | new |
| 14.3.4: MCMC Effective Sample Size from Autocorrelation | Workflow | stationary ergodic chain;  reliable autocorrelation estimate | new |
| 14.3.5: Burn In for Several Dependence Time Scales | Workflow | ergodic markov chain;  estimated relaxation time | new |
| 14.3.6: The 0.234 Random-Walk Metropolis Benchmark | Workflow | high dimension;  smooth product like target | new |

For a completed row, record: **rule number / my new input / mathematical claim type / verified assumptions / calculation / check / valid use / rejected use / next step**. “Practised” means you worked an example. “Demonstrated” means you can explain a valid use, transfer it, and reject a misuse without the answer key.

## 7. Apply it to your own problem

Return to your opening question. Choose the smallest rule set that can settle it. Use the book's independent/workflow/specialized classification separately from the claim type (exact, approximate, bound, diagnostic, or heuristic).

- Selected rule number(s) and reason:
- Assumptions that hold, fail, or remain uncertain:
- Substitution with units:
- Result and error, uncertainty, or bound:
- Independent check or limiting case:
- Decision this supports:
- Stop here, do a named next calculation, or gather missing information:

## 8. Transfer and continue

Useful nearby chapters: Chapter 12: probability; Chapter 13: statistics; Chapter 19: optimization. Bring the question, units, assumptions, result type, and uncertainty to the next chapter. Choose a bridge only when it supplies an operation you actually need.

**Completion check:** Explain this chapter's lab in your own words; solve one changed-input exercise; reject one invalid use; and produce a decision record for your own problem. If one check fails, revisit that part of the chapter rather than marking every rule complete.
