Historical Data Sampling
100
Learn how to use CSV data in simulations with row-locked sampling. This template demonstrates the Scenarios mode which keeps columns linked (same row) vs Independent mode where each column samples separately.
NOTEAbout This Template
This template demonstrates how to use the Data block with historical data. The key insight: when columns are correlated (like revenue and cost), use Scenarios mode to keep values from the same row together.
DATAQuarterly Sales
8 rows3 cols
Scenarios
Historical quarterly data. Scenarios mode ensures revenue, cost, and customers come from the same quarter.
sales.revenue
sales.cost
sales.customers
FORMULAGross Profit
@sales.revenue - @sales.cost
Calculates profit from the sampled quarter. With Scenarios mode, revenue and cost are always from the same period.
sales.revenue
sales.cost
profit
FORMULAProfit Margin
(@sales.revenue - @sales.cost) / @sales.revenue * 100
Profit margin as percentage. Realistic because values come from the same quarter.
sales.revenue
sales.cost
margin
FORMULARevenue per Customer
@sales.revenue / @sales.customers
Average revenue per customer. Meaningful only when revenue and customers are from the same quarter.
sales.revenue
sales.customers
arpc
OUTPUTProfit Distribution
Quarterly Profit
OUTPUTMargin Distribution
Profit Margin %
OUTPUTARPC Distribution
Revenue per Customer
NOTESampling Modes Explained
• Scenarios (default): Picks one row, uses all values from that row. Best for correlated data.
• Independent: Each column picks its own random row. Use for unrelated distributions.
• Sequential: Walks through rows 1, 2, 3... (row-locked).
• Summary: Uses aggregate statistics (mean, sum, etc.).
About the creator
The team behind Carlo. We believe everyone deserves tools to reason about risk and uncertainty.
What is Carlo?
Carlo is a visual tool for Monte Carlo simulation. Model uncertainty by dragging probability distributions, connecting them visually, and running thousands of scenarios instantly.