liveBook · Manning

Attribute data

As explained in Statistics Every Programmer Needs

Attribute data are quality-control observations recorded as counts or proportions rather than continuous measurements.

Attribute data record quality-control results as counts or proportions, such as defective versus nondefective items, rather than continuous measurements. Their statistical treatment supports proportion-based process monitoring. section 14.1.3 section 14.2.1

For p-chart analysis, calculate and interpret attribute-data variation as follows:

  • Calculate each sample proportion as defective items divided by inspected items. section 14.2.1
  • Estimate standard deviation with √(p̄(1 − p̄) / n), because proportion variability depends on the average defect rate and sample size. section 14.1.3
  • Set three-sigma upper and lower control limits around p̄, then inspect points for unusual variation or process instability. section 14.2.1

Orange-juice can batches

A pandas data frame contains 64 batches, each recording defective cans and batch size. Compute the defective proportion, mean proportion, sample-specific sigma, and control limits with pandas and NumPy, then plot the p-chart with Matplotlib. Points inside the limits indicate expected variation; points outside warrant investigation. section 14.2.1

How Statistics Every Programmer Needs covers it

How deep it goes
Defines counts, proportions, and p-chart variation formulas, then stops short of continuous-data implementation details.
Examples
Uses defective orange-juice cans across 64 production batches as a worked p-chart example.
What it assumes
Assumes recognition of defective and nondefective classifications while introducing proportion variability and control-limit calculations.
What you can do after
Apply attribute-data monitoring with pandas, NumPy, and Matplotlib by computing proportions, limits, and p-chart visualizations.
How it connects
Connects p-charts, standard deviation, control limits, process stability, and continuous data.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Statistics Every Programmer Needs. The section links point to the parts of the book it draws on.