ModelRisk example · Manufacturing
Production Yield and Scrap
How many parts must we make to deliver 4,800 good ones? An uncertain defect rate, and the run size that pays.
From the model’s saved run
Which run size?
The chance of meeting the order, and the expected cost of making the parts and of any shortfall.
| Run size (parts) | Chance of meeting it | Exact chance | Expected cost, US$k | 95th pct cost, US$k | Lowest cost |
|---|---|---|---|---|---|
| 4,950 | 45.0% | 45.0% | 203.8 | 220.8 | |
| 5,000 | 80.8% | 81.0% | 201.5 | 211.0 | ✔ lowest |
| 5,050 | 95.8% | 95.8% | 202.3 | 202.0 | |
| 5,100 | 99.3% | 99.3% | 204.0 | 204.0 | |
| 5,150 | 99.9% | 99.9% | 206.0 | 206.0 | |
| 5,200 | 100.0% | 100.0% | 208.0 | 208.0 |
Line chart: Expected cost.
The business question
A plant makes precision parts in runs. The current order is for 4,800 good parts. Every part costs US$40 to make whether it turns out good or not, and every part short costs US$250 — an express re-run and a penalty in the contract.
The last batch was inspected part by part: 12 of 400 were defective, so the defect rate is about 3% — but only about: 400 parts cannot pin it down. Within a run, defects also occur at random. The planner wants the run size that balances the cost of making too many parts against the cost of making too few.
- Who it is for
- Production planners, quality engineers, operations managers; a first ModelRisk model.
- Main outputs
- The chance of meeting the order and the expected cost for six run sizes, simulated and exact · the number of good parts from the run looked at in detail (5,000 as shipped), with the defect rate uncertain and as if it were known.
How the model works
Three sheets after this one, read from left to right. Each one feeds the next.
Inputs sheet
The parts ordered, the cost of a part and of a part short. The parts inspected and the defects found; the smallest run size and the step between the sizes compared. The run size to look at in detail.
Production sheet
The defect rate is Beta(defects + 1, good parts + 1): what 400 inspected parts say about it. Each run size gets a Binomial number of defects at that rate. The good parts, the shortfall and the cost follow. The exact chance of meeting the order comes from the Beta-Binomial distribution.
Results sheet
For each run size, the chance of meeting the order and the expected cost, charted. The good parts from the run looked at in detail, with the defect rate uncertain and as if it were known.
ModelRisk techniques
Find similar models
- Product
- Type
- Application
- Uses
The results in detail
How many good parts?
A run of 5,000 parts (Inputs sheet): the defect rate uncertain, and as if it were known exactly.
S-curve (cumulative probability) of Rate uncertain, Rate known from the saved simulation.
| Measure | Unit | 5th pct | Median | 95th pct | Mean |
|---|---|---|---|---|---|
| Good parts, defect rate uncertain | parts | 4,756 | 4,842 | 4,907 | 4,838 |
| Good parts, defect rate known | parts | 4,829 | 4,850 | 4,870 | 4,850 |
| Measure | Unit | Value |
|---|---|---|
| Chance of meeting the order, rate uncertain | 80.8% | |
| Chance of meeting the order, rate known | 100.0% | |
| Exact, rate known (BINOM.DIST) | 100.0% |
How to read these results
- The inspection found 3% defective, but 400 parts cannot pin the rate down: it could plausibly be anywhere from about 2% to 5%. That uncertainty, more than the randomness within a run, decides whether the order is met.
- Treating the 3% as exact, a run of 5,000 looks certain to meet the order. With the rate as uncertain as the data say, the chance is about 81%: the same run, very different confidence. Ask how a rate was estimated before trusting a plan built on it.
- Every part costs US$40 to make and every part short US$250. The expected cost is lowest for a run of 5,000 (about US$201,500), which meets the order about four times in five. A run of 5,050 costs only about US$800 more on average and meets it 96% of the time — cheap insurance against the penalty.
- Inspecting more parts narrows the rate's range and lets the run size come closer to the order: try 1,200 parts inspected with 36 defects on the Inputs sheet.
- The simulated chances agree with the exact Beta-Binomial values on the Production sheet — a quick check that is available for simple models like this one.
See it move. Open the workbook, change an input on the Inputs sheet and run the simulation: every table and chart on this page updates in Excel.
Inputs and assumptions
Every assumption in the model, with its uncertainty and where it comes from. The figures are illustrative.
The order 3 inputs
| Assumption | Unit | Value |
|---|---|---|
| Good parts orderedDue at the end of the month. | parts | 4,800 |
| Cost to make one partMaterial, machine time and labour; good or not. | US$ | 40 |
| Cost of each part shortAn express re-run and the contract's penalty. | US$ a part | 250 |
Inspection data 2 inputs
The last batch, inspected part by part.
| Assumption | Unit | Value |
|---|---|---|
| Parts inspected | parts | 400 |
| Defective parts found | parts | 12 |
Run sizes to compare 3 inputs
| Assumption | Unit | Value |
|---|---|---|
| Smallest run sizeSix sizes are compared. | parts | 4,950 |
| Step between run sizes | parts | 50 |
| Run size looked at in detailOne of the six: its good parts with the rate uncertain and known. | parts | 5,000 |
Units and conventions
- Money
- US$; totals in US$ thousand.
- Defect rate
- The share of parts that come out defective.
- Run size
- The number of parts started; good parts = run size − defects.
Key assumptions and limitations
- Defects
- Each part is defective independently, at the same rate within a run.
- Rate
- The inspected batch represents the process; nothing has changed since.
- Costs
- Every part made costs the same; surplus good parts have no value; every part short costs the same.
- Data
- The plant and all figures are invented for this example.
How to use it
- Enter the order, the cost of a part and the cost of a part short.
- Enter how many parts were inspected and how many were defective.
- Run a simulation from the ModelRisk ribbon (10,000 samples with a fixed seed are set).
- Choose the run size with the lowest expected cost, and check its chance of meeting the order.
ModelRisk functions used
- VoseBeta
- The uncertain defect rate, from the number of defects in a sample.
- VoseBinomial
- The number of defective parts in a run.
- VoseBetaBinomialProb
- The exact chance of at most so many defects when the rate itself is uncertain.
- VoseSimMean, VoseSimPercentile
- Statistics of the simulation on the Results sheet.
Further reading
- Monte Carlo simulation explained (Vose guide)
- Vose, D. (2008). Risk Analysis: A Quantitative Guide, 3rd edition. Wiley — the Beta distribution for a probability and the Binomial process.
- Montgomery, D. C. (2019). Introduction to Statistical Quality Control, 8th edition. Wiley.
Download the workbook and run it yourself. It opens in Excel with ModelRisk. The free trial runs every example model.
Related example models
- ModelRiskOptimizer★★★★★Inventory Policy Chosen by the OptimizerWhich reorder point and order quantity cost least while keeping the service the customers were promised?Demand over a random lead time as an aggregate; the reorder point and order quantity chosen together by the Optimizer for a service target.
- ModelRisk★★★★★Inventory Policy under Uncertain Demand and Lead TimeWhen should we reorder?Demand during a random lead time as an aggregate, the service level of each reorder point, and its cost.
- ModelRisk★★★★★Reliability and Availability of a Production LineHow often will the line stop, what does it cost, and is a standby machine worth it?Four machines in series, each failing and being repaired at random through the year; one fitted to its failure records.
An illustrative example: the figures are invented for teaching and do not describe a real company, project or asset. Last updated 9 October 2026.