# 085. Thickness and fault composition

**Question:** How does the composition of recorded faults vary across plate-thickness bands?

## Result

The largest computed metric is 0.8676 for (200.0, inf] / Other_Faults; the smallest is 0.001195 for (50.0, 100.0] / K_Scatch. Metric: within_band_share (Within-band fault share).

Healthy production exposure is unavailable, so these shares cannot establish thickness-specific defect risk.

![Thickness and fault composition](outputs/chart.png)

| thickness_band | fault | records | within_band_share | group |
| --- | --- | --- | --- | --- |
| (0.0, 50.0] | Bumps | 92 | 0.1115 | (0.0, 50.0] / Bumps |
| (0.0, 50.0] | Dirtiness | 13 | 0.01576 | (0.0, 50.0] / Dirtiness |
| (0.0, 50.0] | K_Scatch | 390 | 0.4727 | (0.0, 50.0] / K_Scatch |
| (0.0, 50.0] | Other_Faults | 212 | 0.257 | (0.0, 50.0] / Other_Faults |
| (0.0, 50.0] | Pastry | 39 | 0.04727 | (0.0, 50.0] / Pastry |
| (0.0, 50.0] | Stains | 71 | 0.08606 | (0.0, 50.0] / Stains |
| (0.0, 50.0] | Z_Scratch | 8 | 0.009697 | (0.0, 50.0] / Z_Scratch |
| (100.0, 150.0] | Bumps | 7 | 0.08434 | (100.0, 150.0] / Bumps |
| (100.0, 150.0] | Dirtiness | 7 | 0.08434 | (100.0, 150.0] / Dirtiness |
| (100.0, 150.0] | Other_Faults | 46 | 0.5542 | (100.0, 150.0] / Other_Faults |
| (100.0, 150.0] | Pastry | 23 | 0.2771 | (100.0, 150.0] / Pastry |
| (150.0, 200.0] | Bumps | 25 | 0.1953 | (150.0, 200.0] / Bumps |
| (150.0, 200.0] | Other_Faults | 83 | 0.6484 | (150.0, 200.0] / Other_Faults |
| (150.0, 200.0] | Pastry | 10 | 0.07812 | (150.0, 200.0] / Pastry |

The chart shows 14 of 25 result rows; the table previews the first 14 in the analysis-defined order. [Download the full result table](outputs/results.csv). Numerical values are computed from the source; missing results stay unavailable.

## Method

Thickness strata and within-stratum fault shares.

The study uses shared source preparation and reusable statistical routines. Its specific transformations are in [analysis.py](analysis.py), and common model/evaluation code is in [portfolio/methods.py](../../portfolio/methods.py). The [notebook](analysis.ipynb) executes the study and displays the saved results.

## Decision and limitations

Investigate process mix before attributing differences to plate thickness.

Every source row is a recorded fault. The data cannot estimate a production defect rate or distinguish healthy plates. Batch and machine IDs are absent, so grouped exact-input holdouts do not prove factory transfer. 

Related studies may share observations or holdouts. These are focused analytical studies, not independent replications or deployed business systems. Any model refinements informed by these results need new untouched evaluation data. No commercial impact is inferred from an association or backtest.

## Reproduce

From the repository root, after installing `requirements.txt`:

```powershell
python projects/085-thickness-and-fault-composition/analysis.py
```

Source data are downloaded automatically if absent. Original archives are retained unchanged and checked by SHA-256. The cleaned cache normalizes column names; field-specific changes are visible in [data preparation](../../portfolio/data.py). Runtime evidence is in [receipt.json](outputs/receipt.json).

## Source

[Steel Plates Faults](https://archive.ics.uci.edu/dataset/198/steel+plates+faults), Buscema, Terzi and Tastle (2010). [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Source data are transformed and aggregated in this study. [Source provenance](../../data/provenance/steel.json) and [prepared-data audit](../../data/provenance/steel_prepared.json) record the downloaded files, field coverage and hashes.
