Business + Computing
Data science, engineering and analytics: one decision chain
Study map: Editorial bridge across business, computing and data pathways
The fields overlap, but distinguishing their responsibilities helps you construct a complete business solution. Follow one question from operational data to a decision and its consequences.
This original chapter is an editorial bridge, not a supplied course. Continue through the Business × Computers learning path.
1. Begin with the decision and its timing
A retailer asks which products to reorder next week. This is more precise than asking for an AI model. The decision has a deadline, a unit of action, constraints and costs. A stockout may lose sales, while excess inventory incurs holding cost and possible spoilage. Forecasting demand supplies an estimate; choosing an order quantity requires stock on hand, lead time, supplier constraints and the consequences of uncertainty. Define these before selecting an algorithm.
State the observation grain. Is a row a sale line, a daily product total or a customer visit? Mixing these grains causes misleading counts and duplicate revenue. Define the target in terms of what the decision needs. Recorded sales can understate demand when stock is unavailable. A model trained on sales alone may learn to forecast low sales for frequently unavailable products, reinforcing the shortage. Understanding the business mechanism is therefore part of technical problem formulation.
2. Data engineering makes the evidence usable
Data engineering manages movement, structure and dependable availability. In this example, sales arrive from tills, inventory from a stock system and lead times from purchasing records. Ingestion must preserve source identifiers and timestamps. Transformations resolve types, duplicates and business definitions. Store the original input when practical so that an error can be investigated and a transformation rerun.
An incremental pipeline processes new or changed records rather than rebuilding everything. It must handle late arrivals and corrections. Idempotence means rerunning the same logical operation does not produce duplicate effects. A unique event identifier and a merge strategy can help, but the exact approach depends on the source. Test required fields, valid ranges, referential integrity and reconciliation totals. A pipeline that runs successfully while omitting one store is operationally successful but analytically wrong. Freshness, completeness and accuracy deserve explicit monitoring.
3. Analytics explains patterns and supports choices
Descriptive analytics reports what has happened: sales by product, stockout frequency and stock turnover. Diagnostic work investigates why patterns differ, using comparisons and process knowledge. Predictive work estimates a future outcome. Prescriptive work chooses an action given objectives and constraints. These categories organise questions; they do not guarantee progressively greater value. A reliable stockout report may be more valuable than an advanced model nobody can use.
For a dashboard, write a metric contract: definition, grain, included records, treatment of returns, period and owner. Revenue before returns and revenue after returns are different quantities. Compare like periods and note changes in store coverage. Present charts with units, denominators and relevant uncertainty. Business analytics connects the finding to a decision: what should change, who acts, what cost is expected, and how the outcome will be reviewed.
4. Data science builds and tests models
Begin forecasting with a simple baseline, such as last week’s comparable day or a seasonal average. Then evaluate whether a more complex method improves the relevant result. Split data by time when predicting the future. A random split can let later conditions inform a model evaluated on earlier observations. Preprocessing and feature selection must be learned within the training portion rather than using the full dataset.
Use features available at the actual decision time. A delivery date recorded after fulfilment cannot help an earlier order decision without leakage. Evaluate error across product types and demand levels, not only one aggregate score. Consider whether overprediction and underprediction have different costs. Quantile forecasts or scenario distributions can support inventory decisions better than a single number. Record assumptions and compare performance to the baseline using the same evaluation window.
5. Business science evaluates explanations
A forecast predicts an outcome under observed conditions; it does not prove how demand would change under a new price or promotion. Causal questions require a design that supports intervention claims. Randomised trials can help when practical. Observational approaches need explicit assumptions about confounding, selection and comparison groups. A statistically impressive association may have little managerial value if its mechanism cannot be acted on.
Business science is used differently across organisations, so this library treats it as evidence-based business investigation rather than a universally standard degree category. Business engineering similarly means designing and improving organisational systems, processes and supporting technology. The important question is the work performed: what was measured, designed, inferred and changed? A DBA-style investigation connects a managerial problem to literature, a defended method and original evidence; an engineering research project may emphasise an algorithm or system’s properties. Both should make their contribution assessable.
6. Close the loop after deployment
The forecast enters a reorder process with supplier minimums, storage limits and a budget. A human may override a recommendation, but overrides should have reasons so that useful expertise can be studied. Track model error, input quality, operational adoption and the actual business outcome. A model can remain accurate while its economic value declines because suppliers or customer behaviour change.
Create a feedback record linking recommendation, action and result. Preserve which model and data version generated the recommendation. Compare costs and service levels over an appropriate period. The complete solution includes a decision workflow, reliable data, evaluated analysis, accountable action and learning from consequences. This is how data engineering, data science and business analytics become a single business capability.
Foundation: usable data is more than a filled table
Data quality means fitness for a specified use. An address can be syntactically well formed yet refer to the wrong customer; a sales total can be correct for yesterday and unsuitable for deciding today's stock. Separate completeness, validity, consistency, uniqueness, timeliness and accuracy. These dimensions interact but are not interchangeable. A required field check improves completeness; it does not prove that the entered value is true.
A departmental data contract states what a record represents, which fields are mandatory, how units and dates are interpreted, and who resolves exceptions. Sales may create an order, operations records fulfilment, finance records payment, and support records returns. An order is not necessarily a payment or delivery. The shared identifier connects these events without making them equivalent. Computer science helps by defining schemas, validating inputs and preserving event history; people decide the business meaning and the action to take when records disagree.
Begin with the nine enquiry words. Who creates the record? Whom does a mistaken record affect? Whose definition controls the metric? What is the counting unit? Where did the value originate? When was it captured? Why is it needed? Which records are excluded? How is a correction authorised? Write the answers before building the dashboard. This exercise prevents technical success from concealing semantic failure.
Undergraduate: inspect and reconcile a concrete dataset
The supplied retail_transactions.csv deliberately contains an identical repeated transaction, a zero-quantity row and a row with a missing price. The retail_lab.py exercise accepts ten lines, identifies one duplicate and rejects two invalid lines. Accepted records contain 26 net units. Positive sales-line value is INR 3,460; return-line value is INR 900; net transaction value is INR 2,560. Verify 3,460−900=2,560 before interpreting the result. These are synthetic records, with negative quantities used as simplified returns.
Keep rejected records visible with a reason. Silently dropping them makes it impossible to distinguish an improved process from a report that excludes difficult cases. An identical replay should not inflate the total. A reused identifier with a changed payload needs investigation rather than an automatic assumption that either version is correct. Define whether an identifier names a transaction, a line or an event, because the permitted repetition depends on that meaning.
The amount INR 2,560 is not profit. The exercise excludes product costs, taxes and recognition timing. It also does not prove that the source captured every sale. A reconciliation compares a defined total with an independently meaningful reference, not merely the same data calculated twice in different colours. For practice, predict the output, run the script beside its CSV, change one invalid row and record the resulting counts. Explain why a correction can increase the accepted total without representing new business activity.
Postgraduate: quality controls and exception ownership
Use a quality review framework: define the decision, specify record semantics, set validation rules, retain exceptions, reconcile outputs and revise controls. Place checks where they prevent useful classes of failure. Input validation can reject an absent price; referential integrity can identify an order referring to a nonexistent customer; reconciliation can identify missing events between systems. None of these proves customer consent or factual accuracy unless the relevant evidence is also collected.
Different departments should share a documented escalation path. IT owns reliable execution of the rule; the data steward maintains definitions; the business owner decides how a questionable record affects service, accounting or planning. A technical team should not invent a sales adjustment simply to make totals match. Corrections need reasons, authorisation and a history of previous values where appropriate. Limit access to sensitive records and use synthetic examples while learning.
Measure exceptions by their consequences. A missing optional preference may be tolerable; an incorrect delivery destination may immediately harm a customer. Prioritise controls using frequency, impact and detectability, while explaining the uncertainty in those estimates. Avoid chasing a universal quality percentage. Reducing rejected rows can be achieved by weakening validation, which may worsen the actual reliability of decisions. Monitor both upstream error generation and downstream outcomes.
Research: distinguish improved data from improved reporting
A research question might ask whether a shared data contract reduces fulfilment errors across sales and operations. Define a baseline, comparison and observation window. If the contract changes how errors are detected, reported errors may initially increase. A study must separate that measurement effect from a change in the underlying process. Review a sample against independently collected evidence where feasible, and document what that reference can establish.
Track missing records, correction latency, repeated events, service errors and the workload required to resolve exceptions. A system that achieves cleaner reports by delaying difficult orders may harm customers. A before-and-after comparison needs attention to case mix, staffing changes and seasonal demand. The contribution may identify which semantic disagreements cause failures, how stewardship changes correction behaviour, or where a technical constraint is insufficient.
Submit a data dictionary, validation specification, exception log, reconciliation table and limitation statement. Retain the synthetic raw data and version the transformation rules so another learner can reproduce the result. Distinguish reproducibility from truth: the same code can repeatedly produce an incorrect interpretation. Close by identifying the decision supported, the uncertainty remaining and the human authority responsible for acting on it.
Study questions and answers
Why can an accurate demand forecast still lead to poor ordering decisions?
Ordering also depends on inventory, lead times, minimum quantities, storage and cash constraints, and asymmetric shortage and excess costs. Forecast accuracy alone does not optimise those decisions.
Extended practice questions
Why does a valid field not prove accuracy?
Validity checks conformity to a rule, such as a numeric price or recognised format. Accuracy concerns whether the value represents the relevant reality. A permitted price can still be attached to the wrong product; verification requires appropriate source evidence.
Marking guide: Indicative 10 marks: define validity as conformity to an expected type, format, range or rule (3); define accuracy as correspondence with the relevant real-world fact (3); give a concrete valid-but-inaccurate example such as a permitted price assigned to the wrong product (2); identify source evidence or reconciliation needed to verify that fact (2). Passing a format check alone must not receive accuracy credit.
Interpret sales-line value INR 3,460 and return-line value INR 900 in the retail exercise.
Net transaction value is 3,460−900=INR 2,560. It is a synthetic aggregate, not profit: costs, taxes and recognition timing are excluded. The supplied validation produces ten accepted lines, one duplicate and two rejected lines.
Marking guide: Indicative 10 marks: subtract return-line value from sales-line value, 3,460 - 900 = INR 2,560 (4); interpret the result as net transaction value for the synthetic exercise (2); explain why it is not profit, naming excluded costs and recognising taxes or recognition timing limits (3); distinguish accepted aggregate records from duplicates/rejections or source completeness (1). The question supplies totals only: fixture counts are supporting context, not a required memorised answer.
A team reduces rejected records by allowing blank prices. Has data quality improved?
Not necessarily. Weakening validation changes the reported rejection count without fixing missing source information. Assess completeness and decision consequences, retain exceptions, and compare consistent definitions before claiming improvement.
Marking guide: Indicative 10 marks: explain that permitting blanks changes the validation rule rather than correcting missing price information (3); distinguish lower rejection count from improved completeness and accuracy (2); describe effects on valuation or other decisions and retain traceable exceptions (3); require comparable definitions and source correction before claiming improvement (2). Credit a justified nullable-price design only if missingness remains visible and the decision consequences are addressed.
How could a data contract increase recorded errors while improving work?
Better detection or clearer classification can reveal previously hidden problems. Separate measurement changes from underlying failure rates, use a justified reference or comparison, and measure correction workload and service outcomes alongside reported exceptions.
Marking guide: Indicative 10 marks: explain how clearer contract rules or better detection reveal previously unrecorded errors (3); separate changed measurement/classification from changes in underlying failure rates (3); propose a justified reference or comparison with consistent definitions (2); assess correction workload and service outcomes alongside exceptions (2). More recorded errors alone supports neither success nor failure.
An analyst reports excellent prediction accuracy using fields recorded only after the business decision. Why is the result unsuitable for that decision?
Those fields were unavailable when the prediction would have been made, so the evaluation gives the model information it cannot legitimately use at decision time. Reconstruct feature availability and timestamps, then evaluate using only the information available at the intended horizon. Retain a separate fitting and evaluation boundary. Data engineering records provenance, analytics checks the model and business users define timing. High accuracy under leaked information is not evidence of operational usefulness. Some fields may be valid for a different retrospective task, which must be explicitly distinguished.
Marking guide: Availability leakage; timestamp reconstruction; horizon/split; retrospective distinction; ownership. Indicative allocation:reasoning4;application or workings3;assumptions and limits3.
Marks: 10
Compare data engineering, business analytics and data science in a replenishment decision.
Data engineering builds and maintains usable records and pipelines, including identity, quality and availability. Business analytics interprets evidence about stock, demand and service to support the decision. Data science may build and evaluate a forecasting or classification model. Their boundaries overlap, but a model does not repair missing business definitions or authorise a purchase. Purchasing, finance and operations own commitments and constraints. A useful decision chain connects reliable data, appropriate analysis, a governed action and later review; isolated technical excellence in one stage cannot guarantee the whole outcome.
Marking guide: Three roles; records/interpretation/models; overlap; purchasing authority; decision chain. Indicative allocation:reasoning4;application or workings3;assumptions and limits3.
Marks: 10
A pipeline receives 1000 records, rejects 50 and flags 100 of the accepted records for review. Find accepted count and review share among accepted.
Accepted records number 1000−50=950. Review share among accepted is100/950=2/19, approximately 10.53%. Rejection share over input is50/1000=5%; flagged review share over all input is10%, a different denominator. Acceptance is a contract result, not proof that every record is true or ready for a particular decision. Preserve reasons for rejection and review. Data owners define valid meaning, and technical teams verify handling. A dashboard should show both retained and excluded counts so a clean-looking output does not conceal missing coverage.
Marking guide: 950 accepted;10.53% conditional;5% rejection; denominator/validity/exclusion. Indicative allocation:reasoning4;application or workings3;assumptions and limits3.
Marks: 10
Design a data-to-decision handoff for a weekly inventory report.
Define the record grain, cutoff, units and authoritative identifiers with inventory and purchasing staff. Validate receipts, outstanding commitments and exceptions, retaining lineage and rejected counts. Publish the analysis with assumptions and a clear decision owner. Separate a replenishment recommendation from an authorised purchase and preserve overrides with reasons. Review later stock and service outcomes. Data engineering owns reliable delivery, analysts own method and interpretation, and managers own commitments. A report being available on time is necessary evidence for the handoff, but does not establish that its recommendation is appropriate.
Marking guide: Contract/lineage; exceptions; recommendation versus commitment; override/outcome; roles. Indicative allocation:reasoning4;application or workings3;assumptions and limits3.
Marks: 10
Revision cards
How does a business question determine data grain?
Specify the decision and required unit of observation, such as an order, order line or customer-month. Joining different grains can duplicate totals or hide variation. Define relationships before aggregating.
An analyst reports excellent prediction accuracy using fields recorded only after the business decision. Why is the result unsuitable for that decision?
Decision-time prediction must use decision-time information. Later fields can inflate evaluation without being usable in operation.
Compare data engineering, business analytics and data science in a replenishment decision.
Engineering makes evidence usable; analytics interprets it; data science models it. Business authority and outcome review complete the decision chain.
A pipeline receives 1000 records, rejects 50 and flags 100 of the accepted records for review. Find accepted count and review share among accepted.
950 accepted;100/950≈10.53% need review. Acceptance does not establish factual correctness or complete coverage.
Design a data-to-decision handoff for a weekly inventory report.
Agree record meaning, expose exceptions and name the decision owner. Report delivery, recommendation and purchase authorisation are different steps.
Why retain data lineage for a dashboard?
Lineage connects a displayed measure to sources, transformations and definitions. It helps investigate discrepancies and changes. An attractive chart cannot replace a reviewable path from evidence to decision.
How do data engineering, analytics and managerial action depend on each other?
Engineering makes records usable under defined rules; analytics interprets them for a question; management chooses and reviews action. Weak meaning or ownership anywhere can undermine the chain. A technically successful pipeline is not a completed business decision.
Practice task
Create a retail data dictionary and metric contract. Design a sales–inventory pipeline, select a time-based forecasting baseline, formulate an ordering rule and write an evaluation plan. Include leakage checks and a reconciliation test.
Local practice: original Library examples
These synthetic exercises are separate from the primary sources and further reading below.
- Local practice: retail reconciliation Python starter
Type: Original Library local practice file; Python standard library and synthetic CSV
Use: Use the accompanying retail CSV to check ten accepted lines, one duplicate, two rejected lines, 26 net units and INR 2,560 net transaction value. This is not profit or a full accounting system. - Local practice: retail transactions CSV
Type: Original Library synthetic input file; keep beside retail_lab.py
Use: Inspect all thirteen input lines before running the starter. Negative quantities model simplified returns; the repeated T002 line is an exact replay. - Local practice: workshop enquiry worked example
Type: Original Library worked example; paper or optional standard-library Python
Use: Practise an explicit conflict-stop policy and reconcile seven raw rows to five retained enquiries, one duplicate and one quarantine; distinguish three confirmed enquiries from four seats. This is a separate fixture with different rules, not the retail lab.
Sources and further reading
- PostgreSQL SQL tutorial
Type: Free official documentation
Use: Tables, joins, aggregates and transactions - MIT The Analytics Edge
Type: Free OpenCourseWare
Use: Analytics applied to real organisational problems - MIT Optimisation Methods in Business Analytics
Type: Free OpenCourseWare
Use: Formulating and solving business decision models - scikit-learn user guide
Type: Free official documentation
Use: Supervised learning, clustering and model evaluation - scikit-learn common pitfalls
Type: Free official documentation
Use: Leakage, preprocessing and reproducibility