HERE Technologies and Wherobots announce partnership Learn More

What is Stochastic Modeling? Definition, Types, Examples

Authors

Stochastic modeling is a method for forecasting outcomes that depend on chance. A stochastic model represents uncertain inputs as random variables with probability distributions, then simulates thousands of possible futures to give the range of results and the probability of each. Banks, actuaries, and epidemiologists use it, and insurers use it to estimate the losses a hurricane season could cause to every building in a portfolio. This article claims that a few thousand simulated years give a stable mean, and a 1-in-250 year loss needs far more than 1,000. A Monte Carlo simulation over every building in one county tests it below.

Key takeaways

  • A stochastic model includes randomness, so it returns a distribution of outcomes. A deterministic model returns one value.
  • Monte Carlo simulation is the standard way to run a stochastic model: sample the inputs, compute the result, repeat thousands of times.
  • Markov chains, Poisson processes, and Brownian motion are the most common stochastic processes in finance, insurance, and science.
  • Catastrophe models are stochastic models of physical risk. They run a stochastic event set, a catalog of simulated hurricanes, floods, earthquakes, or wildfires, against buildings.
  • Spatial stochastic simulation adds location. Kriging and conditional simulation map values such as ore grade, and point processes place events such as wildfire ignitions.

What is a stochastic model?

A random variable takes different values with defined probabilities, described by a probability distribution such as the normal, lognormal, or Poisson. The National Institute of Standards and Technology (NIST) and SEMATECH, a semiconductor industry consortium, publish the e-Handbook of Statistical Methods. It catalogs the common distributions and their uses.

Because the inputs vary, each run of a stochastic model produces a different result. One run is a single possible future, called a realization or sample path. Thousands of runs together form an output distribution, and that distribution is the answer.

Stochastic vs deterministic models

A deterministic model returns the same output every time for the same inputs. A retirement projection that assumes a fixed 5% annual return is deterministic: $100,000 grows to about $163,000 in ten years, every time.

A stochastic version draws each year's return from a distribution with a 5% mean and a set volatility, the spread of yearly returns around that mean. One run ends at $120,000, another at $210,000. After 10,000 runs, the model reports the median outcome and the probability that the balance falls below a target.

Deterministic modelStochastic model
InputsFixed valuesRandom variables with probability distributions
OutputOne valueA distribution of values
Repeated runsIdentical resultsDifferent results each run, unless the random seed is fixed
UncertaintyHandled by separate scenariosBuilt into the model
Typical summaryPoint estimateMean, percentiles, exceedance probability
ExampleFixed-rate interest projectionMonte Carlo retirement projection

Weather forecasting uses both approaches. The National Oceanic and Atmospheric Administration (NOAA) runs its High-Resolution Rapid Refresh (HRRR) weather model deterministically, one forecast per cycle. NOAA's Global Ensemble Forecast System (GEFS) runs 31 forecasts per cycle: one control and 30 perturbed with small random changes. It is documented in the GEFS version 12 paper by Zhou and colleagues (2022). The spread of those forecasts measures uncertainty.

How stochastic modeling works

  1. Define the variables and their distributions. Each uncertain input gets a distribution fitted to data or expert judgment. For example, annual hurricane counts follow a Poisson distribution, wind speeds a Weibull, and investment returns a normal or lognormal. Correlations between inputs are set here too.
  2. Sample the inputs. A pseudo-random number generator, an algorithm that produces numbers that look random, draws one value for every input. The set of draws is one scenario.
  3. Simulate many runs. The model computes the outcome for each scenario and repeats the process thousands or millions of times.
  4. Analyze the output distribution. The collected outcomes give the mean, the spread, percentiles such as the 95th or 99th, and the exceedance probability: the chance that the outcome exceeds a given value.

Monte Carlo simulation

Repeated random sampling is Monte Carlo simulation. Nicholas Metropolis and Stanislaw Ulam named and described the approach in The Monte Carlo Method (1949), from their work on neutron diffusion at Los Alamos. Metropolis, the Rosenbluths, and the Tellers followed with the Metropolis algorithm (1953), the root of Markov chain Monte Carlo. Hammersley and Handscomb collected the techniques in an early textbook, Monte Carlo Methods (1964).

The stochastic model is the set of distributions and rules. Monte Carlo simulation applies those rules to random draws and records each outcome. The error of a Monte Carlo average falls with the square root of the number of runs, so four times as many runs halve it. Estimates of the mean settle quickly. Estimates of rare outcomes, such as a 1-in-250 year loss, need far more runs, because only a few simulated years land in that tail.

A seed is the starting number of a pseudo-random generator. The same seed gives the same sequence, which makes a run reproducible. Apache Spark processes a table in slices called partitions. Its rand(seed) seeds an XORShiftRandom generator with the seed plus the partition index, from the xorshift family of random number generators George Marsaglia described in Xorshift RNGs (2003).

Stochastic processes such as Markov chains, Poisson processes, and Brownian motion

A stochastic process is a sequence of random variables indexed by time or space, such as daily rainfall at a gauge or the price of a stock. Analysts group them by whether time and the state (the value the process takes) are discrete or continuous:

TimeStateClassic processTypical use
DiscreteDiscreteMarkov chainCredit ratings, wet or dry days, customer churn
DiscreteContinuousAutoregressive time seriesMonthly returns, temperature anomalies
ContinuousDiscretePoisson processClaims, earthquakes, storm arrivals, queue arrivals
ContinuousContinuousBrownian motionStock prices, particle diffusion, interest rates

Markov chains move between states with probabilities that depend only on the current state. Richardson's stochastic weather generator (1981) models wet and dry days as a Markov chain. It then draws temperature and solar radiation based on whether the day is wet or dry.

Poisson processes count events that arrive independently at a constant average rate. The number of events in a year then follows a Poisson distribution. Catastrophe models and the Wherobots example below use it for annual event counts.

Brownian motion is continuous random movement with independent, normally distributed increments. Albert Einstein's 1905 paper on suspended particles gave it a physical model.

Stochastic modeling examples

  • Option pricing. Fischer Black and Myron Scholes published The Pricing of Options and Corporate Liabilities (1973), and Robert Merton extended it in Theory of Rational Option Pricing the same year. The Black-Scholes model treats the stock price as geometric Brownian motion, a continuous random walk with lognormal returns. It prices the option with a closed-form formula. Path-dependent options, whose payoff depends on the price path, have no such formula, so traders price them by Monte Carlo simulation of the same process.
  • Insurance and actuarial work. Actuaries project liabilities (what an insurer will owe) and capital under thousands of simulated interest rate and claims paths, using stochastic reserving and economic scenario generators. In property insurance, advanced stochastic risk modeling means catastrophe models.
  • Epidemiology and chemistry. Daniel Gillespie's stochastic simulation algorithm (1977) treats each chemical reaction as a random event in continuous time. Epidemic models apply the same algorithm to each infection and recovery. Small outbreaks can die out by chance, which a deterministic model of the same disease cannot produce.
  • Weather and climate. Ensemble forecasts run many simulations of the same weather, each with small random changes. Stochastic weather generators such as the U.S. Department of Agriculture's CLIGEN produce long synthetic daily weather records that match the statistics of observed stations.

Stochastic event sets in catastrophe models

In physical risk, stochastic modeling is spatial. Every hurricane, flood, or wildfire has a location, a footprint, and an intensity at every point it touches.

Karen Clark described the Monte Carlo approach to insured catastrophe losses in A Formal Approach to Catastrophe Risk Assessment and Management (1986). Grossi and Kunreuther's Catastrophe Modeling: A New Approach to Managing Risk (2005) documents the structure that catastrophe models still share: hazard, exposure, vulnerability, and loss modules.

The hazard module is a stochastic event set: a catalog of simulated hurricanes, floods, earthquakes, or wildfires, each with an annual rate of occurrence. Model developers fit distributions to the historical record, such as the hurricane tracks in NOAA's HURDAT2 database, described by Landsea and Franklin (2013). They then sample tens of thousands of years of plausible events, including storms larger than any yet observed.

Each event has a hazard footprint: its peak wind speed, flood depth, ground shaking, or flame length across a grid. The model joins every footprint to the exposure, meaning the buildings and parcels in a portfolio with their construction and value. A vulnerability curve converts the intensity at each building into a damage ratio, the share of the building's value lost. Summing damage across buildings gives one loss per event. The losses listed by event and simulated year form the year event loss table.

Diagram of a stochastic catastrophe model in four stages from left to right. Stage one is a Poisson draw of event counts per simulated year, and stage two is random circular hazard footprints. Stage three is a spatial join of footprints to building centroids. Stage four is a year event loss table ranked into an exceedance probability curve. Labels give the Oklahoma County example values: 10,000 years, 20,018 events, 441,465 buildings, and a 1-in-100 year aggregate loss of 22,142 buildings.
The structure of a stochastic catastrophe model, with the values from the Oklahoma County Monte Carlo below. The run has 10,000 simulated years, 20,018 events, 441,465 Overture buildings, and a 1-in-100 year aggregate loss of 22,142 buildings.

Ranking the simulated years produces the loss distribution. Average annual loss (AAL) is the mean loss per simulated year. The exceedance probability (EP) curve and probable maximum loss give the probability that annual loss exceeds each value. The return period is the inverse of that probability. A loss with a 1% annual exceedance probability is the 100-year loss.

The open-source Oasis Loss Modelling Framework runs catastrophe models in this structure. The Federal Emergency Management Agency (FEMA) model Hazus applies the same hazard, exposure, and vulnerability chain to earthquakes, floods, hurricanes, and tsunamis. The US Forest Service's FSim fire simulator, described by Finney and colleagues (2011), models thousands of fire seasons with random ignitions and weather. Its burn probabilities are an input to Wildfire Risk to Communities. Analysts check simulated fire perimeters against burn scars mapped from earth observation data, such as the Sentinel-2 burn severity pipeline Wherobots ran on the Spokane firestorm. Flood models route each simulated storm's rainfall over a digital elevation model to produce depth grids.

Spatial stochastic simulation with kriging, conditional simulation, and point processes

Spatial statistics applies stochastic modeling to quantities that vary over space.

Random fields, kriging, and conditional simulation. A random field assigns a random variable to every location. Nearby values are more alike than distant ones, and the variogram measures how that similarity falls with distance. Danie Krige estimated gold grades on the Witwatersrand from nearby samples in 1951. Georges Matheron formalized the theory in Principles of Geostatistics (1963). He named the best linear estimate from nearby samples kriging in Krige's honor, as Noel Cressie recounts in The Origins of Kriging (1990). Kriging returns the expected value at each location, a smooth map. Conditional simulation draws many equally likely maps that match the measured values and the variogram. The spread across maps measures the uncertainty between samples. André Journel set out the method for mining in Geostatistics for Conditional Simulation of Ore Bodies (1974). Matheron's intrinsic random functions (1973) introduced the turning bands method for simulating fields.

Spatial point processes. A point process places events in space at random: storm touchdowns, wildfire ignitions, earthquake epicenters, buildings. The reference model is the homogeneous Poisson process, also called complete spatial randomness: events fall independently, at the same average density everywhere. Brian Ripley's second-order analysis of stationary point processes (1976) introduced the K function. It counts neighbors within distance r of each event and compares the count with the Poisson expectation to detect clustering or regular spacing. Analysts test significance by Monte Carlo. They simulate many Poisson patterns in the same area and check whether the observed K curve falls outside the envelope of the simulated curves. Baddeley and Turner's spatstat package (2005) implements these tests.

The hazard footprints in a catastrophe model combine both families: event locations from a point process, and an intensity field around each one.

Stochastic modeling in Wherobots

WherobotsDB runs the hazard-to-building joins of a stochastic catastrophe model in SQL. It does not ship a catastrophe model. The query below is a toy example: a Monte Carlo simulation of a circular hazard over real buildings, with every random draw made in SQL.

The query reads these inputs:

InputFormatRows usedWhat the query read
Overture buildings_buildingIceberg table in Wherobots Open Data441,465 buildings in Oklahoma CountyFootprint geometry and bounding box, reduced to one centroid per building
Overture divisions_division_areaIceberg table in Wherobots Open Data1 polygonThe Oklahoma County boundary, used to keep buildings whose centroid falls inside it
range(0, 12)Generated in SQL12Poisson cumulative probabilities for 0 to 11 events per year
range(0, 10000, 1, 1)Generated in SQL10,000One uniform random number per simulated year
range(0, 120000, 1, 1)Generated in SQL120,000 event slotsRandom centers and radii; 20,018 slots became events

The setup:

  • Exposure. Every Overture building footprint whose centroid falls inside Oklahoma County, Oklahoma, from the Overture buildings table.
  • Event frequency. 10,000 simulated years. Each year's event count is a Poisson draw with a mean of 2. SQL makes the draw by counting how many Poisson cumulative probabilities lie below a uniform random number.
  • Event footprints. Each event is a circle with a center drawn uniformly over the county's bounding box. Its radius is 250 m plus an exponential draw with a 750 m mean. The query draws circles in zone 14N of the Universal Transverse Mercator (UTM) system, a map projection measured in meters.
  • Loss. The number of buildings whose centroid falls inside the footprint. Every hit counts as a total loss, with no vulnerability curve and no dollar values.
  • Seeds. rand(101) draws the annual counts, and rand(102), rand(103), and rand(104) draw longitude, latitude, and radius. The query pins the range() tables to one partition, so every run returns the same events.
-- Toy Monte Carlo: 10,000 simulated years of circular hazard footprints over Oklahoma County, OK.
-- Fixed seeds (101 to 104) on single-partition range() tables make every run identical.
WITH pois AS (
  -- Poisson CDF for an average of 2 events per year, k = 0 to 11
  SELECT k, SUM(EXP(-2.0) * POW(2.0, k) / FACTORIAL(k)) OVER (ORDER BY k) AS cdf
  FROM (SELECT id AS k FROM range(0, 12))
),
years AS (
  SELECT id AS sim_year, rand(101) AS u FROM range(0, 10000, 1, 1)
),
year_n AS (
  -- Inverse-CDF draw: the event count is the number of k whose CDF lies below u
  SELECT /*+ BROADCAST(p) */ y.sim_year, COUNT(p.k) AS n_events
  FROM years y LEFT JOIN pois p ON p.cdf < y.u
  GROUP BY y.sim_year
),
slots AS (
  -- 12 candidate event slots per year: a uniform center in the county bounding box
  -- and a radius of 250 m plus an exponential draw with a 750 m mean
  SELECT id DIV 12 AS sim_year, id AS event_id, id % 12 AS k,
         -97.674 + 0.533 * rand(102) AS lon,
          35.377 + 0.349 * rand(103) AS lat,
         250 - 750 * LN(1 - rand(104)) AS radius_m
  FROM range(0, 120000, 1, 1)
),
footprints AS (
  SELECT s.sim_year, s.event_id, s.lon, s.lat, s.radius_m,
         ST_Buffer(ST_Transform(ST_Point(s.lon, s.lat), 'EPSG:4326',
                   '+proj=utm +zone=14 +datum=WGS84 +units=m +no_defs'), s.radius_m) AS fp
  FROM slots s JOIN year_n y ON s.sim_year = y.sim_year AND s.k < y.n_events
),
county AS (
  SELECT geometry AS g FROM wherobots_open_data.overture_maps_foundation.divisions_division_area
  WHERE id = '27718581-7b60-42fb-b885-6d8cbf2a3699'   -- Oklahoma County, Oklahoma
),
buildings AS (
  SELECT /*+ BROADCAST(c) */ b.id,
         ST_Transform(ST_Centroid(b.geometry), 'EPSG:4326',
                      '+proj=utm +zone=14 +datum=WGS84 +units=m +no_defs') AS pt
  FROM wherobots_open_data.overture_maps_foundation.buildings_building b, county c
  WHERE b.bbox.xmin > -97.675 AND b.bbox.xmax < -97.140
    AND b.bbox.ymin > 35.376 AND b.bbox.ymax < 35.727
    AND ST_Intersects(c.g, ST_Centroid(b.geometry))
),
event_loss AS (
  -- Year event loss table: buildings whose centroid falls inside each footprint
  SELECT f.sim_year, f.event_id, COUNT(*) AS loss
  FROM footprints f JOIN buildings b ON ST_Contains(f.fp, b.pt)
  GROUP BY f.sim_year, f.event_id
),
annual AS (
  SELECT y.sim_year, y.n_events,
         COALESCE(SUM(e.loss), 0) AS aep_loss,   -- all events in the year
         COALESCE(MAX(e.loss), 0) AS oep_loss    -- largest single event
  FROM year_n y LEFT JOIN event_loss e ON y.sim_year = e.sim_year
  GROUP BY y.sim_year, y.n_events
),
ranked AS (
  SELECT *, ROW_NUMBER() OVER (ORDER BY aep_loss DESC) AS aep_rank,
            ROW_NUMBER() OVER (ORDER BY oep_loss DESC) AS oep_rank
  FROM annual
)
SELECT (SELECT COUNT(*) FROM buildings) AS buildings,
       COUNT(*) AS years,
       SUM(n_events) AS events,
       SUM(CASE WHEN n_events = 0 THEN 1 ELSE 0 END) AS years_without_event,
       ROUND(AVG(aep_loss), 1) AS aal_buildings,                    -- average annual loss
       MAX(CASE WHEN aep_rank = 5000 THEN aep_loss END) AS median_year,
       MAX(CASE WHEN aep_rank = 1000 THEN aep_loss END) AS aep_10yr,  -- 1,000th worst of 10,000 years
       MAX(CASE WHEN aep_rank = 100  THEN aep_loss END) AS aep_100yr,
       MAX(CASE WHEN aep_rank = 40   THEN aep_loss END) AS aep_250yr,
       MAX(CASE WHEN oep_rank = 100  THEN oep_loss END) AS oep_100yr,
       MAX(CASE WHEN oep_rank = 40   THEN oep_loss END) AS oep_250yr,
       MAX(aep_loss) AS worst_year
FROM ranked

One WherobotsDB query ran the whole simulation in 27 seconds, and three runs returned identical numbers. It drew 20,018 events in 10,000 years. 1,389 years had no event, close to the 13.5% a Poisson mean of 2 predicts. Average annual loss is 2,223.2 buildings, and the median year hits 593. Most years are mild, and a few severe years pull the mean up.

Aggregate loss sums every event in a year. The 1-in-10 year aggregate loss is 6,172 buildings, the 1-in-100 year loss 22,142, and the 1-in-250 year loss 31,915. Occurrence loss counts only each year's largest event. Ranked that way, the 1-in-100 and 1-in-250 year losses are 20,475 and 29,683. The worst year, 3931, hit 85,019 buildings. One 8.7 km footprint over south Oklahoma City hit 80,359 of them.

Map of Oklahoma County, Oklahoma, shaded by Overture building density, densest in central Oklahoma City. Thin outlines show the 208 simulated hazard footprints of years 0 to 99, scattered across the county. Three pink circles mark the worst simulated year, 3931, whose largest footprint, 8.7 km in radius, covers much of south Oklahoma City.
Building density from Overture and the 208 simulated footprints of years 0 to 99, with the worst of the 10,000 years highlighted. That is year 3931, with three events and 85,019 buildings hit, 80,359 of them by one event over south Oklahoma City.

EXPLAIN FORMATTED prints the plan Spark will run. It joins the footprints to the building centroids with a broadcast index join, a spatial join that copies one side to every worker and indexes it. It has no Cartesian product, which would pair every footprint with every building. Each building is tested only against nearby footprints, out of 20,018 × 441,465 possible pairs. Swapping the final SELECT for SELECT * FROM annual returns the 10,000 yearly rows plotted below.

Exceedance probability curves for the toy Oklahoma County model, with return period in years on a logarithmic horizontal axis from 1 to 10,000 and buildings hit on the vertical axis. The aggregate exceedance probability (AEP) curve sits slightly above the occurrence exceedance probability (OEP) curve. Marked points: 6,172 buildings at 10 years, 22,142 at 100 years, and 31,915 at 250 years for AEP, and 20,475 and 29,683 for OEP at 100 and 250 years.
The aggregate and occurrence exceedance curves from the 10,000 simulated years. The 1-in-100 year aggregate loss is 22,142 buildings and the 1-in-250 year loss is 31,915.

How many simulated years are enough?

Splitting the 10,000 years into ten 1,000-year catalogs measures how far a smaller catalog drifts. The query reuses every common table expression (CTE), or named subquery, above:

-- Replace the ranked CTE and final SELECT above with:
blocks AS (
  -- Split the 10,000 years into ten independent 1,000-year catalogs
  SELECT sim_year DIV 1000 AS block, aep_loss,
         ROW_NUMBER() OVER (PARTITION BY sim_year DIV 1000 ORDER BY aep_loss DESC) AS rk
  FROM annual
)
SELECT block,
       ROUND(AVG(aep_loss), 1) AS aal_buildings,
       MAX(CASE WHEN rk = 10 THEN aep_loss END) AS aep_100yr,   -- 10th worst of 1,000 years
       MAX(CASE WHEN rk = 4  THEN aep_loss END) AS aep_250yr    -- 4th worst of 1,000 years
FROM blocks
GROUP BY block
ORDER BY block

Average annual loss ranges from 2,033.9 to 2,507.7 buildings across the ten catalogs, against 2,223.2 for the full run. The 1-in-100 year loss ranges from 18,303 to 26,796. The 1-in-250 year loss ranges from 25,937 to 37,720. A single 1,000-year catalog can miss the 1-in-250 year loss by almost a fifth.

Dot chart of ten 1,000-year catalogs cut from the same simulation. Average annual loss estimates range from 2,033.9 to 2,507.7 buildings around the full-run value of 2,223.2. The 1-in-100 year aggregate loss ranges from 18,303 to 26,796 around 22,142, and the 1-in-250 year loss from 25,937 to 37,720 around 31,915.
Sampling error in ten 1,000-year catalogs: the 1-in-250 year loss ranges from 25,937 to 37,720 buildings, against 31,915 from all 10,000 years. AAL varies far less, from 2,033.9 to 2,507.7.

A production model replaces each toy piece. A hurricane or hail event set replaces the circles, and intensity rasters sampled with RS_ZonalStats replace the binary hit. Vulnerability curves and insured values replace building counts. The join pattern stays the same, and WherobotsDB runs raster and vector in one engine; most stacks pick one. In How to score every building in a state for catastrophe risk, WherobotsDB joined 2,771,126 Overture buildings in Colorado to the Regrid parcels they sit on. It scored each one across five perils. It used the U.S. Forest Service Wildfire Risk to Communities 30 m raster, 403 million NOAA radar hail observations since 2016, and the FEMA National Flood Hazard Layer. The scores are published as the Colorado property risk explorer. A separate benchmark completed a statewide zonal statistics analysis across every building in Texas in 3 minutes 28 seconds.

Stochastic modeling research and what changes at scale

Open problems.

  • The tail. A 1-in-250 year loss comes from the worst few dozen simulated years. Those years come from distributions fitted to a short historical record. Longer catalogs and importance sampling, which draws extra samples from the tail and reweights them, narrow the uncertainty at a higher compute cost.
  • Dependence. Real hazards cluster in time and space. Hurricane seasons are correlated, and one storm damages neighboring buildings together. Independent Poisson draws understate that clustering. Correlated perils such as wind and storm surge need joint models.
  • Nonstationarity. Distributions fitted to the past assume a stable climate. Climate-conditioned event sets reweight or regenerate catalogs for warmer conditions. The choice of climate scenario then adds another source of uncertainty.

What changes at scale. Each simulated event is a spatial object. Scoring it means intersecting its footprint with every building it touches, or sampling a raster under each building. A catalog of 10,000 events against 3 million buildings is 30 billion event-building pairs before pruning. Finding the pairs that overlap is a spatial join. Spatial partitioning, which puts nearby records on the same worker, and spatial indexing keep that join small enough to run. Jia Yu, Jinxuan Wu, and Mohamed Sarwat introduced that design for Apache Spark in GeoSpark (2015), now Apache Sedona. The same partitioned joins run each event set against national exposure, for every peril, model version, and climate scenario.

The AI models people use every day were trained on text, documents, databases, and the internet. Without a tool connection, they cannot compute which buildings sit inside a 100-year flood footprint. Through the Wherobots Model Context Protocol (MCP) server, geospatial AI agents run that query against the same tables an analyst uses.

Conclusions

The Oklahoma County run supports the opening claim: a stochastic model's mean settles within a few thousand simulated years, and its 1-in-250 year loss needs far more than 1,000.

  1. Use a stochastic model when the question is about a range or a tail, because its output is a distribution. The Oklahoma County run's mean year lost 2,223.2 buildings and its median year 593.
  2. The number of runs a stochastic model needs depends on the statistic. Across ten 1,000-year catalogs, average annual loss stayed within 2,033.9 to 2,507.7 buildings, and the 1-in-250 year loss ranged from 25,937 to 37,720. A 1,000-year catalog is too short for return periods of 100 years or more.
  3. Check a stochastic model against a value you can compute by hand before reading its tail: 1,389 event-free years against the 13.5% a Poisson mean of 2 predicts.
  4. A stochastic model in Spark repeats only when the seed and the partitioning are both fixed. Three runs matched because the range() tables sat in one partition.
  5. In a spatial stochastic model, the footprint-to-building join grows with the event set and the buildings: 20,018 footprints against 441,465 buildings is 8.8 billion candidate pairs. Run EXPLAIN FORMATTED before a larger event set and confirm a broadcast index join with no Cartesian product.
  6. One hedge: this toy model draws events independently, which understates the clustering of real hazards. Its numbers measure the sampling error of a stochastic model and say nothing about the risk to Oklahoma County.

Read more from Wherobots

Run a seeded Monte Carlo against every building in a county with a Wherobots free trial at cloud.wherobots.com.

Frequently asked questions

What is stochastic modeling in simple terms?

Stochastic modeling is a way to forecast an uncertain quantity by treating its inputs as random. The model draws input values from probability distributions, runs thousands of times, and reports the range of outcomes and how likely each one is. A deterministic model returns a single answer for a fixed set of inputs.

What is meant by a stochastic model?

A stochastic model is a mathematical model with at least one random variable among its inputs or rules. Each run produces a different outcome, called a realization, and the collection of many runs approximates the probability distribution of the result. Examples include the Black-Scholes option pricing model, Markov chain weather generators, and the stochastic event sets inside catastrophe models.

Is Monte Carlo stochastic modelling?

Monte Carlo simulation is the most common method for running a stochastic model. It draws random samples from each input distribution, computes the outcome for each draw, and repeats the process thousands or millions of times. The collected outcomes approximate the probability distribution of the result. Stochastic modelling is the broader idea. Monte Carlo, named by Metropolis and Ulam in 1949, is a technique for running a stochastic model.

What is the difference between a stochastic and deterministic model?

A deterministic model produces the same output every time it runs with the same inputs. A stochastic model includes random variables, so each run produces a different output. Many runs together form a probability distribution. A fixed 5% interest projection is deterministic. A projection that draws each year’s return from a distribution is stochastic.

What are the four types of stochastic processes?

Stochastic processes are commonly grouped by whether time and the state are discrete or continuous. A Markov chain has discrete time and discrete states. An autoregressive time series has discrete time and continuous states. A Poisson process has continuous time and discrete states. Brownian motion has continuous time and continuous states.

What is the main difference between stochastic and probabilistic modeling?

The terms overlap, and many authors use them interchangeably. Probabilistic modeling is the broader category: any model that represents uncertainty with probability distributions. Stochastic modeling usually refers to models of random processes that evolve over time or space, solved by simulating many sample paths.

Is the Black-Scholes model a stochastic model?

Yes. Black and Scholes (1973) model the stock price as geometric Brownian motion, a continuous-time stochastic process with lognormal returns. For a European option the model has a closed-form solution, so no simulation is needed. Options whose payoff depends on the price path are priced by Monte Carlo simulation of the same process.

What is a stochastic event set?

A stochastic event set is a catalog of simulated catastrophes, such as hurricanes, floods, earthquakes, or wildfires, each with an annual rate of occurrence and a hazard footprint. Catastrophe models run the event set against buildings and policies to produce loss distributions, average annual loss, and exceedance probability curves.

How many simulations does a stochastic model need?

It depends on the statistic. The mean settles after a few thousand runs, because Monte Carlo error falls with the square root of the number of runs. Tail statistics need far more: a 1-in-250 year loss estimated from 1,000 simulated years is the 4th worst year. In a WherobotsDB example with a fixed random seed over Oklahoma County, ten 1,000-year catalogs gave 1-in-250 year losses from 25,937 to 37,720 buildings, against 31,915 from all 10,000 years.

What is conditional simulation in geostatistics?

Conditional simulation generates many equally likely maps of a spatial variable, such as ore grade or rainfall, that match the measured values at sample locations. The maps also match the variogram, which measures how similar values are at a given distance. Kriging gives one smooth best estimate. Conditional simulation gives a set of equally likely maps, and their spread measures the uncertainty between samples. Journel described the method for ore bodies in 1974.

Where is stochastic modeling used?

In finance, stochastic modeling prices options and projects asset returns and retirement savings. Insurers use it for reserving and catastrophe risk, and epidemiologists use it to forecast outbreak spread. Other uses include queues and inventory in operations, mineral and groundwater uncertainty in geostatistics, and ensemble forecasts and weather generators in weather and climate science.