Study guide
8.4 Data, Logic Development, and Analytics
FE Industrial and Systems Study Guide Exam
Track your progress as you read
Finished sections get a check mark.
1 Chapter 1: Exam Overview, CBT Strategy & Handbook Navigation
1.1 FE Industrial Exam Structure, CBT Logistics, and Pacing 1.2 Using the NCEES FE Reference Handbook and Approved Calculators
2 Chapter 2: Mathematics for Industrial Engineers
2.1 Analytic Geometry, Coordinate Systems, and Trigonometry 2.2 Calculus: Differential, Integral, and Series Approximations 2.3 Linear Algebra: Matrix Operations, Systems of Equations, and Vectors
3 Chapter 3: Engineering Sciences Core
3.1 Thermodynamics Fundamentals and Fluid Flow Principles 3.2 Statics, Dynamics, and Mechanics of Materials Core 3.3 Electrical Circuits, DC/AC Analysis, and Power in Industrial Systems
4 Chapter 4: Ethics and Professional Practice
4.1 NCEES Model Rules of Professional Conduct and Technical Society Ethics 4.2 Engineering Licensure, Public Welfare, and Professional Liability 4.3 Engineering Contracts, Intellectual Property, and Conflicts of Interest
5 Chapter 5: Engineering Economics
5.1 Time Value of Money, Discount Factors, and Equivalence 5.2 Evaluating Alternatives: Present Worth, Equivalent Annual Cost, and IRR 5.3 Incremental Rate of Return, Replacement Analysis, and Break-Even 5.4 Depreciation Methods, MACRS, Income Taxes, and Inflation
6 Chapter 6: Probability Foundations & Distributions
6.1 Basic Probability Concepts, Conditional Probability, and Bayes' Theorem 6.2 Discrete Probability Distributions 6.3 Continuous Probability Distributions
7 Chapter 7: Statistical Inference, Regression & Design of Experiments
7.1 Sampling Distributions, Central Limit Theorem, and Confidence Intervals 7.2 Hypothesis Testing: Means, Proportions, and Variances 7.3 Linear Regression, Correlation Analysis, and Design of Experiments (ANOVA)
8 Chapter 8: Data, Logic, Modeling & Linear Programming
8.1 Optimization Modeling: Decision Variables, Objectives, and Constraints 8.2 Linear Programming: Graphical Solutions and Simplex Fundamentals 8.3 Duality, Sensitivity Analysis, and Integer Linear Programming 8.4 Data, Logic Development, and Analytics
9 Chapter 9: Stochastic Models & Simulation
9.1 Queuing Theory: Little's Law, M/M/1, and Multi-Server Systems 9.2 Discrete-Time Markov Chains: Transition Matrices and Steady-State Probabilities 9.3 Discrete-Event Simulation Principles and Monte Carlo Modeling
10 Chapter 10: Engineering Management, Project Planning & Performance Measurement
10.1 Organizational Structure, Leadership, and Worker Motivation Theories 10.2 Project Management: WBS, Critical Path Method (CPM), PERT, and Crashing 10.3 Earned Value Management (EVM), Decision Trees, and Risk Preference 10.4 Performance Measurement: Productivity, KPIs, Wage Systems, and the Balanced Scorecard
11 Chapter 11: Manufacturing & Production Systems
11.1 Manufacturing Processes, Material Processing, and Tolerancing 11.2 Assembly Line Balancing, Takt Time, Cycle Time, and Throughput 11.3 Sustainable Manufacturing, Waste Minimization, and Life-Cycle Assessment
12 Chapter 12: Production Planning, Inventory Control & Sequencing
12.1 Demand Forecasting Methods and Forecast Error Tracking 12.2 Aggregate Planning, Master Production Scheduling (MPS), and MRP 12.3 Deterministic Inventory Models: EOQ, EPQ, and Safety Stock 12.4 Job Sequencing, Dispatching Rules, and Flow Shop Scheduling
13 Chapter 13: Lean Systems & Theory of Constraints
13.1 Lean Foundations: Value Stream Mapping, Seven Wastes, and 5S 13.2 Pull Systems, Kanban, Just-In-Time (JIT), and SMED Setup Reduction 13.3 Theory of Constraints: Bottleneck Identification and Drum-Buffer-Rope
14 Chapter 14: Facilities Planning & Material Handling
14.1 Facility Location Analysis: Qualitative Factor Rating and Centroid Method 14.2 Facility Layout Design and Flow Analysis 14.3 Material Handling Equipment, Warehousing, and AS/RS
15 Chapter 15: Supply Chain Design & Logistics
15.1 Supply Chain Network Architecture and Transportation Modes 15.2 Distribution Strategies, Cross-Docking, and Vehicle Routing 15.3 The Bullwhip Effect, Risk Pooling, and Supply Chain Coordination
16 Chapter 16: Human Factors & Cognitive Ergonomics
16.1 Cognitive Engineering, Human-Machine Interface, Displays, and Controls 16.2 Anthropometric Principles, Percentile Design, and Biomechanical Posture 16.3 Environmental Ergonomics: Industrial Noise, Lighting, and Heat Stress
17 Chapter 17: Physical Ergonomics & Workplace Safety
17.1 Physical Ergonomics: The NIOSH Manual Lifting Equation 17.2 Cumulative Trauma Disorders and Postural Assessment 17.3 Workplace Safety: OSHA Standards, Hazard Analysis, and Control Hierarchy
18 Chapter 18: Work Design & Measurement
18.1 Methods Engineering, Process Charting, and Principles of Motion Economy 18.2 Direct Stopwatch Time Study: Observed Time, Performance Rating, and Allowances 18.3 Predetermined Time Systems, Work Sampling, and Learning Curves
19 Chapter 19: Quality Management, Six Sigma & Analytical Tools
19.1 Quality Philosophies, Total Quality Management, and Cost of Quality 19.2 Six Sigma DMAIC Methodology and Quality Function Deployment 19.3 The Seven Basic Quality Tools, Root Cause Analysis, and Taguchi Loss Function
20 Chapter 20: Statistical Process Control
20.1 Statistical Process Control Principles, Variation, and Run Rules 20.2 Variable Control Charts: X-bar & R, X-bar & S, and Individual-Moving Range 20.3 Attribute Control Charts: Defectives (p, np) and Defects (c, u)
21 Chapter 21: Process Capability & Acceptance Sampling
21.1 Process Capability Indices and Defect Levels 21.2 Acceptance Sampling Concepts and Operating Characteristic Curves 21.3 Sampling Risks, AQL, LTPD, and Standard Sampling Plans
22 Chapter 22: Systems Engineering & Life-Cycle Management
22.1 The Systems Engineering V-Model, Stakeholder Requirements, and Functional Architecture 22.2 Configuration Management, Interface Control, and Verification & Validation 22.3 Life-Cycle Costing, Maintainability, and System Availability
23 Chapter 23: Reliability Engineering & Risk Analysis
23.1 Reliability Mathematics, Hazard Rates, and the Bathtub Curve 23.2 System Reliability Configurations: Series, Parallel, and k-out-of-n Systems 23.3 Failure Modes and Effects Analysis and Fault Tree Analysis
8.4 Data, Logic Development, and Analytics
Key Takeaways Explain This Topic AI
Measurement scale governs which statistics are legal: nominal data supports only counts and modes, ordinal supports medians and rank tests, and interval/ratio data supports means, standard deviations, and regression.
A relational database stores data in normalized tables linked by primary keys and foreign keys; third normal form (3NF) removes repeating groups, partial-key dependencies, and transitive dependencies, eliminating update anomalies.
Logic development moves from a flowchart or decision table to pseudocode using only three control structures: sequence, selection (IF/THEN/ELSE), and iteration (WHILE/FOR).
Algorithm efficiency is expressed in Big-O notation on the worst-case growth of operations with input size n; linear search is O(n) while binary search on sorted data is O(log2 n), so a 1,048,576-record table takes at most 20 comparisons.
Supervised learning fits a labeled response (regression for continuous, classification for categorical) while unsupervised learning finds structure without labels (k-means clustering); classifier performance is read from a confusion matrix as accuracy, precision, and recall.
Last updated: September 2026
8.4 Data, Logic Development, and Analytics
The NCEES FE Industrial and Systems specification places data, logic development, and analytics alongside linear programming and stochastic modeling inside the Modeling and Quantitative Analysis knowledge area. That grouping is deliberate: an optimization model, a queuing study, and a control chart are all worthless if the underlying data is mis-typed, duplicated, or pulled from the wrong join. This section covers the data structures, logic constructs, algorithmic reasoning, and analytics vocabulary an industrial engineer is expected to command.
1. Data Types and Measurement Scales
Before any statistic is computed, the engineer must classify the measurement scale of each field, because the scale determines which mathematical operations are meaningful.
Scale Defining Property Legal Operations Valid Statistics Industrial Example
Nominal Labels with no order = = = , ≠ \ne = Counts, mode, proportion, chi-square Defect category, machine ID, supplier name
Ordinal Ranked, but gaps are not equal < < < , > > > Median, percentiles, rank correlation RULA action level, Likert satisfaction, ABC class
Interval Equal gaps, arbitrary zero + + + , − - − Mean, standard deviation, correlation Temperature in ∘ ^\circ ∘ C, calendar date
Ratio Equal gaps, true zero + , − , × , ÷ +, -, \times, \div + , − , × , ÷ All of the above plus ratios and geometric mean Cycle time, weight, throughput, cost
Exam Watchout : Only interval and ratio data support an arithmetic mean. Averaging ordinal satisfaction codes (1 = poor, 5 = excellent) to report a "3.7 average" assumes equal spacing that the scale does not provide. Report the median or the top-two-box percentage instead.
Structured, Semi-Structured, and Unstructured Data
Structured : Fixed schema in rows and columns (ERP transaction tables, MES cycle-time logs, PLC tag histories). Directly queryable.
Semi-Structured : Self-describing but schema-flexible (JSON payloads from IIoT sensors, XML EDI documents, log files). Requires parsing before analysis.
Unstructured : No inherent record structure (inspection photographs, maintenance technician free-text notes, thermal imagery). Requires feature extraction or natural-language processing.
Data Quality Dimensions
Six dimensions are audited before a data set is trusted for engineering decisions: accuracy (matches physical reality), completeness (no missing required fields), consistency (same fact agrees across systems), timeliness (current enough for the decision), validity (conforms to the defined domain and format), and uniqueness (no duplicate records). A single duplicated work order inflates throughput statistics; a missing scrap code silently biases a Pareto chart.
2. Relational Databases
Nearly all manufacturing execution, ERP, quality, and maintenance systems sit on relational databases . The relational model organizes data into two-dimensional tables (relations). Relational Terminology Map
- ┌───────────────────────────────────────────────────────────┐
- │ TABLE (Relation) = a named two-dimensional data set │
- │ ROW (Tuple / Record) = one real-world instance │
- │ COLUMN (Attribute / Field) = one property │
- │ DOMAIN = the legal value set for a column │
- │ CARDINALITY = number of rows; DEGREE = number of columns│
- └───────────────────────────────────────────────────────────┘
- Keys
Primary Key (PK) : The attribute (or minimal combination of attributes) that uniquely identifies each row. A primary key must be unique and never null . Example: part_number in a PARTS table.
Candidate Key : Any attribute set that could serve as the primary key. One candidate is chosen as the PK; the rest become alternate keys.
Composite Key : A primary key built from two or more columns, common in transaction tables (e.g., work_order_id + operation_seq ).
Foreign Key (FK) : An attribute in one table whose values must exist as primary-key values in another table. Foreign keys implement the relationships between tables and enforce referential integrity — the database rejects a routing row that references a nonexistent part number.
Relationship Cardinality
One-to-many (1:N) : One SUPPLIER supplies many PARTS. The FK lives on the "many" side.
Many-to-many (M:N) : Many PARTS are used on many PRODUCTS. Relational databases cannot store M:N directly; an associative (junction) table such as BILL_OF_MATERIALS holds a composite key of both parent keys plus the quantity-per attribute.
One-to-one (1:1) : Rare; usually a table split for security or sparse attributes.
Normalization
Normalization is the systematic decomposition of tables to eliminate redundant storage and the three update anomalies: insertion (cannot record a new supplier until it ships a part), update (changing an address in one row and not another), and deletion (removing the last order for a part erases the part's description).
Normal Form Requirement Violation Symptom
1NF Every cell holds a single atomic value; no repeating groups or arrays A single operations column containing "mill, drill, deburr"
2NF 1NF and every non-key attribute depends on the whole composite key In a table keyed on ( order_id , part_no ), storing customer_name , which depends on order_id alone
3NF 2NF and no non-key attribute depends on another non-key attribute (no transitive dependency) Storing both supplier_id and supplier_city in the PARTS table
Third normal form is the practical target for transactional systems. Analytical reporting warehouses deliberately denormalize into star schemas (a central fact table surrounded by dimension tables) to trade storage for query speed.
Query Logic (SQL Semantics)
An FE candidate is not asked to write production SQL, but is expected to read the logic of a query:
SELECT chooses columns (a projection ).
WHERE filters rows (a selection ), applied before grouping.
JOIN ... ON combines tables on matching key values. An inner join keeps only matching rows; a left outer join keeps every row of the left table and inserts nulls where no match exists.
GROUP BY collapses rows into groups and applies aggregate functions ( COUNT , SUM , AVG , MIN , MAX ).
HAVING filters groups , applied after aggregation. Filtering an aggregate in WHERE is the classic logic error.
- 3. Logic Development: Flowcharts, Decision Tables, and Pseudocode
- Flowchart Symbols (ANSI/ISO 5807)
Program and process logic is documented with a standard symbol set. Note that these are program flowchart symbols and differ from the ASME process chart symbols used in methods engineering.
- Symbol Shape Meaning
- Terminator Rounded rectangle / oval Start or Stop
- Process Rectangle A computation or assignment step
- Decision Diamond A Boolean test with two or more labeled exits
- Input / Output Parallelogram Read a value or write a result
- Predefined Process Rectangle with double side bars Call to a subroutine or standard module
- Connector Small circle Continuation to another point or page
- Flow line Arrow Direction of control Reorder-Point Check: Flowchart Logic
- ( START )
- |
- [ Read on-hand qty Q, ROP R ]
- |
- < Q <= R ? >
- / \
- Yes / \ No
- | |
- [ Release replenishment ] [ No action ]
- | |
- +--------+-------+
- |
- ( STOP )
- The Three Control Structures
Any algorithm, no matter how complex, is built from exactly three structures (the structured-programming theorem):
Sequence : Statements execute one after another.
Selection (branching) : IF condition THEN ... ELSE ... , or a multi-way CASE .
Iteration (looping) : WHILE condition DO ... (test first, may execute zero times) or FOR i = 1 TO n (definite count).
Two loop errors dominate exam questions: the infinite loop (the loop variable is never advanced or the exit condition can never become false) and the off-by-one error (looping 1 TO n-1 when n items must be processed).
Boolean Logic and Decision Tables
Selection conditions are Boolean expressions combined with AND ( ∩ \cap ∩ ), OR ( ∪ \cup ∪ ), and NOT . De Morgan's laws are the standard simplification tool: A ∩ B ‾ = A ˉ ∪ B ˉ A ∪ B ‾ = A ˉ ∩ B ˉ \overline{A \cap B} = \bar{A} \cup \bar{B} \qquad \overline{A \cup B} = \bar{A} \cap \bar{B} A ∩ B = A ˉ ∪ B ˉ A ∪ B = A ˉ ∩ B ˉ
A decision table enumerates every combination of k k k Boolean conditions ( 2 k 2^k 2 k rules) against the actions to be taken. Decision tables are preferred over nested IF statements when the number of conditions exceeds three, because they make missing and contradictory rules visible.
- Condition R1 R2 R3 R4
- Stock below reorder point? Y Y N N
- Supplier on quality hold? Y N Y N
- Action: Release PO to primary supplier X
- Action: Escalate to sourcing engineer X
- Action: No action X X
- Pseudocode
Pseudocode expresses the same logic in language-independent statements with explicit indentation. Example — computing the reorder point from a demand history array: INPUT d[1..n], L, z
- sum <- 0
- FOR i = 1 TO n
- sum <- sum + d[i]
- END FOR
- dbar <- sum / n
- ss <- 0
- FOR i = 1 TO n
- ss <- ss + (d[i] - dbar)^2
- END FOR
- sigma <- SQRT( ss / (n - 1) )
- ROP <- dbar * L + z * sigma * SQRT(L)
- OUTPUT ROP
- 4. Algorithms and Computational Complexity
- Big-O Notation
Big-O describes the asymptotic worst-case growth rate of an algorithm's operation count as the input size n n n grows. Constant factors and lower-order terms are dropped: an algorithm requiring 5 n 2 + 300 n + 900 5n^2 + 300n + 900 5 n 2 + 300 n + 900 operations is O ( n 2 ) O(n^2) O ( n 2 ) .
- Complexity Name Operations at n = 1,000,000 n = 1{,}000{,}000 n = 1 , 000 , 000 Representative Algorithm
- O ( 1 ) O(1) O ( 1 ) Constant 1 Hash-table lookup; array index access
- O ( log n ) O(\log n) O ( lo g n ) Logarithmic ≈ 20 \approx 20 ≈ 20 Binary search on a sorted array
- O ( n ) O(n) O ( n ) Linear 10 6 10^6 1 0 6 Linear (sequential) search; single pass sum
O ( n log n ) O(n \log n) O ( n lo g n ) Linearithmic ≈ 2 × 10 7 \approx 2 \times 10^7 ≈ 2 × 1 0 7 Merge sort, heap sort, efficient sorting
O ( n 2 ) O(n^2) O ( n 2 ) Quadratic 10 12 10^{12} 1 0 12 Bubble sort; all-pairs distance matrix
O ( 2 n ) O(2^n) O ( 2 n ) , O ( n ! ) O(n!) O ( n !) Exponential, factorial Intractable Exhaustive enumeration of subsets or tours
The practical dividing line is between polynomial-time algorithms (tractable) and exponential-time enumeration (intractable). This is exactly why the facility layout Quadratic Assignment Problem, the Traveling Salesman Problem, and integer programming rely on heuristics rather than exhaustive search.
Searching
Linear (sequential) search scans records one at a time. Worst case n n n comparisons, average n / 2 n/2 n /2 . Works on unsorted data.
Binary search requires the data be sorted . It compares the target with the middle element and discards half the remaining range each iteration, so the range after k k k probes is at most n / 2 k n/2^k n / 2 k and the search terminates when that falls below 1. Maximum comparisons: C max = ⌊ log 2 n ⌋ + 1 = ⌈ log 2 ( n + 1 ) ⌉ C_{\max} = \lfloor \log_2 n \rfloor + 1 = \lceil \log_2 (n + 1) \rceil C m a x = ⌊ lo g 2 n ⌋ + 1 = ⌈ lo g 2 ( n + 1 )⌉ Doubling the file size adds exactly one comparison — the practical reason inventory master files are indexed.
Greedy vs. Exhaustive vs. Heuristic Search
Greedy : Take the locally best step at every stage (Nearest Neighbor routing, Largest Candidate line balancing). Fast, never guaranteed optimal.
Exhaustive / exact : Evaluate every feasible combination (complete enumeration, branch and bound with full exploration). Guarantees optimality, explodes combinatorially.
Metaheuristic : Structured randomized search that escapes local optima (simulated annealing, genetic algorithms, tabu search). Used where the exact model is intractable and greedy answers are too poor.
- 5. Data Science Techniques for Industrial Systems
- Supervised vs. Unsupervised Learning Analytics Task Taxonomy
- |
- +---------------------+---------------------+
- | |
- SUPERVISED (labeled response y exists) UNSUPERVISED (no labels)
- | |
- +-----+------+ +-------+--------+
- | | | |
- Regression Classification Clustering Dimension Reduction
- (continuous y) (categorical y) (k-means, (PCA, factor
- hierarchical) analysis)
- Ex: predict Ex: pass/fail from Ex: group SKUs Ex: collapse 40
- tool life from inline sensor traces by demand sensor channels
- feed and speed signature into 3 components
Regression predicts a continuous response — the same least-squares machinery covered in the statistics chapter, extended to many predictors.
Classification predicts a categorical label. Common industrial classifiers are logistic regression, decision trees, random forests, and support vector machines.
Clustering (notably k-means , which iteratively assigns points to the nearest of k k k centroids and then recomputes those centroids) groups similar records without any labels. It underpins part-family formation for cellular manufacturing and SKU segmentation for slotting.
Dimension reduction (principal component analysis) compresses many correlated sensor channels into a few orthogonal components that explain most of the variance.
Analytics Maturity Ladder
Descriptive : What happened? Dashboards, Pareto charts, run charts.
Diagnostic : Why did it happen? Drill-down, correlation, root cause analysis.
Predictive : What will happen? Regression forecasts, remaining-useful-life models.
Prescriptive : What should we do? Optimization and simulation feeding a recommended action.
Evaluating a Classifier: The Confusion Matrix
A binary classifier is scored against known truth in a 2 × 2 2 \times 2 2 × 2 confusion matrix:
- Predicted Defective Predicted Good
- Actually Defective True Positive (TP) False Negative (FN)
Actually Good False Positive (FP) True Negative (TN) Accuracy = T P + T N T P + T N + F P + F N Precision = T P T P + F P Recall (Sensitivity) = T P T P + F N \text{Accuracy} = \frac{TP + TN}{TP + TN + FP + FN} \qquad \text{Precision} = \frac{TP}{TP + FP} \qquad \text{Recall (Sensitivity)} = \frac{TP}{TP + FN} Accuracy = TP + TN + FP + FN TP + TN Precision = TP + FP TP Recall (Sensitivity) = TP + FN TP F 1 = 2 × Precision × Recall Precision + Recall F_1 = \frac{2 \times \text{Precision} \times \text{Recall}}{\text{Precision} + \text{Recall}} F 1 = Precision + Recall 2 × Precision × Recall
The Accuracy Trap in Manufacturing : When only 1% of parts are defective, a model that predicts "good" for every part achieves 99% accuracy while catching zero defects. On rare-event quality problems, judge the model on recall (escapes prevented) and precision (false alarms avoided), never on raw accuracy — the same base-rate reasoning used with Bayes' theorem for inspection systems.
Overfitting and Validation
A model tuned until it reproduces every wiggle in the historical data has memorized noise and will forecast poorly. Guard against this by splitting the data into training , validation (tuning), and test (final, untouched) partitions, or by k-fold cross-validation . A large gap between training performance and test performance is the diagnostic signature of overfitting.
- 6. Step-by-Step Worked Engineering Examples
- Worked Example 8.4.1: Normalization and a Join-Plus-Aggregate Query
Problem : A plant records scrap in one flat spreadsheet:
- work_order part_no part_desc supplier_id supplier_city scrap_qty
- WO-101 P-77 Cast housing S-4 Toledo 12
- WO-102 P-77 Cast housing S-4 Toledo 5
- WO-103 P-80 Steel shaft S-9 Akron 8
Identify the normalization violation and decompose the data into 3NF tables.
State the query logic that reports total scrap quantity by supplier city.
Solution :
Diagnose the violation. The table is in 1NF (all cells atomic) and its key is work_order . However, part_desc depends on part_no , and supplier_city depends on supplier_id — both are non-key attributes determining other non-key attributes. These are transitive dependencies , so the table violates 3NF . The symptom is visible in the data: "Cast housing" and "Toledo" are stored twice, so a city correction applied to only one row leaves the database inconsistent.
Decompose into 3NF:
- SUPPLIER(supplier_id PK, supplier_city)
- PART(part_no PK, part_desc, supplier_id FK -> SUPPLIER)
SCRAP(work_order PK, part_no FK -> PART, scrap_qty) Each fact is now stored exactly once, and referential integrity blocks a scrap record that names a nonexistent part.
Query logic for scrap by city: join SCRAP to PART on part_no , join PART to SUPPLIER on supplier_id , group the joined rows by supplier_city , and sum scrap_qty within each group: SELECT s.supplier_city, SUM(k.scrap_qty) AS total_scrap
- FROM SCRAP k
- JOIN PART p ON k.part_no = p.part_no
- JOIN SUPPLIER s ON p.supplier_id = s.supplier_id
- GROUP BY s.supplier_city
- HAVING SUM(k.scrap_qty) > 10
Result: Toledo = 12 + 5 = 17 12 + 5 = 17 12 + 5 = 17 (passes the HAVING filter); Akron = 8 8 8 (filtered out). Note that the threshold on the aggregate belongs in HAVING , not WHERE .
Worked Example 8.4.2: Search Algorithm Selection
Problem : An MES queries a part master file containing n = 262,144 n = 262{,}144 n = 262 , 144 records.
Compute the worst-case comparison count for a linear search and for a binary search on a sorted file.
The file grows to 4,194,304 4{,}194{,}304 4 , 194 , 304 records (16x). By how much does each method's worst case grow?
Solution :
Linear search examines records one at a time: worst case = n = 262,144 = n = 262{,}144 = n = 262 , 144 comparisons (average ≈ 131,072 \approx 131{,}072 ≈ 131 , 072 ). Binary search halves the candidate range each comparison. Since 262,144 = 2 18 262{,}144 = 2^{18} 262 , 144 = 2 18 : C max = ⌊ log 2 n ⌋ + 1 = 18 + 1 = 19 comparisons C_{\max} = \lfloor \log_2 n \rfloor + 1 = 18 + 1 = 19\text{ comparisons} C m a x = ⌊ lo g 2 n ⌋ + 1 = 18 + 1 = 19 comparisons (Eighteen halvings shrink the range from 2 18 2^{18} 2 18 to 1, and the nineteenth probe tests that last candidate.)
At n = 4,194,304 = 2 22 n = 4{,}194{,}304 = 2^{22} n = 4 , 194 , 304 = 2 22 :
Linear worst case = 4,194,304 = 4{,}194{,}304 = 4 , 194 , 304 comparisons — a 16x increase , matching O ( n ) O(n) O ( n ) .
Binary worst case = ⌊ log 2 2 22 ⌋ + 1 = 23 = \lfloor \log_2 2^{22} \rfloor + 1 = 23 = ⌊ lo g 2 2 22 ⌋ + 1 = 23 comparisons — an increase of only 4 comparisons , matching O ( log n ) O(\log n) O ( lo g n ) : each doubling of the file adds exactly one comparison, and 16 = 2 4 16 = 2^4 16 = 2 4 .
Engineering conclusion : the sort-plus-index overhead is repaid immediately. Note the precondition — binary search is invalid on an unsorted file, so the maintenance cost of keeping the index sorted is the real design trade-off.
Worked Example 8.4.3: Confusion Matrix for an Automated Inspection Model
Problem : A machine-vision classifier screens 10,000 stamped panels. Truth data from teardown audit shows 200 panels were genuinely defective. The model flagged 260 panels as defective, and 170 of those flags were correct.
Complete the confusion matrix.
Compute accuracy, precision, recall, and F 1 F_1 F 1 .
Interpret the result for a quality engineer.
Solution :
Build the matrix :
- T P = 170 TP = 170 TP = 170 (flagged and truly defective)
- F P = 260 − 170 = 90 FP = 260 - 170 = 90 FP = 260 − 170 = 90 (flagged but actually good)
- F N = 200 − 170 = 30 FN = 200 - 170 = 30 FN = 200 − 170 = 30 (defective escapes the model missed)
T N = 10,000 − 170 − 90 − 30 = 9,710 TN = 10{,}000 - 170 - 90 - 30 = 9{,}710 TN = 10 , 000 − 170 − 90 − 30 = 9 , 710
Compute metrics : Accuracy = 170 + 9,710 10,000 = 9,880 10,000 = 0.9880 ( 98.80 % ) \text{Accuracy} = \frac{170 + 9{,}710}{10{,}000} = \frac{9{,}880}{10{,}000} = 0.9880 \quad (98.80\%) Accuracy = 10 , 000 170 + 9 , 710 = 10 , 000 9 , 880 = 0.9880 ( 98.80% ) Precision = T P T P + F P = 170 260 = 0.6538 ( 65.38 % ) \text{Precision} = \frac{TP}{TP + FP} = \frac{170}{260} = 0.6538 \quad (65.38\%) Precision = TP + FP TP = 260 170 = 0.6538 ( 65.38% ) Recall = T P T P + F N = 170 200 = 0.8500 ( 85.00 % ) \text{Recall} = \frac{TP}{TP + FN} = \frac{170}{200} = 0.8500 \quad (85.00\%) Recall = TP + FN TP = 200 170 = 0.8500 ( 85.00% ) F 1 = 2 ( 0.6538 ) ( 0.8500 ) 0.6538 + 0.8500 = 1.11146 1.50380 = 0.7391 F_1 = \frac{2(0.6538)(0.8500)}{0.6538 + 0.8500} = \frac{1.11146}{1.50380} = 0.7391 F 1 = 0.6538 + 0.8500 2 ( 0.6538 ) ( 0.8500 ) = 1.50380 1.11146 = 0.7391
Interpretation : The headline 98.8% accuracy is nearly meaningless — predicting "good" for every panel would score 98.0% by itself. The operationally relevant numbers are that 30 defective panels per 10,000 still escape (15% of all defects) and that 90 of every 260 alarms are false , consuming teardown labor. Raising the classifier's decision threshold reduces false alarms (precision up) but lets more defects escape (recall down); the correct threshold follows from the relative cost of an escape versus a false alarm, exactly the producer's-risk versus consumer's-risk trade-off from acceptance sampling.
7. NCEES Reference Handbook Tips and Realistic Exam Traps
Primary vs. Foreign Key : The primary key uniquely identifies a row within its own table and can never be null. A foreign key points at another table's primary key and may legitimately repeat many times. Reversing these two definitions is the most common database question error.
WHERE vs. HAVING : WHERE filters individual rows before grouping; HAVING filters groups after aggregation. A condition on SUM(...) or COUNT(...) can only appear in HAVING .
Big-O Constants Are Dropped : An algorithm counted at 3 n 2 + 5000 n 3n^2 + 5000n 3 n 2 + 5000 n is O ( n 2 ) O(n^2) O ( n 2 ) , not O ( n 2 + n ) O(n^2 + n) O ( n 2 + n ) and not O ( 3 n 2 ) O(3n^2) O ( 3 n 2 ) . Asymptotic notation reports only the dominant growth term.
Binary Search Requires Sorted Data : If a question states the records are in arrival order or unsorted, binary search is not an option; the answer is the O ( n ) O(n) O ( n ) linear scan (or sort first, at O ( n log n ) O(n \log n) O ( n lo g n ) ).
Do Not Average Ordinal Codes : A "3.7 average" on a 1-to-5 satisfaction scale assumes equal spacing the ordinal scale does not guarantee. Use the median or a top-two-box percentage.
Accuracy Is the Wrong Metric for Rare Defects : With a 1% defect rate, judge classifiers on precision and recall, not accuracy.