Contents/ Part IX · Probability & Distributions Case Studies/ Chapter 57

Regional Rainfall: the Gamma

Seasonal rainfall is positive and right-skewed: usually moderate, occasionally a deluge. That is the gamma distribution. From 1,000 seasonal totals we fit it by the method of moments and quantify flood risk from its long tail.

⏱️ ~12 min read
🐍 Notebook included
📊 Chapter 57

The exponential modeled one waiting time. Sum several of them, total rainfall accumulated from several storm pulses, and you get the gamma: strictly positive, right-skewed, and far more flexible than the exponential it generalizes.

Γ
The gamma distribution has a shape α and a scale β, with mean αβ and variance αβ². With α = 1 it is the exponential; larger α adds a hump. It models positive, skewed quantities.
🌧️
The dataset

meteorology_regional_rainfall.csv holds rainfall_inches for 1,000 station-seasons (plus station and season). We fit a gamma and use its tail to estimate flood risk.

1

Fit by the Method of Moments

The gamma's two parameters fall straight out of the mean and variance: shape α = mean²/var = 2.93 and scale β = var/mean = 1.38. This method of moments reproduces the sample mean (4.04) and variance (5.57) by construction.

Matching two moments is a start, not a verdict. The companion notebook validates the fit with a gamma QQ plot (points on the diagonal) and a formal Kolmogorov-Smirnov test (D ≈ 0.02, p ≈ 0.87, so we cannot reject the Gamma), so the distribution is a defensible model for the rainfall totals rather than just a curve that happens to look right.

Rainfall: Gamma(shape 2.93, scale 1.38), humped and right-skewed mode mean ≈ 4 long flood tail → seasonal rainfall (inches) →

With shape ≈ 2.9 the gamma is humped, not a pure exponential decay, and its skewness of 1.2 confirms the long right tail. That asymmetry is exactly why a symmetric normal would mislead here: it would put real probability on impossible negative rainfall and badly understate the wet extremes.

2

Flood Risk in the Tail

Flood planning is a tail question. P(rainfall > threshold) gives the chance of an extreme season, and its reciprocal is the return period, the average wait between such events.

ThresholdP(exceed)return periodobserved
> 8 in0.0661-in-15 seasons0.069
> 10 in0.0231-in-44 seasons0.021
> 12 in0.0071-in-139 seasons0.006
> 15 in0.0011-in-832 seasons0.001

A season above 8 inches is roughly a 1-in-15 event, above 12 inches about 1-in-139, the return periods engineers design drainage and levees against. The 99th-percentile season tops 11 inches; sizing infrastructure to the mean of 4 inches would ignore exactly the floods that matter. The tail is the whole point.

3

The Gamma Generalizes the Exponential

The gamma's structure connects it to the previous chapter. A gamma with integer shape α is the sum of α independent exponential waits. With α = 1 it is the exponential; larger α stacks more waits and grows the hump.

Rainfall as stacked pulses

In the notebook, the sum of three exponential waits matches a Gamma(shape 3), and our fitted shape (≈ 2.9) is close, as if each wet season were a few independent rainfall pulses added together. This is the family link: the exponential is a gamma with shape 1, and the gamma is the natural model for any positive quantity built from several exponential-like contributions, rainfall, insurance claim totals, queue waiting times, and more.

🐍

Run the rainfall analysis

The companion notebook fits the gamma by the method of moments, overlays its density on the rainfall histogram, computes exceedance probabilities and return periods from the tail, and rebuilds the gamma as a sum of exponential waits, every number from code.

📓 View Notebook (code & outputs) ▶ Open in Colab ⬇ View / Download on GitHub

View opens the rendered notebook instantly (no setup). Open in Colab runs & edits it live in your browser. To run locally, install numpy, pandas, scipy, and matplotlib and launch jupyter notebook.

🎓 Key Takeaways

  • Rainfall totals are gamma: positive, right-skewed, with shape α and scale β.
  • Method of moments: α = mean²/var = 2.93, β = var/mean = 1.38, reproducing the data's mean and variance.
  • Flood risk is the tail: a >8-inch season is 1-in-15, >12 inches is 1-in-139; the 99th percentile tops 11 inches.
  • A normal would mislead, putting probability on negative rainfall and understating extremes.
  • Gamma generalizes the exponential: shape 1 is exponential; larger shape is a sum of exponential waits.
4

Quiz: Test Yourself

Eight quick questions on the gamma case study. Answer them, hit Check Answers, and keep refining until you score 100%. Your progress is saved, so you can hop back to the chapter and return anytime.